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

Revision history [back]

click to hide/show revision 1
initial version

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: https://github.com/ros/rosdistro/blob/master/melodic/distribution.yaml

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

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

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: https://github.com/ros/rosdistro/blob/master/melodic/distribution.yaml

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

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: https://github.com/ros/rosdistro/blob/master/melodic/distribution.yaml

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.