Rosanswers logo


I'm running ROS Groovy (Debian install) under Ubuntu 12.04. I noticed that when using 'roscd' to move into a catkin package that is installed in the system directories, I am taken to a nearly empty directory /opt/ros/groovy/share/package with (usually) just a package.xml file and cmake directory. The binaries and scripts for such packages typically live under /opt/ros/groovy/lib/package. I find this behavior somewhat odd and counter productive since in the good old days, I could use 'roscd package' to explore the files in a package. Here's an example:

$ roscd kobuki_driver
$ ls
cmake  package.xml

The actual driver files are in /opt/ros/groovy/lib/kobuki_driver:

$ cd /opt/ros/groovy/lib/kobuki_driver
$ ls
demo_kobuki_initialisation  demo_kobuki_simple_loop   version_info
demo_kobuki_sigslots        kobuki_velocity_commands

Do I have something wrong with my ROS setup? Running the startup command:

source /opt/ros/groovy/setup.bash

sets my ROS_PACKAGE_PATH to:


which does not include /opt/ros/groovy/lib but when I add it, it does not fix the problem.

I really hope this is not the expected behavior for catkin packages going forward.


Originally posted by Pi Robot on ROS Answers with karma: 4046 on 2013-04-27

Post score: 2


1 Answer 1


Rosanswers logo


That is the expected behavior. Files for a catkin package are no longer installed in a single directory. The place where roscd takes you is a directory containing miscellaneous files for that package, mainly its package.xml.

REP-0122 explains the new layout in detail and the reasons for changing it.

These changes were not made for casual reasons. One of the goals of catkin was to build binary packages that install using the Linux filesystem hierarchy standard. That will be necessary if we ever want to distribute ROS packages through the various Linux distribution channels.

Because the sources are no longer included in binary packages, using roscd to study the packages you use is no longer particularly useful. Instead, you can install the corresponding Debian source package, from which that binary was built.

Originally posted by joq with karma: 25443 on 2013-04-27

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Pi Robot on 2013-04-28:
Thanks @joq. I also used roscd to find and examine the numerous ROS nodes written in Python which don't require installation of the Debian source packages. Oh well, I guess I'll just rely on the 'locate' command.

Comment by William on 2013-04-29:
As @joq said you can grab the src-deb for any of the released catkin packages, or you can grab to source code directly from the repository. Now that we have the new rosdistro deployed we are going to try and update tools liks roslocate which can help you find and fetch the source for a package.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.