Order of catkin source setup.bash files matters?
I have these lines in my .bashrc file:
source /opt/ros/hydro/setup.bash
source /home/baxelrod/my_catkin_ws/devel/setup.bash
source /home/baxelrod/my_other_catkin_ws/devel/setup.bash
Which yields this environment variable:
ROS_PACKAGE_PATH=/home/baxelrod/my_other_catkin_ws/src:
/home/baxelrod/my_catkin_ws/src:
/opt/ros/hydro/share:
/opt/ros/hydro/stacks
However, when I change the order of "source" lines in my .bashrc to have "my_other_catkin_ws" before "my_catkin_ws", close and open a new terminal, then the ROS_PACKAGE_PATH becomes:
ROS_PACKAGE_PATH=/home/baxelrod/my_catkin_ws/src:
/opt/ros/hydro/share:
/opt/ros/hydro/stacks
What gives?
More info:
- I am using ROS Hydro on Ubuntu 12.04.
- Both catkin workspaces are compiled.
- The workspaces were created at different times. my_catkin_ws is significantly newer than my_other_catkin_ws. (I updated my ROS packages a few times in between.) This is strange because it seems like sourcing my_catkin_ws (the newer workspace) clobbers the existing path. So it seems like maybe a bug was introduced.
- I diffed both setup.bash and setup.sh files and there are no differences besides the path to the workspace