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

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

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

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

source ~/ros_workspace/

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

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


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

then run .bashrc in your shell

edit flag offensive delete link more


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 -0500 )edit

Question Tools


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

Seen: 1,727 times

Last updated: Jul 20 '12