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

Get apt-get dependencies given rosdep key

asked 2015-10-29 12:46:52 -0500

theNerd247 gravatar image

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-10-29 13:32:37 -0500

Mani gravatar image

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

edit flag offensive delete link more

Comments

1

Exactly what I needed. Thanks! Recursion can be done using a simple bash script.

theNerd247 gravatar image theNerd247  ( 2015-10-29 13:53:30 -0500 )edit
1

answered 2015-10-29 13:21:55 -0500

updated 2015-10-29 13:22:39 -0500

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.

edit flag offensive delete link more

Comments

Thanks for explaining the difference between these commands. The rosdep documentation is rather slim and vague.

theNerd247 gravatar image theNerd247  ( 2015-10-29 13:53:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-29 12:46:52 -0500

Seen: 418 times

Last updated: Oct 29 '15