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

Here are the ROS related lines from my .bashrc:

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
export ROS_ROOT=/opt/ros/indigo
export PATH=/opt/ros/indigo/bin:$PATH
source /opt/ros/indigo/setup.bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/indigo/lib

Apart from the ROS_HOSTNAME perhaps, all of this should not be necessary (unless you have a rather non-standard setup going on). Could you clarify why you think these should be in your .bashrc?

Sourcing /path/to/your/catkin_ws/devel/setup.bash should setup all the required environment variables to work with packages build in that particular catkin_ws.

If you want, you could add source /path/to/your/catkin_ws/devel/setup.bash to your .bashrc, but the effect should be the same.

Here are the ROS related lines from my .bashrc:

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
export ROS_ROOT=/opt/ros/indigo
export PATH=/opt/ros/indigo/bin:$PATH
source /opt/ros/indigo/setup.bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/indigo/lib

Apart from the ROS_HOSTNAME perhaps, all of this should not be necessary (unless you have a rather non-standard setup going on). Could you clarify why you think these should be in your .bashrc?

Sourcing /path/to/your/catkin_ws/devel/setup.bash should setup all the required environment variables to work with packages build in that particular catkin_ws.

If you want, you could add source /path/to/your/catkin_ws/devel/setup.bash to your .bashrc, but the effect should be the same.

Could you test by starting up a clean terminal, unset all the ROS related environment variables, sourcing the correct setup.bash, running rospack profile and then try roslaunch-ing one of your packages?

Here are the ROS related lines from my .bashrc:

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
export ROS_ROOT=/opt/ros/indigo
export PATH=/opt/ros/indigo/bin:$PATH
source /opt/ros/indigo/setup.bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/indigo/lib

Apart from the ROS_HOSTNAME perhaps, all of this should not be necessary (unless you have a rather non-standard setup going on). Could you clarify why you think these should be in your .bashrc?

Sourcing /path/to/your/catkin_ws/devel/setup.bash should setup all the required environment variables to work with packages build in that particular catkin_ws.

If you want, you could add source /path/to/your/catkin_ws/devel/setup.bash to your .bashrc, but the effect should be the same.

If I do a "cakin clean -a" and a "cakin build," and re-source my bashrc, roslaunch can't autocomplete my launch files, or run any of the nodes in my workspace.

Which makes sense, because without sourcing the setup.bash from the workspace you are working with, none of the paths will be setup correctly.

Could you test by starting up a clean terminal, unset all the ROS related environment variables, sourcing the correct setup.bash, running rospack profile and then try roslaunch-ing one of your packages?

Here are the ROS related lines from my .bashrc:

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
export ROS_ROOT=/opt/ros/indigo
export PATH=/opt/ros/indigo/bin:$PATH
source /opt/ros/indigo/setup.bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/indigo/lib

Apart from the ROS_HOSTNAME perhaps, all of this should not be necessary (unless you have a rather non-standard setup going on). Could you clarify why you think these should be in your .bashrc?

Sourcing /path/to/your/catkin_ws/devel/setup.bash should setup all the required environment variables to work with packages build in that particular catkin_ws.

If you want, you could add source /path/to/your/catkin_ws/devel/setup.bash to your .bashrc, but the effect should be the same.

If I do a "cakin clean -a" and a "cakin build," and re-source my bashrc, roslaunch can't autocomplete my launch files, or run any of the nodes in my workspace.

Which makes sense, because without sourcing the setup.bash from the workspace you are working with, none of the paths will be setup correctly.

Could you test by starting up a clean terminal, unset all the ROS related environment variables, sourcing the correct setup.bash, running rospack profile and then try roslaunch-ing one of your packages?


Edit:

source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash

This is also not necessary: you only need to source the 'last' workspace. In this case, that would be ~/catkin_ws/devel/setup.bash.