ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Including a package dependency in your personnal packages

asked 2011-02-26 04:20:08 -0600

Willy Lambert gravatar image

updated 2014-01-28 17:09:14 -0600

ngrennan gravatar image

I am a quite new ROS user and created my ros package which take a dependency (in my case eigen) I took my ages to find how to build this with thefollowing lines in my CMakelists.txt :

#add the eigen dependency rosbuild_find_ros_package( eigen ) include_directories( ${eigen_PACKAGE_PATH}/include/src )

At the end it seems logical. I don't know if it is about my low knownledge about CMake, but I passed sometime searching in the documentation without any clue about this. First question, is it documented somewhere ? If not I would like to update the documentation but I don't know where is the rigth place : http://www.ros.org/wiki/rosbuild/CMak... : adding the use of another package for building, espacially the "include" directory (not so easy to find this page from scratch) http://www.ros.org/wiki/rosbuild/CMak... : adding details about what you have to do after http://www.ros.org/wiki/eigen/Tutorials : adding the details in each packages tutorial "how to use me ?"

Then, is it a roadmap in ROS on how a package gives the information to being used ? In my example is the include_directories( ${eigen_PACKAGE_PATH}/include/src ) package specific ? or is it a ROS habits ?

Isn't it the job of ros dependencies system to add the includes ? for example in the <export> section of the manifest.xml ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2011-02-26 04:29:57 -0600

Eric Perko gravatar image

Isn't it the job of ros dependencies system to add the includes ? for example in the <export> section of the manifest.xml ?

It most certainly is! However, the manifest.xml file is actually where dependencies are specified, not in the CMakeLists.txt file. rosbuild only pulls in the <export> section of manifest.xml files for packages that you list a dependency on (or dependencies of your dependencies).

Your package should automatically have the correct includes for Eigen if you edit your manifest.xml file and add a line like <depend package="eigen" />. This manifest.xml line would make the stuff you did in your CMakeLists to find and include Eigen unnecessary.

Try adding the dependency to your manifest.xml file and removing anything related to finding the Eigen includes from your CMakeLists and see if that fixes things.

edit flag offensive delete link more

Comments

thanks for this. At first time it was what i did but with eigen3, as my code was writtent for eigen it failed because the folder Eigen has been renamed to Eigen3. Anyway it helped, it didn't know the include were automatically done
Willy Lambert gravatar image Willy Lambert  ( 2011-02-26 05:14:12 -0600 )edit
thanks for this.
Willy Lambert gravatar image Willy Lambert  ( 2011-02-26 05:14:14 -0600 )edit
0

answered 2011-03-18 03:11:23 -0600

Benoit Larochelle gravatar image

updated 2011-03-18 03:13:18 -0600

These two pages of ROS documentation also answer your question, and give you much more details:

http://www.ros.org/wiki/rosmake

http://www.ros.org/wiki/Manifest

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-02-26 04:20:08 -0600

Seen: 2,118 times

Last updated: Aug 10 '11