ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is the content of the end of my bashrc file:

source /opt/ros/kinetic/setup.bash
#source ~/catkin_ws/devel/setup.bash
source ~/catkin_ws/devel_isolated/setup.bash
source ~/src/setup_px4.sh
source /opt/ros/kinetic/setup.bash

these lines are executed in sequence, one after the other.

When you source /path/to/setup.bash, the last one wins (ie: overwrites all the others).

So with the sequence you show, first /opt/ros/kinetic/setup.bash is sourced, then ~/catkin_ws/devel_isolated/setup.bash, then ~/src/setup_px4.sh and finally again /opt/ros/kinetic/setup.bash.

End result: as if only /opt/ros/kinetic/setup.bash was sourced.

You'll typically want to source /path/to/your/workspace/devel/setup.bash last.

Or, alternatively, don't auto-source anything in your .bashrc, but manually source ~/catkin_ws/devel_isolated/setup.bash when you start a terminal.