How to chain three catkin workspaces?
How do you chain three catkin workspaces so that their setup.bash files don't conflict?
I tried following the instructions in the wiki, but they're a bit confusing and don't seem to be correct.
My workspaces are:
- the base Kinetic workspace installed into the standard
/opt/ros/kinetic
location - a workspace containing third-party packages not available in kinetic (such as robot_upstart), at
/usr/local/mybot/overlay
- a workspace containing my custom application and packages at
/usr/local/mybot/ros
Each workspace builds fine when I run catkin_make inside them. However, I can't source their setup.bash scripts to expose all their packages to ROS.
I'm using:
rospack list|grep -i actionlib
to determine if the base Kinetic workspace is accessible, called check A.rospack list|grep -i upstart
to determine if the second workspace is accessible, called check B.rospack list|grep -i mybot
to determine if the third workspace is accessible, called check C.
If I run source /opt/ros/kinetic/setup.bash
, then A passes, B fails, and C fails, as expected.
If I then run source /usr/local/mybot/overlay/devel/setup.bash
, then A passes, B passes, and C fails, as expected.
If I then run source /usr/local/mybot/ros/devel/setup.bash
, then A passes, B fails unexpectedly, but C passes.
So it seems that my third workspace is overwriting the environment set by the second workspace. How do I fix this?