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

How are the "repos" yaml files generated?

asked 2022-02-19 13:46:55 -0500

Christian Rauch gravatar image

The "building ROS2 from source" instructions at https://docs.ros.org/en/foxy/Installa... use a "repos" file in yaml format: https://raw.githubusercontent.com/ros....

How is this file generated?

In ROS1, this kind of file was generated with the rosinstall_generatortool (http://wiki.ros.org/Installation/Sour...). Is there something similar for ROS2?

I am asking because I would like to build ROS2 from source with fewer irrelevant packages (e.g. without any of ros-visualization or without ros2/rviz). The only workarounds to prevent building irrelevant packages are 1) removing packages from the repos file manually, 2) deleting source folders after the complete checkout, or 3) by placing COLCON_IGNORE files.

But there surely must be a better way by just specifying the packages of interest and generating the "repos" file programmatically.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-20 03:41:42 -0500

gvdhoorn gravatar image

updated 2022-02-21 03:27:39 -0500

The "building ROS2 from source" instructions [..] use a "repos" file in yaml format. [..] How are the "repos" yaml files generated?

IIRC, that specific file is not generated by any tool. It's a manually managed file which was historically only used for CI purposes and for building ROS 2 from source by core developers. At some point it got repurposed to also be used by 'regular users' to build ROS 2 on their own machines.

That file does not contain "everything ROS 2", and for good reason: nightly builds of ROS 2 based on the contents of that file already sometimes time-out -- or at the very least take a (very) long time, as everything in there is built as part of a single build.

There have been quite a few PRs which wanted to add more packages to that file (and files similar to it) simply because such builds do not scale.

This comment by @clalancette highlights the difference between repos.yaml and whatever a tool like rosinstall_generator will generate:

Before we make changes here, I think it is worthwhile to define the target audience of the build-from-source instructions.

If the target audience is "people who can't use the binary packages, but just want to use ROS 2", then I agree that switching to rosinstall_generator is better. It will get them something closer to what the Debian packages are providing.

But if the target audience is "people who want to work on the core of ROS 2", the situation is murkier to me. The current instructions more-or-less follow how the CI jobs work (at least on Linux and macOS; Windows is now totally different). That means that if a user checks things out in that way, and runs the appropriate tests, there is a good chance that things will work on the CI job when they open a PR. If we switch to rosinstall_generator for the instructions, then that is further away from what CI does.

There is a way to resolve this discrepancy, which is to make the CI jobs use rosinstall_generator. That is one of the long-term goals I would like to get done for ROS 2, so maybe it is worthwhile addressing that first.

As you already noticed, rosinstall_generator will create an even larger .repos file for you. That's the discrepancy Chris refers to.

In ROS1, this kind of file was generated with the rosinstall_generatortool (http://wiki.ros.org/Installation/Sour...). Is there something similar for ROS2?

You can still use rosinstall_generator.

ROS 2 packages are still released using Bloom, which still pushes commits to ros/rosdistro. That information is the same as used by rosinstall_generator with ROS 1.

.repos files can be generated by dirk-thomas/vcstool, but vcs also supports the .rosinstall format. If you really want to have .repos files, append --format=repos to your rosinstall_generator command line.

A few older/related Q&As: #q378063, #q299473, #q339570, #q379624 (with linked Discourse discussion: Core, base and desktop releases), #q319587 and #q325245.

The only workarounds ...

(more)
edit flag offensive delete link more

Comments

Thanks. While this certainly can reduce the number of downloaded source packages, I am still having trouble somehow replicating the repo file. Generating a minimal installation via rosinstall_generator ros_core --rosdistro galactic --deps --format=repos > base.repos still adds more repos (166 via cat base.repos | grep "type: git" | wc -l) than what is found in the "official" ros2.repos (102). This file may be generated manually, but do you manage to include all the visualization packages without the ros_core? I also noticed that the git repos are different.

Christian Rauch gravatar image Christian Rauch  ( 2022-02-20 09:35:35 -0500 )edit

I'm not sure I understand what you're asking when you say:

This file may be generated manually, but do you manage to include all the visualization packages without the ros_core?

ros_core doesn't include any UI-based packages, and that's on purpose.

Or are you asking how to download the sources for all UI-based packages that are not in ros_core, but without also downloading ros_core packages?

gvdhoorn gravatar image gvdhoorn  ( 2022-02-21 03:26:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-02-19 13:46:55 -0500

Seen: 170 times

Last updated: Feb 21 '22