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

Install ROS dependencies from apt?

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

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

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

Comments

2

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

rohbotics gravatar image rohbotics  ( 2016-07-25 13:03:54 -0500 )edit
1

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

danielchen gravatar image danielchen  ( 2020-03-09 02:42:02 -0500 )edit

For noetic rosdep install --from-paths src --ignore-src --rosdistro=noetic -y

pra-dan gravatar image pra-dan  ( 2020-10-28 04:32:50 -0500 )edit

1 Answer

Sort by » oldest newest most voted
7

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

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

Comments

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 image William  ( 2013-08-28 07:23:25 -0500 )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 image mikepurvis  ( 2013-08-28 07:45:51 -0500 )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 image mikepurvis  ( 2013-08-28 07:46:11 -0500 )edit
1

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 image William  ( 2013-08-28 07:52:06 -0500 )edit

Excellent, thanks—that works perfectly.

mikepurvis gravatar image mikepurvis  ( 2013-08-28 09:30:10 -0500 )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 image Johannes Meyer  ( 2013-08-28 11:10:54 -0500 )edit
1

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

William gravatar image William  ( 2013-08-28 12:04:55 -0500 )edit
Johannes Meyer gravatar image Johannes Meyer  ( 2013-08-29 03:15:06 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2013-08-28 05:47:23 -0500

Seen: 23,933 times

Last updated: Aug 20 '14