Inferensys

Glossary

Micro-ROS

Micro-ROS is a robotics framework that ports the core concepts and communication patterns of ROS 2 to resource-constrained microcontrollers, enabling them to participate as first-class nodes in a larger robotic system.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
ROBOT OPERATING SYSTEM (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.

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.

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.

MICROCONTROLLER ROBOTICS FRAMEWORK

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.

01

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.

02

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.
03

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.
04

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.
05

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.
06

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, and rqt_graph, providing full observability from the high-level system down to the microcontroller.
ARCHITECTURE OVERVIEW

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.

EMBEDDED ROBOTICS

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.

ARCHITECTURAL DIFFERENCES

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 / MetricMicro-ROSStandard ROS 2

Target Hardware

Microcontrollers (MCUs) with < 1 MB RAM

Linux-based computers, SBCs, servers

Minimum RAM Footprint

< 100 KB

50 MB

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

MICRO-ROS

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.

Prasad Kumkar

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.