Ask Your Question

Revision history [back]

Hi Sebastian,

The .bashrc file (note the leading period) in your home directory sets your working Linux environment and gets executed every time you fire up a terminal window. (The "rc" stands for "run commands".) Part of .bashrc sets your PATH environment variable which specifies the directories to look in to find commands, including roscd. If you are new to Linux, it might help to look at something like this:

http://infohost.nmt.edu/tcc/help/pubs/dotfiles/bashrc.html

The following step from the ROS installation instructions for cturtle under Ubuntu adds a line to the end of your .bashrc file:

echo "source /opt/ros/cturtle/setup.bash" >> ~/.bashrc

This line causes the file /opt/ros/cturtle/setup.bash to get executed as part of your terminal setup so that ROS commands and packages can be found. (The ~ character in Linux stands for your home directory.) When you follow the installation instructions for OpenNI, it also adds a line to your .bashrc file that causes the file:

~/ni/setup.sh

to be executed as part of your .bashrc file. Two of the variables set by this file, ROS_ROOT and ROS_PACKAGE_PATH, need to be edited if you are running cturtle rather than a diamondback release candidate.

To edit the ~/ni/setup.sh file or your ~/.bashrc file, use a text editor like pico, gedit, emacs or vi. Assuming you are still using cturtle, edit ~/ni/setup.sh and change the word diamondback to cturtle in the two places it occurs. You should probably then just reboot to make sure the variables get set in all the right places.

--patrick

Hi Sebastian,

The .bashrc file (note the leading period) in your home directory sets your working Linux environment and gets executed every time you fire up a terminal window. (The "rc" stands for "run commands".) Part of .bashrc sets your PATH environment variable which specifies the directories to look in to find commands, including roscd. If you are new to Linux, it might help to look at something like this:

http://infohost.nmt.edu/tcc/help/pubs/dotfiles/bashrc.html

Before going any further, make sure you update rosinstall by executing the command:

sudo easy_install -U rosinstall

The following step from the ROS installation instructions for cturtle under Ubuntu adds a line to the end of your .bashrc file:

echo "source /opt/ros/cturtle/setup.bash" >> ~/.bashrc

This line causes the file /opt/ros/cturtle/setup.bash to get executed as part of your terminal setup so that ROS commands and packages can be found. (The ~ character in Linux stands for your home directory.) When you follow the installation instructions for OpenNI, it also adds a line to your .bashrc file that causes the file:

~/ni/setup.sh

to be executed as part of your .bashrc file. Two of the variables set by this file, ROS_ROOT and ROS_PACKAGE_PATH, need to be edited if you are running cturtle rather than a diamondback release candidate.

To edit the ~/ni/setup.sh file or your ~/.bashrc file, use a text editor like pico, gedit, emacs or vi. Assuming you are still using cturtle, edit ~/ni/setup.sh and change the word diamondback to cturtle in the two places it occurs. You should probably then just reboot to make sure the variables get set in all the right places.

--patrick