rmw_cyclonedds: [Iron][nav2] error: Failed to find a free participant index for domain 0
Bug report
Required Info:
- Operating System:
- Ubuntu 22.04
- Installation type:
- latest Iron binaries
- DDS implementation:
- rmw_cyclonedds_cpp
Steps to reproduce issue
With export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp, start the standard navigation stack
ros2 launch nav2_bringup navigation_launch.py
Expected behavior
Same as for Humble
Actual behavior
Multiple errors:
[INFO] [launch]: Default logging verbosity is set to INFO [INFO] [controller_server-1]: process started with pid [2561141] [INFO] [smoother_server-2]: process started with pid [2561143] [INFO] [planner_server-3]: process started with pid [2561145] [INFO] [behavior_server-4]: process started with pid [2561147] [INFO] [bt_navigator-5]: process started with pid [2561149] [INFO] [waypoint_follower-6]: process started with pid [2561151] [INFO] [velocity_smoother-7]: process started with pid [2561153] [INFO] [lifecycle_manager-8]: process started with pid [2561155] [lifecycle_manager-8] 1685658158.898666 [0] lifecycle_: Failed to find a free participant index for domain 0 [lifecycle_manager-8] [ERROR] [1685658158.898760137] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [lifecycle_manager-8] [lifecycle_manager-8] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [lifecycle_manager-8] This error state is being overwritten: [lifecycle_manager-8] [lifecycle_manager-8] ‘error not set, at ./src/rcl/node.c:263’ [lifecycle_manager-8] [lifecycle_manager-8] with this new error message: [lifecycle_manager-8] [lifecycle_manager-8] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [lifecycle_manager-8] [lifecycle_manager-8] rcutils_reset_error() should be called after error handling to avoid this. [lifecycle_manager-8] <<< [lifecycle_manager-8] [ERROR] [1685658158.898851751] [rcl]: Failed to fini publisher for node: 1 [lifecycle_manager-8] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [lifecycle_manager-8] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421 [velocity_smoother-7] [INFO] [1685658158.900652561] [velocity_smoother]: [velocity_smoother-7] velocity_smoother lifecycle node launched. [velocity_smoother-7] Waiting on external lifecycle transitions to activate [velocity_smoother-7] See https://design.ros2.org/articles/node_lifecycle.html for more information. [planner_server-3] 1685658158.901798 [0] planner_se: Failed to find a free participant index for domain 0 [planner_server-3] [ERROR] [1685658158.901891797] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [planner_server-3] [planner_server-3] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [planner_server-3] This error state is being overwritten: [planner_server-3] [planner_server-3] ‘error not set, at ./src/rcl/node.c:263’ [planner_server-3] [planner_server-3] with this new error message: [planner_server-3] [planner_server-3] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [planner_server-3] [planner_server-3] rcutils_reset_error() should be called after error handling to avoid this. [planner_server-3] <<< [planner_server-3] [ERROR] [1685658158.901982797] [rcl]: Failed to fini publisher for node: 1 [planner_server-3] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [planner_server-3] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421 [controller_server-1] 1685658158.902240 [0] controller: Failed to find a free participant index for domain 0 [controller_server-1] [ERROR] [1685658158.902346717] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [controller_server-1] [controller_server-1] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [controller_server-1] This error state is being overwritten: [controller_server-1] [controller_server-1] ‘error not set, at ./src/rcl/node.c:263’ [controller_server-1] [controller_server-1] with this new error message: [controller_server-1] [controller_server-1] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [controller_server-1] [controller_server-1] rcutils_reset_error() should be called after error handling to avoid this. [controller_server-1] <<< [controller_server-1] [ERROR] [1685658158.902473321] [rcl]: Failed to fini publisher for node: 1 [controller_server-1] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [controller_server-1] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421 [behavior_server-4] 1685658158.903089 [0] behavior_s: Failed to find a free participant index for domain 0 [behavior_server-4] [ERROR] [1685658158.903185626] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [behavior_server-4] [behavior_server-4] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [behavior_server-4] This error state is being overwritten: [behavior_server-4] [behavior_server-4] ‘error not set, at ./src/rcl/node.c:263’ [behavior_server-4] [behavior_server-4] with this new error message: [behavior_server-4] [behavior_server-4] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [behavior_server-4] [behavior_server-4] rcutils_reset_error() should be called after error handling to avoid this. [behavior_server-4] <<< [behavior_server-4] [ERROR] [1685658158.903255114] [rcl]: Failed to fini publisher for node: 1 [behavior_server-4] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [behavior_server-4] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421 [waypoint_follower-6] [INFO] [1685658158.904875824] [waypoint_follower]: [waypoint_follower-6] waypoint_follower lifecycle node launched. [waypoint_follower-6] Waiting on external lifecycle transitions to activate [waypoint_follower-6] See https://design.ros2.org/articles/node_lifecycle.html for more information. [smoother_server-2] 1685658158.906080 [0] smoother_s: Failed to find a free participant index for domain 0 [waypoint_follower-6] [INFO] [1685658158.906139702] [waypoint_follower]: Creating [smoother_server-2] [ERROR] [1685658158.906186368] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [smoother_server-2] [smoother_server-2] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [smoother_server-2] This error state is being overwritten: [smoother_server-2] [smoother_server-2] ‘error not set, at ./src/rcl/node.c:263’ [smoother_server-2] [smoother_server-2] with this new error message: [smoother_server-2] [smoother_server-2] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [smoother_server-2] [smoother_server-2] rcutils_reset_error() should be called after error handling to avoid this. [smoother_server-2] <<< [smoother_server-2] [ERROR] [1685658158.906262923] [rcl]: Failed to fini publisher for node: 1 [smoother_server-2] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [smoother_server-2] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421 [bt_navigator-5] 1685658158.906819 [0] bt_navigat: Failed to find a free participant index for domain 0 [bt_navigator-5] [ERROR] [1685658158.906923740] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error [bt_navigator-5] [bt_navigator-5] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [bt_navigator-5] This error state is being overwritten: [bt_navigator-5] [bt_navigator-5] ‘error not set, at ./src/rcl/node.c:263’ [bt_navigator-5] [bt_navigator-5] with this new error message: [bt_navigator-5] [bt_navigator-5] ‘rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421’ [bt_navigator-5] [bt_navigator-5] rcutils_reset_error() should be called after error handling to avoid this. [bt_navigator-5] <<< [bt_navigator-5] [ERROR] [1685658158.906995792] [rcl]: Failed to fini publisher for node: 1 [bt_navigator-5] terminate called after throwing an instance of ‘rclcpp::exceptions::RCLError’ [bt_navigator-5] what(): failed to initialize rcl node: rcl node’s rmw handle is invalid, at ./src/rcl/node.c:421
Additional information
Seems related to https://stackoverflow.com/questions/74232474/ros2-galacitc-failed-to-find-a-free-participant-index-for-domain
So suggested workaround appears to solve the issue with:
export CYCLONEDDS_URI=${CYCLONEDDS_URI:-"<CycloneDDS><Discovery><ParticipantIndex>auto</ParticipantIndex><MaxAutoParticipantIndex>100</MaxAutoParticipantIndex></Discovery></CycloneDDS>"}
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 23 (1 by maintainers)
Hi @SteveMacenski, it was changed in
rmw_cyclonedds_cppto support Iron’s new discovery modes (specifically, to prevent a random multicast discovery packet from Ethernet wiggling its way into a loopback interface). Simply changing the default in Cyclone will break Iron’s new behaviour, but I’m working on a change to Cyclone that makes it possible to support Iron’s behaviour while using multicast on loopback. I have the code to extract the data I need from the kernel on all three platforms, now I “only” need to use it.The plan then is to do a backport to 0.10 so Iron (and Humble) can get easy access to it.
I ran into the same issue. The solution presented here (https://github.com/ros2/rmw_cyclonedds/issues/458#issuecomment-1628823859) worked for me apart from that I had to manually enable multicast on the loopback interface.
So for the sake of completeness if someone is looking for a solution:
And manually enable multicast for the loopback interface
@doisyg pong!
Have mercy or faith or, ideally, both …
I just have too many things to juggle, but I haven’t forgotten it and I will get there …
for those who come here to find a solution for the new participant index issue - to preserve the previous behavior (the one not depending on participant indices) you need to manually set your ParticipantIndex to
none, e.g.Note: the multicast-disabling tag was not automatically added in my case for some reason, but maybe you will need to also re-enable multicast, i.e. the whole config could look like:
or in a config file (adding for readability):
Yes, that’s a safe assumption.