Ask Your Question
4

What's the best way to package ROS?

asked Feb 22

hauptmech gravatar image hauptmech
41 1 5

updated Feb 23

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?

delete close flag offensive retag edit

Comments

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

joq (Feb 22)edit

3 Answers

Sort by ยป oldest newest most voted
4

answered Feb 22

kwc gravatar image kwc
7078 23 67 117
http://kwc.org/

updated Feb 23

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.

link delete flag offensive edit

Comments

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

hauptmech (Feb 23)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 (Feb 23)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 (Feb 23)edit
1

answered Feb 22

dornhege gravatar image dornhege
7708 8 69 148
http://gki.informatik.uni...

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.

link delete flag offensive edit

Comments

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

hauptmech (Feb 22)edit
1

answered Mar 20

Sebastian Schneider gravatar image Sebastian Schneider
31 5

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>.

link delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: Feb 22

Seen: 210 times

Last updated: Mar 20

Related questions