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

Setting up workspace

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

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 -0600

KruseT gravatar image

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

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 -0600

cagatay gravatar image

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

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 image Lorenz  ( 2012-07-20 22:09:00 -0600 )edit

Question Tools

Stats

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

Seen: 1,747 times

Last updated: Jul 20 '12