Rosanswers logo


I have some problem. I made a custom package on ros kinetic (ubuntu 16.04) previously and is working fine. Recently I am trying to use it on a Raspberry Pi3 (Raspbian).

I have successfully installed ROS following official tutorial so actually I have a ros_catkin_ws directory with necessary sources compiled. I also manged to install a release package (p2os_driver) from github using ros-install, wstool, catkin_make_isolated.

So now I have my catkin package test (which contains launch and src directories with packgae.xml and CMake). On Ubuntu this folder was located in catkin_ws and all I had to do was catkin_make, source catkin_ws/devel/setup.bash.

So my question is, how can I import this package into my new installation on Raspbian ? I tried several things, copying it in ros_catkin_ws/src then catkin_make_isolated this specific package, tried to make an overlay catkin workspace (without amstering it at all so maybe I did it wrong) so I can use catkin_make (but this only get me a "can't find rosout" when doing "roslaunch test test.launch").

Maybe I got it wrong when using "source" also. Currently I have ROS_PACKAGE_PATH set to "/opt/ros/kinetic/share". Or I missed a catkin_init_workspace somehow.

Thanks for your help.

Edit :

Thanks for answering. Still in trouble though. When running catkin_make in my second worspace (catkin_ws), I got this (after having sourced ros_catkin_ws/devel/setup.bash):

    +++ processing catkin package: 'test'
-- ==> add_subdirectory(test)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /opt/ros/kinetic/share/p2os_driver/cmake/p2os_driverConfig.cmake:148 (message):
  Project 'test' tried to find library 'p2os_driver'.  The library is
  neither a target nor built/installed properly.  Did you compile project
  'p2os_driver'? Did you find_package() it before the subdirectory containing
  its code is included?
Call Stack (most recent call first):
  /home/pi/ros_catkin_ws/devel/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  test/CMakeLists.txt:10 (find_package)

However p2os_driver is, I think, properly built in main workspace (ros_catwin_ws) since I got no error doing :

sudo ~/ros_catkin_ws/src/catkin/bin/catkin_make_isolated -j1 --install --install-space /opt/ros/kinetic -DCMAKE_BUILD_TYPE=Release --pkg p2os_driver

Is there something I am doing wrong with dependencies ? I created "test" package in catkin_ws doing

catkin_create_pkg test rospy p2os_driver nav_msgs tf

Originally posted by r00t8 on ROS Answers with karma: 15 on 2018-05-15

Post score: 0

Original comments

Comment by gvdhoorn on 2018-05-16:\

Project 'test' tried to find library 'p2os_driver'.

could you show the CMakeLists.txt of the test pkg that you created? Please omit all the boilerplate comments (lines starting with #), they are not needed.

Comment by r00t8 on 2018-05-16:

find_package(catkin REQUIRED COMPONENTS nav_msgs p2os_driver rospy tf )


1 Answer 1


Rosanswers logo

Overlaying (or chaining) is what would probably be the most natural (and efficient) way to do this.

I would:

  1. make sure you've not sourced anything
  2. source your current ros_catkin_ws (either devel or install, depending on how you set things up)
  3. go to the root of your new catkin ws
  4. run catkin_make

This should build just the new package, while making use of the other workspace as the underlay that contains all the base ROS packages.

After building, source the devel/setup.bash of your new workspace and everything should work.

PS: I've left out the step making sure all dependencies of your new package are actually present on your Pi. If they aren't, you'll need to fix that before trying to build.


When running catkin_make in my second worspace (catkin_ws), I got this (after having sourced ros_catkin_ws/devel/setup.bash)

From your later comment you appear to have an install space under /opt/ros/kinetic. I would recommend you source that, not the devel space of your underlying workspace.

re: cannot find p2os_driver: if you open a new terminal (make sure to not auto-source anything), source /opt/ros/kinetic/setup.bash and then do a rospack find p2os_driver, does that return successfully?

Edit2: I believe you're running into this issue because the CMakeLists.txt of the p2os_driver package is faulty.

It has this (from here):

  INCLUDE_DIRS include
  LIBRARIES p2os_driver
  CATKIN_DEPENDS p2os_msgs nav_msgs roscpp geometry_msgs diagnostic_updater tf std_msgs kdl_parser

Notice the LIBRARIES p2os_driver bit.

That makes Catkin believe that this package produces a library called libp2os_driver.so, and it will export that information to whoever find_package(catkin .. COMPONENTS p2os_driver ..). This is passed to CMake, and it will start looking for that library.

But p2os_driver does not build any libraries, only a single executable binary and that is called p2os_driver (here). That is most likely the cause of your problems.

For now: remove (or comment) the LIBRARIES p2os_driver line from the catkin_package(..) statement in the CMakeLists.txt of the p2os_driver package. You'll have to rebuild the package, and have Catkin install it to your install space as well.

And please report this in an issue over at allenh1/p2os/issues.

Originally posted by gvdhoorn with karma: 86574 on 2018-05-15

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by r00t8 on 2018-05-16:
Yes, gives me /opt/ros/kinetic/share/p2os_driver

Comment by gvdhoorn on 2018-05-16:
Ok. Can you try what you did earlier, but now after source-ing /opt/ros/kinetic as you did just now?

Comment by r00t8 on 2018-05-16:
Exactly the same error that previously when source-ing ~/ros_catkin_ws/devel/

Comment by r00t8 on 2018-05-16:
Editing CMakeLists.txt from p2os_driver package worked. Thanks for your help.

Comment by gvdhoorn on 2018-05-16:
Could you please post a link to the issue over at allenh1/p2os so we keep things connected?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.