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

What's the best way to package ROS?

asked 2012-02-21 21:04:24 -0500

hauptmech gravatar image

updated 2012-02-22 21:23:00 -0500

Presently ROS has packages for Ubuntu and a source distribution for everyone else. I'd like to put together a package for my distro (archlinux) so I can install it across multiple computers efficiently.

Are there best practices for this? For a system installation of ROS? Are there packaging scripts that can be referenced or modified to support other packagers?

It appears that in ROS, each package has dependencies that are a mix of ROS packages and distribution packages; and that some ROS packages exist only because Ubuntu does not distribute the correct version for ROS.

Other distributions will have a different combo of package versions. They might be missing a version that Ubuntu has (thus wanting ROS to build the correct version from source) or they might have the correct version where Ubuntu did not.

How do I determine the expected (package) version of each package dependency?

edit retag flag offensive close merge delete

Comments

ROS evolves rapidly. Understand that maintaining this is going to be a significant long-term commitment.

joq gravatar image joq  ( 2012-02-22 03:26:07 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-02-22 06:09:16 -0500

kwc gravatar image

updated 2012-02-22 21:36:37 -0500

rosdep is the cross-platform tool for managing how system dependencies are installed. It contains support for Arch, though I'm not sure how well used it is.

That said, the problem noted has some incorrect assumptions:

"I just spent a day installing ROS and watching it's dependency system compile a pile of software that's already installed in my system (PCL, Gazebo, orocos, etc)."

Each release of ROS requires a very specific version of PCL, Gazebo, Orocos, etc... ROS recompiles its own versions so that everything works together. You might not get very far attempting to compile against your own system installed versions of these libraries as PCL and Gazebo have non-backwards-compatible API changes in recent releases.

Starting in ROS Fuerte, PCL and OpenCV are treated as system dependencies via rosdep, which means that you could attempt to start using rosdep in this way. In Groovy, Gazebo will likely get the same treatment. However, you will probably quickly find, as joq notes, that it takes much more time than you think to save disk space.

EDIT: in response to the updated question, my answer remains the same. If ROS builds it, you should build it as well. Only dependencies modelled by rosdep can be substituted with your platform's system dependencies. The version to use is "If ROS builds it from source, use that version. If ROS treats it as a rosdep, look at the rosdep.yaml database and pick whatever version is closest on your platform."

Starting in ROS Fuerte, many of the lower level stacks are close to FHS compliant, and thus easy to repackage for other distributions. As for system dependencies that are repackaged in ROS, you simply cannot substitute system dependencies for them due to the way the build system works (and there are often patches that you need). The goal is to eliminate most re-packaged system dependencies when Ubuntu Precise is available, so this will be much improved by the ROS Groovy release.

edit flag offensive delete link more

Comments

Thanks for the additional insight. The goal of packaging ROS is to avoid recompiling for each machine I install it on.

hauptmech gravatar image hauptmech  ( 2012-02-22 20:39:20 -0500 )edit

I don't see version info in rosdep.yaml nor in REP 111. Does this mean that for every ros dependency I need to search the ubuntu databases for the version used?

hauptmech gravatar image hauptmech  ( 2012-02-22 22:36:25 -0500 )edit

If it's a declared rosdep without a version I suggest trying whatever is available in your package manager. If it doesn't work I'd compare to the ubuntu version and see if there's any differences. For most mature packages it shouldn't be a problem.

tfoote gravatar image tfoote  ( 2012-02-23 05:38:02 -0500 )edit
1

answered 2012-02-21 23:22:34 -0500

dornhege gravatar image

Currently a ROS installation looks like a source based install, just that it resides in system wide paths (e.g. /opt/ros/electric). Installation packages are usually on a per-stack basis. The reason for compiling software like pcl might be that ROS is using another version then the system install.

That being said, please have a look at REP 122 ff as the installation layout will change dramatically for fuerte looking more like a "normal" system package.

edit flag offensive delete link more

Comments

Is there a standard way to strip out the /build and /src folders? A make target perhaps?

hauptmech gravatar image hauptmech  ( 2012-02-22 04:52:11 -0500 )edit
1

answered 2012-03-19 23:57:55 -0500

Sebastian Schneider gravatar image

I'm an arch user as well, and since I didn't want to package ROS myself, I just took the ubuntu packages, and built a PKGBUILD around it. I made it for the current ros-electric-base version 1.0.0, but I suppose you could do something similar for furte or the desktop packages.

The PKGBUILD does a bit more than installing the files that are contained in the *.deb files, such as:

  • Changes /usr/bin/python and /usr/bin/env python to python2, such that you don't have to modify your python symlink, which on arch probably points to python3.
  • Contains 2 patches that make rosdep work with pacman.
  • Generates some symlinks to libboost and 2 other libs. This is kind of dirty, but the *.deb files were compiled against some older libraries, e.g. boost-1.46, but arch already is at 1.49. I could have masked newer versions of boost, but I always like to have the newest versions (one reason why I use arch), and as long as the API doesn't change a lot, you should be fine. But feel free to modify the PKGBUILD to your needs.

You'll find the necessary files following the links below. Just place the files in a folder in your abs-directory and call makepkg. The resulting package (*.tar.xz) can be installed with pacman -U <packagename>.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-02-21 21:04:24 -0500

Seen: 822 times

Last updated: Mar 19 '12