ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Official Docker Images for ROS2 Crystal and arm32v7

ros2
docker
arm
crystal

#1

Hello all,

I’ve working on upstreaming ROS2 Docker images into the Official Library in time for the Crystal release:

While doing so, I wondered how feasible support for arm32v7 would be. Many hobbyist and students still rely on older low-end embedded arm devices, such as raspberry pies. Even the TurtleBot3 currently ships with a 32bit install. To help facilitate ROS2 adoption, I’d suspect better coverage for multi-arch support via pre-built binaries will go a long way towards encouraging migration and general community growth. Looking at the current pull_counts for ROS1 and Ubuntu on Docker Hub, we see as of writing:

Note: these pull counts don’t seem to sum even close to the total pull counts from the official library aggregating these for multi-arch. I assume these counts are rather fresh, perhaps wrt last_updated.

As we can see, arm32v7 makes a substantial proportion of the number of pulls, even more so for base images. I recognise arm32v7 (armhf) isn’t yet listed under any “Support Tier”, so I’ll petition here that adding support for arm32v7 could be worthwhile for the community:

As an exploratory mesure, I went and built ROS2 from source using the current master, and was able to complete in about 1h 19min 23s on my workstation using qemu emulation via docker, use the same methods described in:

I’ve uploaded the logs here for folks to paruse:
arm32v7_ros2_bouncy_source_logs.zip

As well as the resulting docker image here you may test locally:
https://hub.docker.com/r/ruffsl/arm32v7_ros2/tags

Cheers,
@ruffsl


#2

This is double plus good! Thank you @ruffsl! As someone who is working with ROS2 on “older” Raspberry Pi’s, having a 32 bit image is a resource that will help me and, I am sure, other developers.

While it’s great that ROS2 is reaching for the future by focusing on 64 bit systems, the current small computers are 32bit and account for a significant portion of what’s out there.


#3

Since last posted, it looks like Amazon has announced AWS support form ARM [1].
Perhaps this could help improve ROS2’s buildfarm support for multi arch builds?

As for a more concrete use case: robotic outreach projects such Duckietown could really come to benefit from arm32v7 support, helping to teach ROS2 to new and younger users using budget level hardware.

[1] https://aws.amazon.com/about-aws/whats-new/2018/11/introducing-amazon-ec2-a1-instances
[2] https://www.duckietown.org


#4

I haven’t actually seen anything on whether the Graviton processor supports 32-bit mode (it’s an optional extension for ARMv8); does anyone know if it does?


#5

I’ll let you know in a few minutes :wink:


#6

I was able to build ros-kinetic-catkin using the ros_buildfarm generate_release_script.py on an a1.medium instance. Build performance wasn’t bad. Python 3 performance on the host seemed (mostly generating the build script) seemed dramatically worse than amd64. Taking 20-25 seconds instead of 3-5 seconds. So it looks like armv7 instructions are supported by these instances.


#7

Are those stats from running the jobs in a arm32v7 container with qemu on a arm64v8 OS, or does the AWS hypervisor allow for booting into a arm32v7 guest OS to avoid qemu when building with docker?

I’ve always experienced slow python runtimes when using qemu.


#8

A cool (I think) feature of the images used by the buildfarm that bundle binaries from qemu-user-static is that they rely on the host kernel’s binfmt to invoke non-native binaries with qemu. So on native platforms the same image will run without qemu and, in fact, the bundled qemu binary is AMD64 native and so it would fail to run if invoked by binfmt.

But the python script was running directly on the host so the docker images weren’t involved in that runtime measurement yet.


#9

Just friendly bump; has there been any further thoughts on this, ether by the ROS2 TSC or OSRF?
Or has it been settled that it’s probably too late to add arm32v7 as a Tier 1 or 2 platform for Crystal?


#10

It’s definitely too late for Crystal’s launch and my apologies if I gave the impression that it was ever on the table. I am at present too focused on that launch to ponder reliably beyond it but please do ask again after the initial release.