ROS2 yocto meta layer

Update from my side: I managed to build ROS2 dashing into a openembedded warrior setup.

The code still lives here: github.com/windelbouwman/meta-ros2-generator

Benefits of this repository over the meta-ros one:

  • yocto warrior support
  • no DISTRO variable in the bblayers file
  • No custom build of python3.7
  • bbappend files instead of inc files (not sure this is a benefit, it seemed simpler to me).
1 Like

You might be interested in this as well:
https://github.com/shr-project/meta-ros/commits/jansa/warrior

It has almost the same features as yours.

  • yocto warrior support
  • no DISTRO in bblayers file
  • backports from newer Yocto moved to separate layer (and not included in a warrior branch)
  • bbappends instead of inc files
2 Likes

https://github.com/shr-project/meta-ros/commits/jansa/warrior is currently WIP that is planned to land on official meta-ros repo. Please follow the official meta-ros upcoming changes.

Iā€™ve just pushed a commit that fixes this (and another that fixes a typo in python-rosdistro.inc) to meta-ros[thud-draft].

Nice job on the meta-ros layer! It looks in good shape! I was not aware of this, so I made my own, but good to see this effort!

FYI: A milestone for restructuring meta-ros into sublayers has been added in the latest revision of Superflore OE Recipe Generation Scheme.

I was able to get the thud-draft branch of meta-ros working with my vendorā€™s BSP. Is it possible to use the Yocto SDK feature to export an environment suitable for building ROS 2 nodes?

Iā€™m currently in the process of building an image for our boards and succeeded in creating a ROS2 dashing distro. However, it would be nice to be able to have both ROS1 and ROS2 installed simultaneously. Is that currently possible or intended to be possible in the future? From my understanding of the layers, it should not be.
@herb-kuta-lge

How about your approach?
@shr-project

@michaelr
It will be possible, with the version from milestone 8, which should be merged to ros/meta-ros very soon, itā€™s partially possible (but not officially supported - so youā€™re on your own).

The official support will be added in milestone 12, see:

@huntjw nativesdk builds (nor on target builds) currently arenā€™t supported, maybe after Milestone 17 from https://github.com/ros/meta-ros/wiki/Superflore-OE-Recipe-Generation-Scheme , but thatā€™s rather far in future

Thanks for your answer. Iā€™m currently trying to figure out how to do this with milestone 8. Iā€™m struggling a bit with how this can be done in the current state. For now, I want to build the core parts of ROS1/ROS2, however since there are different recipes with the same name in both meta-ros1-melodic and meta-ros2-dashing, I donā€™t see how thatā€™s going to work.

For example, ros-core_%.bb exists in both layers with different versions. As I take it, it is not possible to build both recipes. Does that mean that one would have to rename all recipes, e.g. ros1-ros-core.bb and ros2-ros-core.bb? Do you already have an idea how the official support will fix this issue?

The plan was to allow installing ROS1 packages which donā€™t exist in ROS2. Installing the same package twice, once built with ROS1 and once with ROS2 is indeed very complicated, is that common use case?

In general, I think one would not need the same package twice. However, some packages which are needed for the core part of ROS should be built twice. std-msgs is a package which is needed for both ROS1 and ROS2 and is normally located in the install paths of their respective distribution, i.e. /opt/ros/melodic and /opt/ros/dashing. At the least, the core part of ROS1 and ROS2 should be independent. I donā€™t know if it is possible (or recommended) to share packages between them.

Just an update about ROS1 and ROS2.
I have a working branch for simultaneously installing ROS1 melodic and ROS2 dashing on thud on my own branch. This is very much work in progress. There are still some issues to which I donā€™t have a good solution. However, the build works and ROS1 and ROS2 are confirmed to be working on my device.
You can see the branch here: https://github.com/maroessler/meta-ros/tree/ros1-ros2

Additionally, I have included support for the SDK for melodic which can be seen here:

1 Like