0
$\begingroup$

Rosanswers logo

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.


Originally posted by ServoRen on ROS Answers with karma: 1 on 2017-10-09

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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/workspace_overlaying


Originally posted by tfoote with karma: 58457 on 2017-10-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2017-10-10:
@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 ..

Comment by gvdhoorn on 2017-10-10:
.. 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.

Comment by tfoote on 2017-10-10:
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#Source_Space

Comment by ServoRen on 2017-10-11:
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 ..

Comment by ServoRen on 2017-10-11:
.. More common packages like geometry_msgs or roscpp can be assumed to be taken from the /opt/ros//share folder. Is this right?

Thanks so much!

Comment by tfoote on 2017-10-11:
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.

Comment by ServoRen on 2017-10-13:
I see. Thanks for the input.

$\endgroup$
0
$\begingroup$

Your workspace is not extending any other result space, but it is set to use a linked devel space layout. This requires the catkin CMake package in your source space in order to be built.

$\endgroup$

Your Answer

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