BlogNewsTop News

micro-ROS: A member of the Zephyr Project and integrated into the Zephyr build system as a module!

By October 22, 2020May 6th, 2021No Comments

Written by Francesca Finocchiaro, Project Manager and Team Lead at eProsima

We’re glad to announce that, through the FIWARE Foundation, micro-ROS is now a member of The Zephyr Project!

micro-ROS is a software solution for developing robotic applications into resource-constrained systems such as microcontrollers. It was born as the result of the OFERA project, a joint effort of five European partners: eProsima, FIWARE, Bosch, PIAP, and Acutronic Robotics.

micro-ROS’ architecture is inspired by that of ROS 2, the second generation of the Robot Operating System (ROS). ROS 2 is an open-source software framework that sets the de facto standard for robotics applications. It follows a layered architecture that separates the ROS client layers, high-level interfaces exposing features such as nodes, publishers/subscribers, and client/services to the final users, from the ROS middleware interface, a lower-lying API built interchangeably on top of one of ROS 2 default middleware vendors’ solutions, all implementing the Data Distribution Service (DDS), a real-time publish/subscribe protocol designed for safety-critical systems.

micro-ROS is also open-source and composed of a set of layered libraries that either reuse or adapt those of ROS 2 to the capabilities and needs of resource-constrained devices. The major difference stands in the middleware exploited to implement the RMW, Micro XRCE-DDS. This library implements a wire protocol that allows bringing DDS to the embedded world, and relies on a client-server architecture that is upstream inherited by micro-ROS. In this architecture, Clients are lightweight entities that run into low resource devices while the server, also known as Agent, is an application that bridges the Clients with the DDS world.

micro-ROS runs on different hardware and software platforms thanks to its versatile build system that offers platform-specific toolchains. By virtue of its lightness, micro-ROS is apt for being executed on Real-Time Operating Systems (RTOSes), allowing it to comply with the time-critical requirements imposed by its typical target applications, which usually involve tasks that demand time-deadlines or deterministic responses.

Zephyr is one of the most successful RTOSes (integrated with the micro-ROS stack). It has been supported informally for sometime now both by the micro-ROS Client library and by its middleware, Micro XRCE-DDS, and it was incorporated officially into the micro-ROS build system when the Foxy release came out in July 2020.

A comprehensive and detailed tutorial on how to run a micro-ROS application with Zephyr on micro-ROS’ official reference board, the Olimex STM32-E407 can be found here. Also, interested users can find a nice demo involving a Zephyr application running on top of an Olimex board that reads distance data from a VL53LX ToF sensor. The board is connected, via a Raspberry Pi running an Agent, with a Robotis OpenManipulator X robotic arm that picks and drops objects, showcasing the fluid interaction of micro-ROS with this powerful and flexible RTOS. The related GitHub repo, with a more thorough explanation of the demo functioning and on how to reproduce it, can be found here.

As a cherry on top of the cake, thanks to the more than 200 + boards that Zephyr supports and to the flexibility of the micro-ROS build system, porting micro-ROS to those platforms that are transport and resource-wise compatible with its requirements is easy as pie. As a matter of fact, in addition to the two boards officially supported by the micro-ROS project in combination with Zephyr – the already mentioned Olimex STM32-E407 and the STM32L4 Discovery kit IoT.

Many micro-ROS users are being able to seamlessly port more and more boards to micro-ROS on top of Zephyr, thus enlarging the pool of hardware platforms integrated with this small but powerful software.

Additionally, very recently, the engineers behind the curtains of micro-ROS released an independent component of the micro-ROS machinery that compiles to a collection of static libraries and header folders, plus Zephyr-specific files, marking an alternative to cloning the complete build system. Indeed, while the latter allows selective cross-compilation of applications only for the combinations of platforms and RTOSes officially supported by the project, the new tool turns this upside down by allowing to integrate micro-ROS as a standalone module into the Zephyr build system! Hopefully, we’ll see this new module officially integrated within the Zephyr build system very soon.