Ask Your Question
0

Is rosversion broken on Groovy?

asked 2013-05-02 03:42:47 -0500

joq gravatar image

updated 2013-05-02 04:51:18 -0500

Recently, I've noticed problems with rosversion on Groovy:

$ rosversion roslaunch
Cannot locate [roslaunch]

It works with the -d flag, and it works on Hydro. I suspect my problem started around the time of the new rosdistro release.

Unfortunately, roscore runs that exact command, and exits when it fails.

Am I the only one seeing this?

UPDATE: I seem to have python-rospkg 1.0.20-1, probably from shadow-fixed. That must be the problem.

edit retag flag offensive close merge delete

Comments

rospkg is always deployed with the same version in all three repos - building, shadow-fixed and ros.

Dirk Thomas gravatar image Dirk Thomas  ( 2013-05-02 08:16:55 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
0

answered 2013-05-02 11:32:27 -0500

joq gravatar image

Piyush and I figured it out this afternoon. You're going to love this!

We had released a 3rd-party libfreenect package to Groovy. As suggested by the bloom tutorial, we added a package.xml, with this install command:

install(FILES package.xml DESTINATION share/${PROJECT})

Apparently, ${PROJECT} was not defined in that CMake file, so the file got installed directly in /opt/ros/groovy/share, instead of the desired /opt/ros/groovy/share/libfreenect. That had the unexpected effect of hiding all the wet Groovy packages, since package.xml is never resolved in a package subdirectory.

Fortunately, this only affected the two of us, because we had installed ros-groovy-libfreenect from the ros-shadow-fixed repository. We will release a fix shortly.

edit flag offensive delete link more
2

answered 2013-05-02 06:43:33 -0500

William gravatar image

updated 2013-05-02 08:24:16 -0500

You need to have roslaunch in your ROS_PACKAGE_PATH so that it can be found. rosversion does not work with rosdistro, it works locally. So, if it cannot find the package locally then it will fail like that:

% rosversion roslaunch
Cannot locate [roslaunch]

% groovy  # alias to source ~/groovy/ros_catkin_ws/install_isolated/setup.zsh

% rosversion roslaunch
1.9.41

EDIT:

The problem is that you have most likely unset or otherwise changed your ROS_PACKAGE_PATH such that roscore is on the PATH and roslaunch is on the PYTHON_PATH, but roslaunch is not on the ROS_PACKAGE_PATH.

EDIT:

Also make sure that rospkg is not installed via pip, an older version in pip might be overriding the version of rospkg which is getting used. You can double check the version like this:

python
>>> import rospkg
>>> rospkg.__version__
0.1.19
>>> rospkg.__file__
/some/path/which/should/be/under/usr/not/usr/local

And:

which rosversion

Should return somewher in /usr/ not /usr/local/.

edit flag offensive delete link more

Comments

I directly sourced /opt/ros/groovy/setup.bash. ROS_PACKAGE_PATH is /opt/ros/groovy/share:/opt/ros/groovy/stacks

joq gravatar image joq  ( 2013-05-02 06:55:19 -0500 )edit

I have to think then that your ROS_PACKAGE_PATH is getting messed up at run time then, I just read through the code and the only way you get that message is if roslaunch is not on your RPP.

William gravatar image William  ( 2013-05-02 06:56:42 -0500 )edit

Also, the code path is entirely within rospkg, it doesn't depend on rosdep or rosdistro to run.

William gravatar image William  ( 2013-05-02 06:57:10 -0500 )edit

So my rospkg.__file__ is in /usr/local/ how do I change it to /usr/ ?

Nigel gravatar image Nigel  ( 2013-08-01 00:05:32 -0500 )edit

If you're on Ubuntu, do `sudo pip uninstall rospkg` until it doesn't uninstall anything, then do `sudo apt-get install --reinstall python-rospkg`

William gravatar image William  ( 2013-08-01 07:18:57 -0500 )edit

Thanks William, that did the job

Nigel gravatar image Nigel  ( 2013-08-01 20:53:14 -0500 )edit

Booted the computer up today and rospkg is in '/usr/lib/pymodules/python2.7/rospkg/__init__.pyc' but rosversion is in /usr/local/bin/rosversion. How do I know get rosversion in the correct directory ?

Nigel gravatar image Nigel  ( 2013-08-02 15:45:13 -0500 )edit

There should be another copy in `/usr/bin/rosversion`, if there is you can remove the one in `/usr/local/bin/rosversion`.

William gravatar image William  ( 2013-08-03 08:17:13 -0500 )edit
1

answered 2013-05-02 04:37:51 -0500

It works for me:

dpkg -s python-rospkg | grep Version
  1.0.18-1
rosversion roslaunch
  1.9.44

Using ROS groovy, installed from latest debian packages from the primary release repository.

edit flag offensive delete link more

Comments

Thanks, that helps. I suspect the newer rosversion in shadow-fixed is the culprit. Issue here: https://github.com/ros/rospkg/issues/37

joq gravatar image joq  ( 2013-05-02 05:11:17 -0500 )edit
1

answered 2013-05-02 06:16:45 -0500

ahendrix gravatar image

Working for me, with the latest python-rospkg:

$ dpkg -l python-rospkg python-rosdistro ros-groovy-roslaunch
ii  python-rospkg  1.0.20-1       ROS package library
ii  python-rosdist 0.2.8-1        A tool to work with rosdistro files
ii  ros-groovy-ros 1.9.44-0precis roslaunch is a tool for easily launching mul
$ rosversion roslaunch
1.9.44

Is there something funny elsewhere on your ROS_PACKAGE_PATH? Can you roscd roslaunch?

edit flag offensive delete link more

Comments

No, I can't. Even when I source /opt/ros/groovy/setup.bash directly. ROS_PACKAGE_PATH is /opt/ros/groovy/share:/opt/ros/groovy/stacks

joq gravatar image joq  ( 2013-05-02 06:29:09 -0500 )edit

I have the same versions of those three packages.

joq gravatar image joq  ( 2013-05-02 06:31:09 -0500 )edit

Is roslaunch in /opt/ros/groovy/share ? Is there an /opt/ros/groovy/roslaunch/package.xml on your system?

ahendrix gravatar image ahendrix  ( 2013-05-02 06:47:15 -0500 )edit

Yes it is.

joq gravatar image joq  ( 2013-05-02 06:57:48 -0500 )edit

I'm out of actual ideas, so I'll start throwing out the usual Linux-isms: is your ROS_PACKAGE_PATH set and exported? Try: sh -c 'echo $ROS_PACKAGE_PATH' . Permissions problems? Are you executing the rosversion from /usr/bin/rosversion ?

ahendrix gravatar image ahendrix  ( 2013-05-02 07:06:06 -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: 2013-05-02 03:42:47 -0500

Seen: 689 times

Last updated: May 02 '13