micro-ROS/micro_ros_espidf_component
micro-ROS ESP32 IDF component and sample code
What it solves
Setting up micro-ROS on ESP-IDF projects is complex because it requires building micro-ROS libraries and integrating them with the IDF build system. This component bundles those steps into an easy-to-add ESP-IDF component, so developers can add micro-ROS functionality to their ESP32 projects with a single dependency.
How it works
This component integrates the micro-ROS build process into the ESP-IDF build system, pulling in the necessary dependencies and building micro-ROS packages as part of your project. It uses eProsima Micro XRCE-DDS as the default middleware for communication between the microcontroller and a ROS 2 agent, with an experimental embeddedRTPS middleware (currently not working) as an alternative. To use it, you add the component via the ESP Component Manager (idf.py add-dependency) or by cloning the repository into your components folder. The component then builds micro-ROS automatically as part of your project. It supports multiple ROS 2 distros, each versioned by the release year (e.g., humble is version 22.x, jazzy is 24.x). The default transport is UDP, but you can switch to UART or a custom transport by adjusting the colcon.meta configuration. The README also shows how to build and run an example (int32_publisher) and how to use a Docker-based micro-ROS Agent for testing.
Who it's for
This is for developers working with ESP32 microcontrollers who want to add ROS 2 communication to their projects. It’s suited for people already familiar with ROS 2 and ESP-IDF, and for those who want to quickly prototype or deploy micro-ROS on ESP32 devices without manually building the entire micro-ROS stack.
Highlights
- Tested on ESP32, ESP32-S2, ESP32-S3, ESP32-C3, and ESP32-C6 with ESP-IDF v5.4, v5.5, and v6.0.
- Simple installation: use
idf.py add-dependencyor clone the repo into your project’scomponentsfolder. - Supports multiple ROS 2 distros (humble, jazzy, kilted, rolling) with nightly CI builds for each.
- Includes a ready-made
int32_publisherexample to get started quickly. - Can be built using official Espressif Docker images for reproducible builds.
- Allows custom transports (e.g., UART) by modifying the
colcon.metaconfiguration. - Open-sourced under the Apache-2.0 license.
Related
- Project
- Project
- Project
- Project