0
$\begingroup$

Rosanswers logo

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

Originally posted by mikepurvis on ROS Answers with karma: 1153 on 2013-08-28

Post score: 11


Original comments

Comment by rohbotics on 2016-07-25:
For kinetic: rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

Comment by danielchen on 2020-03-09:
For melodic: rosdep install --from-paths src --ignore-src --rosdistro=melodic -y

Comment by pra-dan on 2020-10-28:
For noetic rosdep install --from-paths src --ignore-src --rosdistro=noetic -y

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by tfoote with karma: 58457 on 2013-08-28

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by William on 2013-08-28:
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.

Comment by mikepurvis on 2013-08-28:
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?

Comment by mikepurvis on 2013-08-28:
When I attempt the suggested invocation, I get a list of which "packages/stacks could not have their rosdep keys resolved to system dependencies"

Comment by William on 2013-08-28:
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

Comment by mikepurvis on 2013-08-28:
Excellent, thanks—that works perfectly.

Comment by Johannes Meyer on 2013-08-28:
@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".

Comment by William on 2013-08-28:
rosdep install can also take rosbuild packages and stacks which are on your RPP. See rosdep help

Comment by Johannes Meyer on 2013-08-29:
Filed a ticket for rosdep here: https://github.com/ros-infrastructure/rosdep/issues/268 .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.