Ask Your Question
1

Setting up workspace

asked 2012-07-20 12:27:27 -0500

DocSmiley gravatar image

I recently had to reinstall ros and roll back to electric. I have been trying to configure my system to use my ~/ros_workspace folder instead of the default /opt/ros/electric/ I've tried altering the ROS_PACKAGE_PATH and still cannot get ros to recognize that folder. roscd continues to take me to opt/ros/electric and will not locate my packages even when I explicitly call them. I've tried following all the instructions I could find in the tutorials and here in the forums, but I'm at a bit of a loss.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2012-07-20 21:13:15 -0500

KruseT gravatar image

updated 2012-07-20 21:16:44 -0500

First, switching a workspace from fuerte back to electric can always cause errors when compiling / building sources. Be aware of that. It is safer to create separate workspaces for different ROS versions.

Next, I suggest that you use rosws / rosinstall to create and manage your workspaces.

Third, open your .bashrc in some editor, and find any place mentioning ROS_ROOT, ROS_WORKSPACE, or setup.sh.

Delete all those lines. Regarding ROS, there should only be one line in your .bashrc, that reads:

source ~/ros_workspace/setup.sh

Even if it can work, managing the ROS_PACKAGE_PATH yourself almost always leads to bad ROS_PACKAGE_PATH in the long run and confusing errors.

edit flag offensive delete link more
0

answered 2012-07-20 12:32:13 -0500

cagatay gravatar image

updated 2012-07-20 12:36:28 -0500

I assume that your system is ubuntu and you are using bash shell

write

echo 'export ROS_PACKAGE_PATH="$ROS_PACKAGE_PATH:$HOME/ros_workspace"' >> ~/.bashrc

then run .bashrc in your shell

edit flag offensive delete link more

Comments

Manual management of the ROS_PACKAGE_PATH is not recommended and should be avoided. It's better to use rosws

Lorenz gravatar imageLorenz ( 2012-07-20 22:09:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-20 12:27:27 -0500

Seen: 1,646 times

Last updated: Jul 20 '12