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


asked 2012-10-07 03:20:49 -0600

Morpheus gravatar image

updated 2012-10-08 23:06:37 -0600

KruseT gravatar image

I have upgraded from Electric to Fuerte on Ubuntu 11.10. Every time I type roscd, I get No ROS_WORKSPACE set.

This is part of my bashrc:

#source /opt/ros/electric/setup.bash 
#source /opt/ros/electric/setup.bash
export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH
#source /opt/ros/electric/setup.bash
source  ~/
source /opt/ros/fuerte/setup.bash

source /opt/ros/fuerte/setup.bash

I appreciate any help.

edit retag flag offensive close merge delete


what do you get when you type "echo $ROS_WORKSPACE"

yigit gravatar image yigit  ( 2012-10-07 07:39:49 -0600 )edit

when I type echo $ROS_WORKSPACE, I don't get anything

Morpheus gravatar image Morpheus  ( 2012-10-07 10:05:16 -0600 )edit

As mentioned below, try adding the ros workspace in bashrc or Try creating a new workspace or overlay following the tutorials

sai gravatar image sai  ( 2012-10-07 16:13:34 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2012-10-08 23:10:05 -0600

KruseT gravatar image

In my opinion you would benefit from cleaning up your .bashrc, ideally there should only be one line in it regarding ROS workspaces, which could be:

$ source ~/ros_workspace/

This in ~/ros_workspace could best be created using rosws or rosinstall, and it would set the ROS_PACKAGE_PATH for you.

edit flag offensive delete link more


Lorenz gravatar image Lorenz  ( 2012-10-08 23:43:55 -0600 )edit

Except some people are still getting used to the idea of workspaces, remember how long it took me to drink the kool-aid...

jbohren gravatar image jbohren  ( 2012-10-09 05:00:46 -0600 )edit

answered 2012-10-07 10:12:43 -0600

jbohren gravatar image

In ROS Fuerte, calling roscd without any arguments switches the current directory to the path defined in $ROS_WORKSPACE.

See here:

edit flag offensive delete link more

answered 2012-10-07 13:14:17 -0600

yigit gravatar image

you need to add ROS_WORKSPACE to your bashrc. For example, if you create a directory called ros_workspace, you should add the following line to bashrc

export ROS_WORKSPACE=/home/user/ros_workspace

after that remember to do a

source ~/.bashrc
edit flag offensive delete link more



Except you don't need to do this. And it doesn't make sense if you're not using workspaces.

jbohren gravatar image jbohren  ( 2012-10-07 14:40:26 -0600 )edit

yes @jbohren is right, my bad. You don't "need to" define it if you won't use. I find it very useful, on the other hand. If you want to get somewhere when you type roscd and if ROS_WORKSPACE is not set beforehand, you have to define it. Am I correct @jbohren?

yigit gravatar image yigit  ( 2012-10-07 15:23:20 -0600 )edit

Yeah, using workspaces is definitely useful. The previous behavior of roscd was to go to where $ROS_ROOT is defined now. If you want the same behavior, really you should export ROS_WORKSPACE=$ROS_ROOT

jbohren gravatar image jbohren  ( 2012-10-07 17:19:44 -0600 )edit

Thanks guys. That makes sense

Morpheus gravatar image Morpheus  ( 2012-10-08 01:04:39 -0600 )edit

Question Tools


Asked: 2012-10-07 03:20:49 -0600

Seen: 4,335 times

Last updated: Oct 08 '12