Micro-ROS is a lightweight, open-source robotics framework that ports the core communication patterns and client libraries of ROS 2 to resource-constrained microcontroller (MCU) environments. It enables deeply embedded devices—such as motor controllers, sensor arrays, or low-level actuators—to become first-class participants in a larger ROS 2 computational graph. This is achieved by implementing a minimal ROS 2 Client Library (RCL) for C and running it on a Real-Time Operating System (RTOS) like FreeRTOS, Zephyr, or NuttX.
Glossary
Micro-ROS

What is Micro-ROS?
Micro-ROS is a robotics framework that brings the core concepts of ROS 2 to deeply embedded microcontrollers, enabling real-time communication with larger ROS 2 systems via a Micro-ROS Agent.
The architecture relies on a Micro-ROS Agent, a broker process that runs on a more powerful companion computer (e.g., a Linux-based single-board computer). The agent bridges the embedded world and the standard ROS 2 network, translating the Data Distribution Service (DDS)-based communication used by ROS 2 into a serial protocol (e.g., UART, SPI, or UDP) for the microcontroller. This allows MCU nodes to publish topics, call services, and set parameters, fully integrating low-latency, real-time control loops into the modular, distributed design philosophy of ROS 2.
Key Features of Micro-ROS
Micro-ROS is a robotics framework that brings the core concepts of ROS 2 to deeply embedded microcontrollers, enabling real-time communication with larger ROS 2 systems via a Micro-ROS Agent.
Microcontroller-First Architecture
Micro-ROS is specifically designed for resource-constrained devices like ARM Cortex-M or ESP32 microcontrollers. It provides a minimal-footprint client library that implements the essential ROS 2 communication patterns (publish/subscribe, services, actions) while offloading complex tasks like discovery and serialization to a more powerful companion processor running the Micro-ROS Agent. This architecture allows developers to write standard ROS 2 nodes that execute deterministically on hardware with as little as < 100 KB of RAM and < 1 MB of Flash memory.
Real-Time Executor (rclc)
A core component enabling deterministic behavior is the rclc Executor, a C-language client library executor for Micro-ROS. Unlike the more general-purpose executors in standard ROS 2, the rclc Executor provides:
- Static memory allocation to avoid non-deterministic heap operations.
- User-defined trigger conditions for precise callback scheduling.
- Explicit spin semantics that integrate seamlessly with real-time operating system (RTOS) task loops. This allows developers to build hard real-time control loops where sensor reading, computation, and actuator command callbacks are guaranteed to execute within strict, predictable time constraints.
Transport via Micro-ROS Agent
Micro-ROS nodes do not communicate directly over DDS. Instead, they connect via a lightweight serial protocol (e.g., UART, SPI, or UDP) to a Micro-ROS Agent running on a Linux-based companion computer (e.g., a Raspberry Pi or the robot's main computer). The Agent acts as a bridge, performing these critical functions:
- Translating the serial protocol to/from standard ROS 2/DDS messages.
- Handling node discovery and lifecycle management for the embedded nodes.
- Managing the Quality of Service (QoS) policies between the microcontrollers and the broader ROS 2 graph. This separation allows the microcontroller to remain simple and deterministic while the Agent handles the complexity of the ROS 2 ecosystem.
Integration with Real-Time Operating Systems (RTOS)
Micro-ROS is not an OS itself; it is designed to run atop industry-standard Real-Time Operating Systems that provide the necessary threading, scheduling, and IPC primitives. It offers official support and integration layers for:
- FreeRTOS: The most common RTOS for embedded systems.
- Zephyr RTOS: A scalable, secure RTOS popular for connected devices.
- NuttX RTOS: A POSIX-compliant RTOS often used in aerospace. This RTOS integration provides the foundational deterministic task scheduling and inter-process communication mechanisms that Micro-ROS leverages to guarantee the timely execution of its callbacks and communication tasks.
Full ROS 2 Middleware Compatibility
Despite its small size, Micro-ROS maintains full semantic compatibility with the ROS 2 middleware layer. This means:
- Micro-ROS nodes can publish and subscribe to topics on the main ROS 2 network as first-class participants.
- They can provide and call services and actions, enabling bidirectional, task-oriented communication.
- They support a subset of ROS 2 Quality of Service (QoS) policies, such as Reliable vs. Best Effort delivery and Volatile vs. Transient Local durability, allowing communication behavior to be tuned for control vs. telemetry data. This compatibility ensures that low-level sensor and actuator hardware can be integrated into a larger robotic system using the same tools and paradigms as high-level perception or planning nodes.
Development and Deployment Toolchain
Micro-ROS provides a complete, containerized toolchain to streamline development for embedded targets. Key tools include:
- Micro-ROS Build System: A set of CMake utilities and a colcon meta-build tool extension that cross-compiles the Micro-ROS stack and user code for the target microcontroller.
- Micro-ROS-Agent CLI: A command-line tool to easily launch the bridging Agent on the host machine with configurable transports (serial, UDP).
- Integration with ROS 2 Debugging Tools: Once connected, embedded nodes appear in the ROS 2 graph and can be inspected with standard tools like
ros2 topic list,ros2 node info, andrqt_graph, providing full observability from the high-level system down to the microcontroller.
How Micro-ROS Works: The Client-Agent Architecture
Micro-ROS operates on a split architecture designed to offload the computational and networking burden from resource-constrained microcontrollers, enabling them to participate as first-class citizens in a larger ROS 2 system.
The Micro-ROS Client Library runs directly on the microcontroller (MCU), providing a minimal-footprint API for core ROS 2 concepts like nodes, publishers, subscribers, and executors. It handles local task scheduling and serializes all communication into a raw data stream. This stream is transmitted via a simple, real-time capable transport like UART, SPI, or a custom serial protocol to a more powerful companion processor, such as a Linux-based single-board computer.
The Micro-ROS Agent is a ROS 2 node that runs on the companion processor. It acts as a bridge, deserializing the data stream from the MCU and translating it into native ROS 2 messages and DDS traffic. Conversely, it receives messages from the broader ROS 2 network, serializes them, and sends them back to the client. This architecture isolates the MCU from complex network stacks and DDS, allowing it to focus on deterministic, real-time control loops while the Agent manages discovery and high-bandwidth communication.
Micro-ROS Use Cases and Applications
Micro-ROS enables the core communication patterns of ROS 2 on resource-constrained microcontrollers, bridging the gap between high-level planning and low-level, real-time actuation and sensing.
Micro-ROS vs. Standard ROS 2: A Comparison
A technical comparison of the core frameworks for resource-constrained microcontrollers versus full-scale robotic computers.
| Feature / Metric | Micro-ROS | Standard ROS 2 |
|---|---|---|
Target Hardware | Microcontrollers (MCUs) with < 1 MB RAM | Linux-based computers, SBCs, servers |
Minimum RAM Footprint | < 100 KB |
|
Core Communication Transport | Serial (UART, USB), UDP, BLE via Micro-ROS Agent | Native DDS over UDP/TCP (LAN/WAN) |
Real-Time Execution Guarantee | Yes, via RTOS integration (e.g., FreeRTOS, Zephyr) | No, dependent on Linux kernel scheduling |
Primary Client Libraries | rclc (C), Micro XRCE-DDS Client | rclcpp (C++), rclpy (Python), others |
Dynamic Node Discovery | No, requires static configuration with Agent | Yes, via DDS discovery protocol |
Quality of Service (QoS) Profiles | Limited subset (Best Effort, Reliable) | Full DDS QoS policy set (Deadline, Liveliness, etc.) |
Build System Integration | Custom build via micro_ros_setup, CMake | Colcon, standard CMake/Python |
Parameter Server Support | Limited, via service calls to Agent | Full dynamic parameter server with events |
Lifecycle Node Support | No | Yes, managed state machine |
Primary Use Case | Real-time sensor reading, low-level motor control | High-level perception, planning, system orchestration |
Frequently Asked Questions
Micro-ROS is a robotics framework that brings the core concepts of ROS 2 to deeply embedded microcontrollers, enabling real-time communication with larger ROS 2 systems via a Micro-ROS Agent.
Micro-ROS is a lightweight robotics framework that ports the core communication patterns of ROS 2 to resource-constrained microcontrollers (MCUs), enabling them to function as first-class participants in a larger robotic system. It works via a client-server architecture: the Micro-ROS Client, a minimal library running on the MCU, connects over a serial, UDP, or custom transport to a Micro-ROS Agent running on a more powerful companion computer (like a Raspberry Pi). The Agent acts as a bridge, translating the MCU's messages into the standard Data Distribution Service (DDS) protocol used by the main ROS 2 network. This allows the microcontroller to publish sensor data, subscribe to commands, call services, and execute actions, all while the Agent handles the complex discovery and middleware management.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Micro-ROS extends the ROS 2 paradigm to resource-constrained microcontrollers. Understanding its architecture requires familiarity with these core components and communication patterns.
Micro-ROS Client Library
The Micro-ROS Client Library is the minimal, portable C API that provides the core ROS 2 concepts (publishers, subscribers, services, actions) for microcontrollers. It is designed for deterministic, real-time execution within a Real-Time Operating System (RTOS) like FreeRTOS or Zephyr.
- Key Functions: Implements the ROS 2 Middleware Interface (RMW) for microcontrollers.
- Memory Footprint: Typically requires <100 KB of RAM, making it suitable for MCUs like the ESP32 or STM32.
- Integration: Links directly with the user's application code on the MCU, handling all communication with the Micro-ROS Agent.
Micro-ROS Agent
The Micro-ROS Agent is a broker process that runs on a more powerful companion computer (e.g., a Linux-based SBC). It acts as the bridge between the Micro-ROS Client on the microcontroller and the full ROS 2 network.
- Primary Role: Translates the serialized data (typically over UART, USB, or Bluetooth) from the MCU into native ROS 2 messages on DDS topics.
- Discovery & Management: Handles node discovery and manages the Micro-ROS Client's participation in the ROS 2 graph.
- Deployment: Runs as a standard ROS 2 node, allowing the embedded device to appear as a peer in the larger system.
Micro XRCE-DDS (DDS for eXtremely Resource Constrained Environments)
Micro XRCE-DDS is the wire protocol and client-server middleware that underpins Micro-ROS communication. It is a lightweight subset of the DDS standard defined by the Object Management Group (OMG).
- Architecture: Uses a client-server model where the MCU is the client and the Agent is the server, unlike the peer-to-peer DDS used in standard ROS 2.
- Efficiency: Designed for minimal bandwidth and processing overhead, using efficient serialization like CDR.
- Standardization: Provides a standardized way for tiny devices to participate in a DDS data space, ensuring interoperability.
Real-Time Operating System (RTOS)
A Real-Time Operating System (RTOS) is a critical software layer for Micro-ROS deployments. It provides deterministic scheduling, task management, and synchronization primitives essential for reliable robotic control loops.
- Common Examples: FreeRTOS, Zephyr, NuttX, and Mbed OS.
- Role in Micro-ROS: The Micro-ROS Client Library is ported to run on top of an RTOS. The RTOS manages the execution of the Micro-ROS tasks (e.g., spinning the executor) alongside the user's application tasks.
- Determinism: Guarantees that high-priority control tasks can preempt communication tasks, meeting hard real-time deadlines for actuation.
ROS 2 Executor (Micro-ROS Variant)
The Micro-ROS Executor is a specialized, lightweight version of the ROS 2 executor designed for single-threaded, real-time environments on microcontrollers. It processes incoming messages and triggers user callbacks.
- Key Difference: Often implements a static, compile-time allocation of memory for subscriptions and timers to avoid dynamic memory allocation (heap usage).
- Spin Modes: Typically supports a non-blocking spin (check for new data) or a blocking spin (wait for data with a timeout) to fit into tight control loops.
- Performance: Optimized for predictable, low-latency callback execution, which is critical for sensor reading and motor control.
Hardware-in-the-Loop (HIL) Testing with Micro-ROS
Hardware-in-the-Loop Testing is a critical validation methodology for Micro-ROS systems. It involves connecting the physical microcontroller running Micro-ROS to a simulation of the robot and environment.
- Process: The MCU executes the actual embedded control code (using Micro-ROS), while a simulator (e.g., Gazebo) provides sensor data and consumes actuator commands via the Micro-ROS Agent.
- Benefit: Allows for rigorous testing of low-level firmware, communication reliability, and real-time performance before full integration on the physical robot.
- Toolchain: Often utilizes ROS 2 bag recording/playback and the Micro-ROS Agent's ability to bridge simulated and real topics.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us