IoT
28 February 2025

Autonomous mobile robots: why use Zephyr OS?

Dans un monde industriel de plus en plus connecté, où la performance et la fiabilité sont des impératifs, le choix des outils logiciels est déterminant.

Mais tout applicatif industriel doit s’exécuter sur une base solide, qu’elle soit un micro-os ou bare-metal.

robotique

 

Utiliser zephyr dans la conception de robots mobiles

At Rtone, we have developed robotic software components designed for use in resource-constrained environments such as microcontrollers. Although our solutions are portable across various micro-OSes, we most often use Zephyr.

Zephyr is a real-time micro-operating system (RTOS) designed for embedded devices, providing a modular foundation for developing IoT and industrial applications. Backed by the Linux Foundation, it is open source and compatible with a wide range of hardware architectures, including ARM and x86.

Zephyr supports a variety of features such as embedded file systems (FAT, LittleFS), network protocols (IPv4/IPv6, MQTT, syslog, SNTP), and hardware peripherals (UART, SPI, GPIO, CAN), whilst offering a comprehensive integration environment (west).

We made a strategic decision to integrate Zephyr OS into a project developing mobile industrial logistics robots. This technological choice enables us to meet the growing demands for flexibility and robustness in an industrial environment where performance, safety, and scalability constraints are paramount.

In this article, we will explore in detail how Zephyr is transforming the development of our industrial robots, from motion control management to remote software updates.
Discover why Zephyr is at the heart of our technology strategy.

 

Why Zephyr?

Zephyr is an open-source real-time operating system (RTOS), known for its modularity, light-weight nature, and broad hardware support.

By choosing Zephyr, we have been able to capitalise on several advantages:

  • Hardware flexibility: Native support for a wide variety of microcontrollers and peripherals allows us to replace or add components easily.
  • Hardware abstraction: Its hardware abstraction layer enables the writing of generic high-level code for all architectures.
  • Reliability: Thanks to its thread and priority management features, we ensure stable operation even in critical environments.
  • Simulation: Zephyr on native architecture (x86) allows us to develop and test robots in simulation, even without having the physical robots yet.
  • Active community: The Zephyr ecosystem benefits from significant support from major companies, ensuring its long-term viability.

 

Motion control management for autonomous mobile robots using Zephyr

Démo robot mobile autonome

One of the key features of our robots is their ability to move autonomously and with precision. This includes:

  • Real-time trajectory calculation.
  • Optimised motor control.
  • Trajectory tracking.

To achieve this, we have developed a generic motion control module in C++, leveraging the capabilities of Zephyr. This module interacts with on-board sensors (encoders, LIDAR, etc.) and actuators via protocols such as CANopen.

Advanced CANopen integration

 

logo canopen

CANopen, as a robust and widely used industrial protocol, plays a central role in our architecture. By utilising the CANopen stack integrated into Zephyr, we have:

  • Implemented advanced commands for motor control (speed, position, torque).
  • Ensured reliable communication between the robot’s various modules.
  • Enabled real-time monitoring of actuator statuses.

 

Extended network communication

Our robots require advanced communication capabilities to integrate into connected industrial environments. With Zephyr, we support:

  • Standardised protocols such as SNTP (clock synchronisation) and MQTT (messaging for the IoT, notably used in the VDA5050 robotics standard).
  • Custom protocols, tailored to our customers’ specific needs.

This flexibility enables us to ensure robust and adaptable connectivity, even in complex network environments.

Zephyr simplifies and accelerates the integration of network stacks thanks to its modular architecture and broad compatibility. Whether for Ethernet, Wi-Fi, Bluetooth or specific protocols such as CANopen, everything is already integrated or easily added. This allows you to focus on development without wasting time on configuring or adapting network tools.

 

Secure OTA updates for mobile robots via mcumgr and mcuboot

Remote software maintenance is crucial for minimising downtime and ensuring regular updates. We have integrated mcuboot, a well-known and recognised bootloader for MCUs, and mcumgr, an Over-The-Air (OTA) management solution for the development phase:

  • Perform software updates on microcontrollers remotely.
  • Reduce development costs by eliminating the need for physical interventions early in the project lifecycle.

This feature ensures responsiveness and ease of deployment from the very first stages of development.

We are also able to implement a production OTA solution and tailor it to the entire system and a fleet of robots.

You can also read our article on OTA updates.

 

Robotic simulation using Zephyr’s native architecture

Before deploying our autonomous mobile robots in real-world environments, we use Zephyr’s native architecture to simulate their behaviour. This allows us to test our firmware in the same way as a Linux application. This approach offers several advantages:

  • Early testing: Early detection of bugs and validation of algorithms under conditions close to reality.
  • Connectivity: Simulating connectivity options such as Ethernet or CAN, which can be virtualised, also helps eliminate application and protocol risks at the earliest stage.
  • Continuous optimisation: Adjustment of control parameters without the need for physical hardware.
  • Time savings: Reduction in development cycles thanks to rapid iterations.

Native simulation allows us to guarantee maximum reliability when moving to production.

 

Modular and generic design in C++

One of the major challenges in industrial robot development is maintaining reusable and adaptable source code. To achieve this:

  • We have designed generic interfaces to separate the application layers from the hardware layers.
  • This approach allows new sensors or actuators to be easily integrated without modifying the core of the software.
  • Driver-specific functionalities are encapsulated, limiting their impact on the rest of the system.

We can also port our developments to a micro-OS alternative to Zephyr by adapting the interface with the ches basses de l’OS. 

 

An example of a generic interface

Let’s take the example of a motor driver. Instead of coding the commands directly within the application modules, we use a generic interface, as shown in this deliberately simplified example :

class="NormalTextRun SCXW237416986 BCX0">
next
 :

class MotorInterface { 
public: 
    virtual void set_speed(float speed) = 0; 
    virtual float get_position() const = 0; 
    virtual ~MotorInterface() {} 
}; 

This allows us to develop specific drivers for each type of motor without affecting the rest of the application, which will continue to use the same interface.

 

Responsiveness to change

The industrial sector is evolving rapidly, whether in terms of components, strategies or architectures. Using Zephyr gives us a decisive advantage thanks to:

  • Code modularity: Software components can be replaced or updated independently.
  • Hardware adaptability: Native support for numerous SoCs (System on Chip) simplifies the transition to new platforms.
  • Ease of testing: The tools integrated into Zephyr (simulators, performance analysers, etc.) accelerate development cycles.

 

In conclusion

The integration of Zephyr OS into industrial mobile robots has been a real driver of innovation.

Thanks to its flexibility and robustness, we have been able to design a modular, high-performance and scalable architecture. Our decision to develop in C++ using generic interfaces reinforces this ability to respond quickly to new challenges, whether technical or strategic. Zephyr is not just another RTOS: it is a complete ecosystem that allows us to stay one step ahead.

Would you like to find out more? Please do not hesitate to contact us. We would be delighted to share our expertise and explore new opportunities for collaboration.

You want to discuss about your project ? Contact-us !

 

 

 

Un peu de lecture

Des articles, des podcasts, des webinars… et surtout des conseils pratiques ! En bref, une collection de ressources pour mener à bien votre projet.