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.