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

Clone all packages from a yaml file?

asked 2018-12-18 04:25:53 -0500

For ROS2, you can clone all registered packages with a simple command:

vcs import ~/ros2_ws/src < ros2.repos

How can you do the same for the ROS 1 package listed in this yaml file:


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-18 06:30:15 -0500

gvdhoorn gravatar image

updated 2018-12-18 07:02:47 -0500


just checked and apparently rosinstall_generator accepts an ALL argument that: "specif[ies] all release packages":

  pkgname               catkin package names, rosbuild stack names or variant
                        names. Use 'RPP' to specify all packages available in
                        the current environment. Use 'ALL' to specify all
                        release packages (only usable as a single argument).

Running the following command gets me a .rosinstall file with approx 500 KB of info on all released packages in ROS Kinetic:

rosinstall_generator --rosdistro=kinetic --deps --tar ALL > all.rosinstall

Note that this also includes information on their dependencies. Adding --deps is probably not needed, as they can only depend on other ROS packages or system dependencies, and all ROS packages are already in the selection, but it won't hurt.

Note: this gets you a .rosinstall file for all packages at the currently released version (ie: released as of when you invoke that command).

For ROS2, you can clone all registered packages with a simple command: [..] How can you do the same for the ROS 1 package listed in this yaml file:

I don't believe there is tooling that will "clone all registered packages" for you. Or at least, not directly with/from that particular .yaml file. The ros2.repos file does not contain the same sort of abstractions / information as the distribution.yaml.

The former is a plain listing of repositories that vcs can clone for you (using git or another vcs tool), while distribution.yaml contains all sorts of meta-data about packages and repositories.

rosinstall_generator can use that information to generate a .rosinstall file for you that is (at least conceptually) the same as the ros2.repos file: .rosinstall files contain the same sort of information, but are typically consumed by wstool (vcs can also consume them).

As distribution.yaml is a plain .yaml file, you could consider creating a simple Python script that loads it and then uses the release dicts in it to clone a specific version of all packages registered for that distribution. I'm not aware of a tool that does this already, as it's not a typical use of distribution.yaml.

If you'd like to do things a little more structured, you could actually use rosinstall_generator to generate .rosinstall files specifically for a set of packages (so including their (transitive) dependencies).

You may actually be able to get rosinstall_generator to generate a .rosinstall file for all packages in the distribution.yaml though, by using certain parameters. I haven't checked whether that is possible.

edit flag offensive delete link more


This is (somewhat) related to the work we're doing with the rosinstall_generator_time_machine, but there we go back in time first and then generate .rosinstall files.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-18 06:31:17 -0500 )edit

Question Tools



Asked: 2018-12-18 04:25:53 -0500

Seen: 458 times

Last updated: Dec 18 '18