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

You can source your setup file from within any directory, i.e. you do not have to change to your workspace's directory to do this.

You can add the source /path/to/workspace/devel/setup.bash to your ~/.bashrc file. Though it could be confusing if in the future you forgot you did this, and your shell unexpectedly has that workspace sourced. If you add the line to your ~/.bashrc so that it is done every time you open a shell, then you might also consider printing a message to remind yourself that this is happening.

Also, I actually prefer setting aliases rather than automatically sourcing workspaces when I open a new terminal, because I work with many workspaces at once typically. If you don't then perhaps you'd prefer just adding it directly to your ~/.bashrc.