Ask Your Question

Install ROS dependencies from apt?

asked 2013-08-28 05:47:23 -0600

updated 2014-08-20 10:31:49 -0600

AFAICT, using apt packages is a bit of an all-or-nothing deal— you can either:

  1. install everything from apt, letting apt resolve dependencies, or

  2. install everything from a rosinstall, letting rosinstall_generator resolve them.

The obvious thing for a mature package is to install the latest release from apt, and then use rosinstall to create an overlay which you can hack on. But this is not a great solution for packages which are not yet released, perhaps because they are still experimental, in early development, etc.

Am I mistaken here, or is there some ROS invocation which can scan the package.xml dependencies of a workspace, and then spit out (or execute) the necessary apt-get install command? Or is the solution to just create apt releases from the earliest possible point?

For future travellers, here are some cut and paste friendly versions of the incantation given below by @tfoote:

rosdep install --from-paths src --ignore-src --rosdistro=groovy -y
rosdep install --from-paths src --ignore-src --rosdistro=hydro -y
rosdep install --from-paths src --ignore-src --rosdistro=indigo -y
rosdep install --from-paths src --ignore-src --rosdistro=jade -y
edit retag flag offensive close merge delete



For kinetic: rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

rohbotics gravatar imagerohbotics ( 2016-07-25 13:03:54 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-08-28 07:00:12 -0600

tfoote gravatar image

If you have a catkin WORKSPACE with some sources checked out and you want all the rosdep dependencies installed use the following

rosdep install --from-paths WORKSPACE --ignore-src --rosdistro=ROSDISTRO
edit flag offensive delete link more


You can add `--yes` to confirm all actions automatically, and you can add `--simulate` to see what rosdep would do before it commits to installing the things.

William gravatar imageWilliam ( 2013-08-28 07:23:25 -0600 )edit

Unless I'm mistaken, rosdep is still only handling "system" dependencies, not dependencies on the apt packages which correspond to ROS packages. Does rosdep in fact cover both scenarios?

mikepurvis gravatar imagemikepurvis ( 2013-08-28 07:45:51 -0600 )edit

When I attempt the suggested invocation, I get a list of which "packages/stacks could not have their rosdep keys resolved to system dependencies"

mikepurvis gravatar imagemikepurvis ( 2013-08-28 07:46:11 -0600 )edit

rosdep will resolve all system dependencies defined in the rosdep database and any released ros packages into their apt-get names, e.g. `catkin` => `ros-hydro-catkin`

William gravatar imageWilliam ( 2013-08-28 07:52:06 -0600 )edit

Excellent, thanks—that works perfectly.

mikepurvis gravatar imagemikepurvis ( 2013-08-28 09:30:10 -0600 )edit

@William: Is this only valid for catkin packages? For rosbuild package with unknown dependencies rosdep install returns an error: "ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: test_package: Missing resource ackermann_msgs".

Johannes Meyer gravatar imageJohannes Meyer ( 2013-08-28 11:10:54 -0600 )edit

`rosdep install` can also take rosbuild packages and stacks which are on your RPP. See `rosdep help`

William gravatar imageWilliam ( 2013-08-28 12:04:55 -0600 )edit
Johannes Meyer gravatar imageJohannes Meyer ( 2013-08-29 03:15:06 -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-08-28 05:47:23 -0600

Seen: 17,293 times

Last updated: Aug 20 '14