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

Setting up ROS Groovy - can't launch roscore

asked 2012-11-07 20:49:32 -0500

Ibrahim gravatar image

updated 2012-12-09 02:10:41 -0500

Kevin gravatar image

Hi all!

I'm trying to get set up with the MoveIt! framework (which, incidentally, is quite well written for beta code :D) but I'm actually having trouble setting up ROS Groovy. I installed the debs for Groovy beta on Ubuntu 12.04 and things seem to have installed correctly, however I can't get a roscore to start up. It looks like rospack.py is unable to find paths for some reason, judging from the errors I'm getting.

Traceback (most recent call last):
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/__init__.py", line 263, in main
    p.start()
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/parent.py", line 257, in start
    self._start_infrastructure()
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/parent.py", line 206, in _start_infrastructure
    self._load_config()
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/parent.py", line 121, in _load_config
    self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port, verbose=self.verbose)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/config.py", line 415, in load_config_default
    load_roscore(loader, config, verbose=verbose)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/config.py", line 86, in load_roscore
    f_roscore = get_roscore_filename()
  File "/opt/ros/groovy/lib/python2.7/dist-packages/roslaunch/config.py", line 78, in get_roscore_filename
    return os.path.join(r.get_path('roslaunch'), 'resources', 'roscore.xml')
  File "/usr/local/lib/python2.7/dist-packages/rospkg/rospack.py", line 149, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: roslaunch
ROS path [0]=/opt/ros/groovy/share/ros
ROS path [1]=/opt/ros/groovy/share
ROS path [2]=/opt/ros/groovy/stacks

Other ROS tools such as rosgraph also give similar errors. Debugging in IPython points out that the RosPack._location_cache variable is simply an empty dict.

I'm trying to debug further and figure out what the issue is, but if anyone knows what the problem might be that would save me some time. Any help is appreciated!

Update1:

For reference, here are my ROS related environment variables:

$ env | grep ROS
ROS_ROOT=/opt/ros/groovy/share/ros
ROS_PACKAGE_PATH=/opt/ros/groovy/share:/opt/ros/groovy/stacks
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=groovy
ROS_DISTRO=groovy
ROS_ETC_DIR=/opt/ros/groovy/etc/roslib

Figured out part of the problem was that ROS_ETC_DIR should have been /opt/ros/groovy/etc/ros instead of /roslib. Now I get this:

Cannot locate [roslaunch]Invalid <param> tag: Cannot load command parameter [rosversion]: command [rosversion roslaunch] returned with code [1].
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-11-07 21:49:07 -0500

Ibrahim gravatar image

updated 2012-11-07 22:35:32 -0500

Eh, figured out the issue. manifest.xml was renamed to package.xml and rospkg/rospack.py on my system is still the old version which is looking for manifest.xml so it thinks I have no packages installed. For the time being I'm going to just stick the newest version of rospkg from github (https://github.com/ros/rospkg) on my PYTHONPATH ahead of everything else. To add a question to a question though, is there an updated deb for python-rospkg or is this the best way to work on Groovy stuff right now?

Actually, I think the proper solution for now is to use virtualenv? I thought maybe I could install an updated version of rospkg without messing with the system version but setuptools isn't cooperating.

Edit: I guess I just decided to clobber the system version since I don't think virtualenv would really work here anyway.

edit flag offensive delete link more

Comments

I'm having the same problem. Can you please explain a little bit in detail how did you solve it? I'm a little bit new to this python business.

Pouya gravatar image Pouya  ( 2012-11-19 23:04:55 -0500 )edit

I seem to have the exact same problem, could provide some more details on how you fixed it? Thanks!

svepe gravatar image svepe  ( 2012-11-27 04:48:05 -0500 )edit

I actually just cloned that repository I linked to and then ran sudo python setup.py install which installs the repository version over the system package. This isn't a good idea in general though because it will cause apt to yell at you later.

Ibrahim gravatar image Ibrahim  ( 2012-11-30 21:03:35 -0500 )edit

You probably installed rospkg, rosinstall, etc using PIP once. The correct solution is to get rid of the PIP installation and use the debian packages. Related answer: http://answers.ros.org/question/37397/update-fuerte-to-1810-breaks-rospkg/#37402

Lorenz gravatar image Lorenz  ( 2012-12-06 01:50:04 -0500 )edit

Ah thanks, that explains a lot. I'll purge the PIPpy packages then.

Ibrahim gravatar image Ibrahim  ( 2012-12-18 16:20:08 -0500 )edit

As a side note, after uninstalling rospkg, rosinstall and rosdep using pip, I had to reinstall the system packages python-rospkg, python-rosinstall and python-rosdep (with apt-get install --reinstall).

pgorczak gravatar image pgorczak  ( 2013-01-14 04:05:37 -0500 )edit
0

answered 2012-12-06 01:02:01 -0500

svepe gravatar image

updated 2012-12-06 23:09:12 -0500

After further investigation I found out that the following exports should be put in .bashrc after calling the source.sh in your workspace:

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/opt/ros/groovy/share:/opt/ros/groovy/stacks
export ROS_ETC_DIR=/opt/ros/groovy/etc/ros
edit flag offensive delete link more

Comments

Managing ROS_PACKAGE_PATH manually is not recommended. Instead, you should use tools such as rosws and wstool.

Lorenz gravatar image Lorenz  ( 2012-12-07 00:05:45 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2012-11-07 20:49:32 -0500

Seen: 4,050 times

Last updated: Dec 06 '12