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

roscd pointing to wrong folder

asked 2011-02-21 16:23:10 -0500

Aslund gravatar image

Hey everyone

Earlier today I tried to install the OpenNI driver according to the tutorial on the ROS homepage link, but the result turned my ROS installation into a total mess. The driver was unable to install due to some part of openCV missing, but I was unable to install them since roscd suddenly pointed to the ros/unstable folder instead of ros/cturtle. I tried to remove ROS and install it again hoping that would help, but seems the path is defined in some bash file, but I have no clue where or how to change it back so my ROS works again. Furthermore, then during the installation of the new ROS I got a few messages like this one "sh: getcwd() failed: No such file or directory", is it also caused by his failure in roscd or some other problem, never experienced this message during the installation of ROS through the repository. Last but not least, it is not possible to install the OpenNI driver without involving creating the unstable folder? Since it seems that it creates more harm than good.

Thanks for your help

Sebastian Aslund

edit retag flag offensive close merge delete

Comments

Are you talking about "roscd pcl_ros"? Your path should also be defined in ~/.bashrc Let us know what you find there. Also, I'm afraid I can't find when the unstable directory is created. Which base version of ROS are you using? example: cturtle base.
Chad Rockey gravatar image Chad Rockey  ( 2011-02-21 17:22:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
5

answered 2011-02-22 02:24:35 -0500

Pi Robot gravatar image

updated 2011-02-22 03:37:36 -0500

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

edit flag offensive delete link more
2

answered 2011-02-22 19:20:38 -0500

KoenBuys gravatar image

you can check it by typing:

env | grep ROS

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-02-21 16:23:10 -0500

Seen: 2,423 times

Last updated: Feb 22 '11