GuideRobotics

ROS 2 on Microcontrollers: micro-ROS vs a Native DDS Implementation

How to connect MCU-based robots to ROS 2. The trade-offs between micro-ROS with an XRCE-DDS agent and running DDS/RTPS directly on the microcontroller.

Short answer

Fastest, best-supported path
micro-ROS with an agent
No extra computer allowed, full product control
Native DDS/RTPS on the MCU
Simple sensors only
A plain serial or UDP bridge

ROS 2 nodes communicate over DDS. Full DDS implementations are designed for computers, not microcontrollers, so getting an MCU-based robot onto a ROS 2 network takes one of a few approaches.

Option 1: micro-ROS

micro-ROS runs a ROS 2 client on the microcontroller and talks to the ROS 2 graph through Micro XRCE-DDS. The MCU runs a lightweight client, and a separate agent process on a computer acts as its proxy in the DDS network. PX4, for example, uses this pattern to connect flight controllers to ROS 2.

  • Pros: official ROS 2 ecosystem project, well documented, supports many RTOSes and boards.
  • Cons: needs an agent running on another machine, which adds setup and a point of failure.

Option 2: native DDS/RTPS on the MCU

The DDS wire protocol, RTPS, can be implemented directly on a capable microcontroller. The device then performs discovery and publishes topics like any other ROS 2 node, with no agent.

  • Pros: no extra computer, robots appear on the network on their own, simpler installs.
  • Cons: significant engineering, and you own maintenance and interoperability testing.
Choosing an approach
Factormicro-ROSNative DDS/RTPS
Extra machine neededYes, for the agentNo
Engineering effortLow to moderateHigh
Community supportStrongYou own it
Best forMost projects and prototypesProduct lines needing zero extra infrastructure

Frequently asked questions

Can an ESP32-S3 run micro-ROS?

Yes, micro-ROS supports ESP32-family chips through ESP-IDF.

Is a native stack compatible with standard ROS 2?

It can be, if it follows the RTPS specification and is tested against the DDS implementations your users run.

What about security?

Plain DDS traffic is unauthenticated. Keep robot networks isolated, or use DDS security where supported.

Sources

  1. PX4 documentation: uXRCE-DDS bridge and the agent's role
See it in a real projectROS 2 on an ESP32-S3 Humanoid Robot: A Native DDS Stack With No Middleware
Nikhil Robinson

Embedded systems consultant at TechProgeny, Bengaluru. 7+ years and 29+ shipped products across firmware, embedded Linux, edge AI, apps and IoT servers.