0
$\begingroup$

Rosanswers logo

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


Originally posted by Aslund on ROS Answers with karma: 289 on 2011-02-21

Post score: 0


Original comments

Comment by Chad Rockey on 2011-02-21:
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.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by Pi Robot with karma: 4046 on 2011-02-22

This answer was ACCEPTED on the original site

Post score: 5

$\endgroup$
0
$\begingroup$

Rosanswers logo

you can check it by typing:

env | grep ROS


Originally posted by KoenBuys with karma: 2314 on 2011-02-22

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.