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

Update Fuerte to 1.8.10 breaks rospkg

asked 2012-06-27 05:34:53 -0600

updated 2012-07-02 05:50:45 -0600

joq gravatar image

Yesterday, I used apt-get to update my Fuerte to 1.8.10, and then I could no longer run a roscore. I was getting an error about the author tag in the file /opt/ros/fuerte/share/ros_comm/stack.xml. I did some searching and found this bug which said that it was a problem with rospkg that had been fixed in version 1.0.6.

The problem was fixed by running

sudo easy_install -U rospkg

My question is the following: Using ROS tools, how could I have automatically made this upgrade? Should rosdep be used to handle upgrades to components that are not installed via OS repositories?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
17

answered 2012-06-27 06:27:28 -0600

Lorenz gravatar image

updated 2012-06-29 01:46:15 -0600

Actually, rospkg should not be installed using easy_install or pip anymore. It is now provided by the Debian package python-rospkg which is probably already installed on your system since it is a dependency of ros. Just get rid of /usr/local/lib/python2.7/dist-packages/rospkg and the corresponding egg file if present.

Edit: I've investigated the issue a little more and it turns out that rospkg is installed when rosdep is installed according to the install instructions using easy_install or pip in /usr/local. So what I guess happened was that people installed ROS correctly in the first place, then came the breaking ROS update without any message that it's now necessary to also update rosdep/rospkg. So the correct solution, at least for now, is probably to update rospkg by hand using pip or easy_install. I hope this will be fixed soon.

edit flag offensive delete link more

Comments

I am having a similar problem. That fix did not work for me (on Oneiric). Although I have python-rospkg installed, it seems to be missing from $PATH.

joq gravatar image joq  ( 2012-06-27 07:22:22 -0600 )edit
1

The easy_install command (above) did work. Strangely, pip install did not. Something really screwy is going on here.

joq gravatar image joq  ( 2012-06-27 07:26:04 -0600 )edit

Interesting. For me getting rid of the easy_installed thing worked. Just out of curiosity, what was the python backtrace you were getting?

Lorenz gravatar image Lorenz  ( 2012-06-27 07:30:45 -0600 )edit

@joq with pip and easy_install I've had some issues with them creating a "build" directory in the current directory and if that already exists, it installs from there instead of the new version. Even if you use the -U option, and it downloads the new tarball.

tfoote gravatar image tfoote  ( 2012-06-27 14:19:58 -0600 )edit

Indeed, removing all references to the rospkg egg files, and relying on the already-installed version in python-rospkg also worked.

jarvisschultz gravatar image jarvisschultz  ( 2012-06-27 14:29:14 -0600 )edit

Could someone explain how to do this specifically? I've moved the egg files (never had a plain rospkg folder in the path listed above), fully uninstalled ros-fuerte (using apt-get, so maybe that won't reach everything), did a clean install, and roscore still errors out.

tbernhard gravatar image tbernhard  ( 2012-06-28 09:36:05 -0600 )edit

I can post a full backtrace if requested, but rosversion fails to load with the final error of "pkg_resources.DistributionNotFound: rospkg==1.0.4"

tbernhard gravatar image tbernhard  ( 2012-06-28 09:37:51 -0600 )edit

Sorry for the repeated posts. The easy_install solution seems to have worked. Is there a reason to prefer one solution over another? Thanks for the help

tbernhard gravatar image tbernhard  ( 2012-06-28 09:55:04 -0600 )edit
0

answered 2012-06-27 07:40:25 -0600

joq gravatar image

Not an answer, just posting the python backtrace (which can't be done in a comment)...

$ roscore
... logging to /home/joq/.ros/log/230a829e-c07c-11e1-bdb4-00248cfb2904/roslaunch-vision-4-25458.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/fuerte/bin/rosversion", line 76, in <module>
version = rosstack.get_stack_version(stack_name)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospkg/rospack.py", line 415, in get_stack_version
    return get_stack_version_by_dir(self.get_path(stack))
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospkg/rospack.py", line 470, in get_stack_version_by_dir
    m = parse_manifest_file(stack_dir, STACK_FILE)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospkg/manifest.py", line 346, in parse_manifest_file
    return parse_manifest(manifest_name, f.read(), filename)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospkg/manifest.py", line 407, in parse_manifest
    m.author = _check('author')(p, filename)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospkg/manifest.py", line 69, in check
    raise InvalidManifest("Invalid manifest file [%s]: must have a single '%s' element"%(filename, name))
rospkg.manifest.InvalidManifest: Invalid manifest file [/opt/ros/fuerte/share/ros/stack.xml]: must have a single 'author' element
Invalid <param> tag: Cannot load command parameter [rosversion]: command [rosversion ros] returned with code [1]. 

Param xml is <param command="rosversion ros" name="rosversion"/>
edit flag offensive delete link more

Comments

Actually, the path to rospkg in your backtrace doesn't look correct. Maybe another old version? python-rospkg installs its files into /usr/share/pyshared/rospkg

Lorenz gravatar image Lorenz  ( 2012-06-27 21:53:33 -0600 )edit

I have that one, plus one in /usr/local/lib/python2.7/dist-packages/rospkg-1.0.6-py2.7.egg (from easy_install), and a 0.12.10 version here: /opt/ros/fuerte/lib/python2.7/dist-packages/rospkg. Without the easy_install, I must have been picking up that one.

joq gravatar image joq  ( 2012-06-28 03:56:04 -0600 )edit

dpkg says the bogus version was installed by ros-fuerte-rospkg. I successfully deleted that. But, when I deleted the easy_install copy of rospkg, roscore started throwing another (similar) exception.

joq gravatar image joq  ( 2012-06-28 05:25:39 -0600 )edit

So for me, ros-fuerte-rospkg seems to be gone. Not installable through apt-get anymore. I guess it was replaced by python-rospkg. What's the rospkg path roscore tries to use now? :) I verified that in a clean installaton, all you should need is python-rospkg.

Lorenz gravatar image Lorenz  ( 2012-06-28 05:28:58 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2012-06-27 05:34:53 -0600

Seen: 3,525 times

Last updated: Jun 29 '12