Robot operating systems

micro-ROS

micro-ROS brings a subset of ROS 2 communication concepts to microcontrollers through the Micro XRCE-DDS client and a micro-ROS Agent. It fits embedded sensor and actuator interfaces that must exchange messages with a ROS 2 computer; it is not a replacement for a dedicated safety controller.

Practical engineering guide

What you can build with micro-ROS and where problems start

micro-ROS brings a subset of ROS 2 communication concepts to microcontrollers through the Micro XRCE-DDS client and a micro-ROS Agent. It fits embedded sensor and actuator interfaces that must exchange messages with a ROS 2 computer; it is not a replacement for a dedicated safety controller.

A first test you can reproduce

  1. 01.Identify the exact MCU board, RTOS or bare-metal port and transport supported by the micro-ROS release.
  2. 02.Bring up a micro-ROS Agent on the host and match its serial device, baud rate or UDP port to the firmware transport.
  3. 03.Publish a small timestamped sensor message before testing motors. Verify the agent sees the session and the ROS 2 graph contains its topic.
  4. 04.Measure memory use, executor period, reconnection time and transport loss on the actual board.

Questions that come up during real implementation

Why does the MCU compile but no topic appears on the ROS 2 computer?

Check the agent is running with the same serial or UDP transport as the firmware. Confirm that the board enumerates as the expected device, permissions permit serial access and the ROS_DOMAIN_ID and agent network are correct. Firmware and agent versions can also differ. Test a minimal publisher before debugging application callbacks.

Can micro-ROS run on every Arduino or ESP32?

No. Board support depends on the memory available, the micro-ROS build system, the RTOS and the serial or UDP transport. A generic microcontroller SDK example does not establish support for an exact board revision. Check the project's supported hardware and library release before ordering electronics.

What happens if the agent disconnects?

The MCU-side application must define timeouts and a safe local response. Do not assume that missing ROS messages automatically stop a motor. Test loss of serial cable, power cycles and agent restarts while measuring whether the local control loop continues safely.

Checks before using it on a robot

  • Measure heap, stack and flash footprint alongside message serialization buffers.
  • Force an agent disconnect during motion and check the local watchdog response.

Compatibility and installation

Developer
micro-ROS project
License
Open source
Operating systems
FreeRTOS, Zephyr, NuttX, Linux and other supported embedded platforms
ROS support
ROS 2
Languages
C, C++
Installation method
ROS 2 workspace tools, platform-specific modules, static libraries and source builds

Profile sources

Explore the connected robotics directories