0
$\begingroup$

Rosanswers logo

So I know using rosdep install will install the dependencies for a given package. However I need to get a list of all the system dependencies for a given package. Is there a way to get the corresponding apt-get entries in the rosdep database given the rosdep key?

i.e the foo rosdep key has this entry in the database:

foo:
  ...
  debian: [package1,package2,...]
  ...

Is there a command that will return package1 packag2 ... with rosdep?


Originally posted by theNerd247 on ROS Answers with karma: 128 on 2015-10-29

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

This command will return all system dependencies for a given ROS package (I explicitly specified OS name and ROS version):

$ rosdep keys image_transport --rosdistro=jade --os=ubuntu:trusty | xargs rosdep resolve
#ROSDEP[rosconsole]
#apt
ros-indigo-rosconsole
#ROSDEP[catkin]
#apt
ros-indigo-catkin
#ROSDEP[roscpp]
#apt
ros-indigo-roscpp
#ROSDEP[message_filters]
#apt
ros-indigo-message-filters
#ROSDEP[pluginlib]
#apt
ros-indigo-pluginlib
#ROSDEP[roslib]
#apt
ros-indigo-roslib
#ROSDEP[sensor_msgs]
#apt
ros-indigo-sensor-msgs

You can filter it further to get only dependencies:

rosdep keys image_transport --rosdistro=jade --os=ubuntu:trusty| xargs rosdep resolve | grep -v "#"
ros-indigo-rosconsole
ros-indigo-catkin
ros-indigo-roscpp
ros-indigo-message-filters
ros-indigo-pluginlib
ros-indigo-roslib
ros-indigo-sensor-msgs

This might not be what you are looking for since it's not recursive and it works only for ROS packages (not rosdep keys).


Originally posted by Mani with karma: 1704 on 2015-10-29

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by theNerd247 on 2015-10-29:
Exactly what I needed. Thanks! Recursion can be done using a simple bash script.

$\endgroup$
0
$\begingroup$

Rosanswers logo

If you just want to go from rosdep keys to system dependencies, rosdep resolve is what you're looking for. If you want to go from a package name to system dependencies, you can use rosdep keys along with rosdep resolve like rosdep keys [foo_pkg] | xargs rosdep resolve.


Originally posted by Dan Lazewatsky with karma: 9115 on 2015-10-29

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by theNerd247 on 2015-10-29:
Thanks for explaining the difference between these commands. The rosdep documentation is rather slim and vague.

$\endgroup$

Your Answer

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