micro-ROS / micro_ros_setup

Support macros for building micro-ROS-based firmware.
Apache License 2.0
381 stars 138 forks source link

how do you change micro ros domain ID #643

Closed lina834 closed 1 year ago

lina834 commented 1 year ago

Hardware description: esp32 RTOS: freertos Installation type: micro_ros_setup Version or commit hash: humble

Everything works fine and I know that micro ros by default uses 0 as domain ID, but I would just like to know if there's a way to change it.

pablogs9 commented 1 year ago

You can use the RCL API for changing the Domain ID: https://github.com/micro-ROS/micro-ROS-demos/blob/45f342d4ef887f6a2e9f2dfa45d1d3388d7f6dbd/rclc/configuration_example/configured_publisher/main.c#L49