Robotics StackExchange | Archived questions

Partial hydro install missing ROS_ROOT variable

I'm using hydro to test drcsim using rosbuild, and I have had instances where the ROSROOT environment variable was not set. I did not have a full install of hydro, just a few packages. Not having the ROSROOT environment variable can actually break roswtf.

To reproduce, remove all hydro packages, install ros-hydro-roswtf, source the setup script and run roswtf.


$ sudo apt-get update
$ sudo apt-get remove ros-hydro-*
$ sudo apt-get install ros-hydro-roswtf
$ . /opt/ros/hydro/setup.bash
$ env | grep ROS
ROSPACKAGEPATH=/opt/ros/hydro/share:/opt/ros/hydro/stacks
ROSMASTERURI=localhost:11311
ROSDISTRO=hydro
ROSETCDIR=/opt/ros/hydro/etc/ros
$ roswtf
Traceback (most recent call last):
  File "/opt/ros/hydro/bin/roswtf", line 35, in 
    roswtf.roswtfmain()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roswtf/init.py", line 87, in roswtfmain
    _roswtfmain()
  File "/opt/ros/hydro/lib/python2.7/dist-packages/roswtf/init.py", line 141, in roswtfmain
    error = rosrootcheck(None, rosroot=os.environ['ROSROOT'])
  File "/usr/lib/python2.7/UserDict.py", line 23, in getitem
    raise KeyError(key)
KeyError: 'ROS_ROOT'
$

Asked by scpeters on 2013-09-12 10:30:55 UTC

Comments

Answers

After some help from @dirk-thomas, we identified ros-hydro-rosbuild as the provider of ROS_ROOT. So the answer is to make sure you have rosbuild installed if you need the ROS_ROOT variable.

Asked by scpeters on 2013-09-12 10:33:28 UTC

Comments