Ask Your Question
0

Do packages have to be in the catkin source space?

asked 2017-10-09 09:48:24 -0600

ServoRen gravatar image

Hi there! Been trying out ROS and I'm simply amazed just how detailed the tutorials have been. One thing that's been puzzling me though is that catkin_make (and in my case, catkin build) seems to also look into the /opt/ros/kinetic/share folder on top of the source space. What is the reason for this? Is the latter space exclusively for packages I write while the former is for packages developed by other parties?

Many thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-09 20:52:57 -0600

tfoote gravatar image

You can have the concept of overlays such that you can layer new versions of packages on top of other ones and leverage shared installations such as the binaries.

There's a tutorial on this at: http://wiki.ros.org/catkin/Tutorials/...

edit flag offensive delete link more

Comments

@tfoote: so the answer is essentially 'yes' then? :) (an overlay just adds a 'new' source space).

And extending ROS_PACKAGE_PATH manually would also be akin to adding a new source space, but it the build artefacts will not end up in a corresponding build/devel space, but of the workspace ..

gvdhoorn gravatar imagegvdhoorn ( 2017-10-10 01:32:46 -0600 )edit

.. where catkin_make / catkin build was invoked.

@ServoRen: as ROS (catkin) pkgs are just CMake projects, you could actually build without Catkin. That would remove the 'workspace' concept. It's not often done though.

gvdhoorn gravatar imagegvdhoorn ( 2017-10-10 01:33:10 -0600 )edit

Yes, if you're talking about packages that you want to build, they have to be in the source space. The source space is specifically a subset of the current workspace and does not include the other paths http://wiki.ros.org/catkin/workspaces...

tfoote gravatar imagetfoote ( 2017-10-10 13:37:33 -0600 )edit

I see. So let's say I want to share my work and it uses both packages I wrote and not-so-common packages by other people, it would be best to place both categories of packages in the source space ..

ServoRen gravatar imageServoRen ( 2017-10-11 04:12:04 -0600 )edit

.. More common packages like geometry_msgs or roscpp can be assumed to be taken from the /opt/ros/<distro>/share folder. Is this right?

Thanks so much!

ServoRen gravatar imageServoRen ( 2017-10-11 04:12:55 -0600 )edit

That cannot be assumed, you should provide instructions on how to install your depedencies. There are tools like rosdep to automate this based on the contents of the source space and the dependencies in their package.xml files.

tfoote gravatar imagetfoote ( 2017-10-11 11:43:50 -0600 )edit

I see. Thanks for the input.

ServoRen gravatar imageServoRen ( 2017-10-13 00:55:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-10-09 09:48:24 -0600

Seen: 102 times

Last updated: Oct 09 '17