Ask Your Question
1

No ROS_WORKSPACE set

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

Morpheus gravatar image

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

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 
export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}
#source /opt/ros/electric/setup.bash
export ROS_PACKAGE_PATH=~/ros_workspace:$ROS_PACKAGE_PATH
#source /opt/ros/electric/setup.bash
source  ~/setup.sh
source /opt/ros/fuerte/setup.bash

source /opt/ros/fuerte/setup.bash

I appreciate any help.

edit retag flag offensive close merge delete

Comments

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

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

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

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

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

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

3 Answers

Sort by ยป oldest newest most voted
3

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

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/setup.sh

This setup.sh 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

Comments

Lorenz gravatar image Lorenz  ( 2012-10-08 23:43:55 -0500 )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 -0500 )edit
1

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

jbohren gravatar image

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

See here: http://www.ros.org/wiki/ROS/Tutorials/NavigatingTheFilesystem#Special_cases_for_roscd

edit flag offensive delete link more
0

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

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

Comments

1

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

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

Thanks guys. That makes sense

Morpheus gravatar image Morpheus  ( 2012-10-08 01:04:39 -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-10-07 03:20:49 -0500

Seen: 4,056 times

Last updated: Oct 08 '12