micro-ROS: ROS 2 on a microcontroller, and the bridge your two-computer robot needs
An MCU for real-time control, an SBC for perception and navigation — the soundest split in hobby robotics. micro-ROS is the bridge that keeps the two from needing hand-made protocol glue.
- Licence
- Apache 2.0
- Protocol
- XRCE-DDS (bridges into the ROS 2 DDS graph)
- Boards
- STM32 / ESP32 / RP2040 among others
- Start
- Firmware compiled per target board; common dev boards officially supported
- Role
- The standard bridge between the real-time layer and the ROS 2 graph
- What it solves
- It answers 'do you have to write the bridge yourself?'. Without it, the MCU-to-Pi link is a hand-rolled serial protocol, your own packet-loss handling, your own format versioning. With it, the MCU program is a first-class ROS 2 node — topics, services and parameters matching the rest of the graph. Architecturally, what it removes is exactly the layer where self-made components hide their most silent bugs.
- Alternatives
- Your own serial protocol (entirely sufficient for simple remote control, and easier to debug); ros2_control with a hardware interface (when the same machine has a real-time kernel); everything on the SBC (no real-time guarantees; demo-grade). The test is one question: does the control loop need timing determinism? Yes — use it. No — hand-rolling is faster.
- What it takes to start
- The bar is tooling, not concepts: firmware compiles per target board (major boards are officially supported, but the cross-compilation environment, RTOS configuration and host-side Agent deployment are all yours to break in). First light takes days. Get it working on an officially supported board first, then move to your own — changing two variables at once is the debugging sin.
- Known pitfalls
- ① XRCE-DDS QoS does not fully match desktop DDS — keep large messages (images) off this bridge; ② firmware build configuration is board-locked; a new board means a new build setup; ③ when the host-side Agent dies, the whole layer goes dark — run the Agent as a service with automatic restart. It is in the documentation, and it is skipped more often than it is followed.
- What we checked
- We verified: licence and protocol (Apache 2.0 / XRCE-DDS); official support for RP2040, ESP32 and STM32; and that running the Agent as a managed service is the documented deployment advice. We have not deployed it ourselves — per-board tooling hours come from community reports. The grade stays accordingly.
For a rover or any MCU-plus-SBC machine, it earns its place — the hand-made protocol layer it removes is where the silent bugs nest. It is not mandatory: for a simple remote-controlled car, a serial protocol of your own is faster. The deciding question is whether you have a real-time control loop. Yes, and it repays its setup cost. No, and it is premature.
What exactly does it bridge
micro-ROS has a two-layer architecture: a client on the MCU, an Agent on a host (PC or Raspberry Pi), and eProsima's Micro XRCE-DDS in between. The Agent creates the real DDS entities on the host side and registers the MCU as a normal participant in the ROS 2 network — publishers, subscribers, services, actions and parameters all behave as they do upstairs.
★ There is one rule here that is easiest to miss and easiest to lose a whole evening to: if the Agent is not running, the MCU node does not exist in the ROS 2 world. It does not error; it simply vanishes. The first thing to check when a node is missing is whether the Agent is up.
Also keep two independent paths apart: MCU-to-hardware I/O (I2C / SPI / ADC / PWM) is separate from MCU-to-Agent communication, and DDS and XRCE take no part in hardware I/O at all. Reading sensors and driving motors remains ordinary embedded firmware.
Officially supported boards and RTOSes
Officially maintained boards cover STM32 (including the ROBOTIS OpenCR), ESP32, Arduino Portenta H7, RP2040, and Teensy 3.x / 4.x among others; on the RTOS side FreeRTOS, Zephyr and NuttX are supported, with a bare-metal route as well. Serial is the default transport; boards with built-in networking such as the ESP32 and Portenta can go straight over UDP and drop a cable.
When not to use it
- No real-time control loop: a simple RC car is faster with a hand-written serial protocol; adding Agent plus DDS is pure overhead.
- Large or high-rate messages: MCU memory and CPU cap the number of concurrent entities and message size, and not every ROS 2 feature or QoS policy is available.
- You need mature debugging tools: the embedded-side debugging and profiling tooling trails the standard ROS 2 environment — factor that into the choice.
Frequently asked
What hardware does micro-ROS need?
What is the micro-ROS Agent, and why is it mandatory?
What is the difference between micro-ROS and rosserial?
What are micro-ROS's limitations?
Sources
- micro-ROS official documentation (supported boards, XRCE-DDS, deployment)
Objects in this entry
- micro-ROSLibraries & Frameworks
- ROS 2Libraries & Frameworks
- Raspberry Pi 5 vs Jetson Orin NanoParts & Components
Last checked 2026-09-28