ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

'roscd package' for catkin packages moves to nearly empty directory

asked 2013-04-27 15:03:53 -0600

Pi Robot gravatar image


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.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-27 17:16:51 -0600

joq gravatar image


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.

edit flag offensive delete link more


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.

Pi Robot gravatar image Pi Robot  ( 2013-04-28 04:01:01 -0600 )edit

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.

William gravatar image William  ( 2013-04-29 06:42:32 -0600 )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



Asked: 2013-04-27 15:03:53 -0600

Seen: 441 times

Last updated: Apr 27 '13