micro-ROS Tutorial: ESP32, STM32 and ROS 2 Setup

Connect ESP32 or STM32 to ROS 2 with micro-ROS. Set up the Agent, publish from an MCU, choose a transport, and troubleshoot failures.

In this article

  • Quick Setup (ESP32 + Arduino)
  • XRCE-DDS, rclc, and the Execution Model
  • Code Example (ESP32 Publisher)
  • Supported Hardware
  • Where Micro-ROS Fits Best
  • Alternatives Emerging in 2026
  • Common Pitfalls & Solutions
  • RTOS, Memory, and Debugging Strategy
  • Microcontroller Comparison for Micro-ROS