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_generator
tool (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)