0
$\begingroup$

Rosanswers logo

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

wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
vcs import ~/ros2_ws/src < ros2.repos

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

Thanks.


Originally posted by Zhoulai Fu on ROS Answers with karma: 186 on 2018-12-18

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-12-18

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by gvdhoorn on 2018-12-18:
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.

$\endgroup$

Your Answer

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