How do you chain three catkin workspaces so that their setup.bash files don't conflict?
I tried following the instructions [in the wiki](http://wiki.ros.org/catkin/Tutorials/workspace_overlaying), but they're a bit confusing and don't seem to be correct.
My workspaces are:
1. the base Kinetic workspace installed into the standard `/opt/ros/kinetic` location
2. a workspace containing third-party packages not available in kinetic (such as robot_upstart), at `/usr/local/mybot/overlay`
3. 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:
1. `rospack list|grep -i actionlib` to determine if the base Kinetic workspace is accessible, called check A.
2. `rospack list|grep -i upstart` to determine if the second workspace is accessible, called check B.
3. `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?
↧