See the official tutorial: https://micro.ros.org/docs/tutorials/core/first_application_linux/
docker run -it --net=host -v /dev:/dev --privileged ros:jazzysource /opt/ros/$ROS_DISTRO/setup.bashmkdir microros_ws
cd microros_ws
git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setupsudo apt update && rosdep update
rosdep install --from-paths src --ignore-src -ysudo apt-get install python3-pipcolcon build
source install/local_setup.bashros2 run micro_ros_setup create_agent_ws.sh
ros2 run micro_ros_setup build_agent.sh
source install/local_setup.bash
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 -b 921600docker exec -it <container_name> bash
source /opt/ros/$ROS_DISTRO/setup.bash
source install/local_setup.bashNote: Replace
<container_name>with the actual name or ID of your running container.
ros2 topic listTo change the UART node for your board (e.g., for ESP32-C3 SuperMini):
- Navigate to:
/modules/lib/micro_ros_zephyr_module/modules/libmicroros/microros_transports/serial - Edit the file and change:
to, for example:
#define UART_NODE DT_NODELABEL(usart1)
for ESP32-C3 SuperMini, as seen in:#define UART_NODE DT_NODELABEL(usb_serial)
/external/zephyr/boards/others/esp32c3_supermini/esp32c3_supermini.dts
- Make venv (i use zephyr ide extension vscode)
- Activate interpreter to venv in vscode
- pip install colcon-common-extensions
- pip install platformio