Partial hydro install missing ROS_ROOT variable [closed]
I'm using hydro to test drcsim using rosbuild, and I have had instances where the ROS_ROOT environment variable was not set. I did not have a full install of hydro, just a few packages. Not having the ROS_ROOT 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
ROS_PACKAGE_PATH=/opt/ros/hydro/share:/opt/ros/hydro/stacks
ROS_MASTER_URI=localhost:11311
ROS_DISTRO=hydro
ROS_ETC_DIR=/opt/ros/hydro/etc/ros
$ roswtf
Traceback (most recent call last):
File "/opt/ros/hydro/bin/roswtf", line 35, in <module>
roswtf.roswtf_main()
File "/opt/ros/hydro/lib/python2.7/dist-packages/roswtf/__init__.py", line 87, in roswtf_main
_roswtf_main()
File "/opt/ros/hydro/lib/python2.7/dist-packages/roswtf/__init__.py", line 141, in _roswtf_main
error = ros_root_check(None, ros_root=os.environ['ROS_ROOT'])
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'ROS_ROOT'
$