0
$\begingroup$

Rosanswers logo

Hello all,

We have a large workspace with plenty packages coming from third party developers. At its moment, dependencies of those packages where solved using rosdep.

However, for documentation purposes we need the complete list of dependencies of all packages.

Is there a way of automatically generate that dependencies list? Something like an option on rosdep to not install anything, but just list all dependencies and output them to console or file.

So far I haven't find such a tool.

Thank you and best regards.

Edit:

Just tested rosdep with --simulate --reinstall options in a new workspace where some source has been placed.

First we run with --simulate:

rosdep install --simulate --from-paths ~/workspaces/project/src --ignore-src
#[apt] Installation commands:
  sudo -H apt-get install ros-indigo-hokuyo-node

It successfully list a ROS package dependency.

If we run also with --reinstall:

rosdep install --simulate --reinstall --from-paths ~/workspaces/project/src --ignore-src
#[apt] Installation commands:
  sudo -H apt-get install ros-indigo-hokuyo-node
  sudo -H apt-get install libeigen3-dev

And it additionally shows an already installed non-ROS dependency.

We now install missing dependencies using rosdep:

rosdep install --from-paths ~/workspaces/project/src --ignore-src

And after that, we run it again with --simulate --reinstall options:

rosdep install --simulate --reinstall --from-paths ~/workspaces/project/src --ignore-src
#[apt] Installation commands:
  sudo -H apt-get install libeigen3-dev

It successfully lists the non-ROS dependency, but doesn't list the ROS dependency.

Running it without --reinstall just gives emply output, as all dependencies are already installed:

rosdep install --simulate --from-paths ~/workspaces/project/src --ignore-src

So its seems that rosdep --reinstall only lists/reinstalls non-ROS packages. Is that the expected --reinstall behaviour?


Originally posted by IvanV on ROS Answers with karma: 329 on 2017-01-11

Post score: 8

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can use the --simulate and --reinstall with --ignore-src to get the list I think you want like this: rosdep install -si --reinstall --from-path ~/path/to/src/


Originally posted by tfoote with karma: 58457 on 2017-01-11

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by IvanV on 2017-01-12:
Wow. I completely missed that option. However, that command is only showing me the unmatched dependencies and not the ones already installed. Using rosdep install -s --reinstall and rosdep check gives me the same list of packages (and I know for sure that plenty of packages where installed).

Comment by IanCol on 2019-04-12:
I am also struggling to figure this out, all I'm trying to do is generate a list of apt package dependencies from a set of multiple ros packages.

Comment by tfoote on 2019-04-12:
If you have packages already installed on your system you can also use rospack depends <PACKAGE> however it won't do the rosdep resolution automatically to alias it to the debian package names. So that combined with rospack list and a little scripting can get you what you want. Or you can use the rospkg and rosdep python API to write a python script that does exactly what you want. This is what we do on the buildfarm.

Comment by IanCol on 2019-04-13:
Thanks for responding! I did end up hacking up a mess of a bash script, I'll try the python API next time. If it comes out clean, I'll try to share it here. Thanks!

$\endgroup$

Your Answer

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