Skip to content

Commit 929cac4

Browse files
committed
add cyclonedds troubleshooting
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
1 parent eea589d commit 929cac4

4 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
nav:
22
- index.md
33
- performance-troubleshooting.md
4+
- runtime-troubleshooting.md

docs/community/support/troubleshooting/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ docker run --rm -it ghcr.io/autowarefoundation/autoware-universe:latest
177177

178178
## Runtime issues
179179

180+
### CycloneDDS: Failed to find a free participant index (ROS 2 Jazzy)
181+
182+
When using ROS 2 Jazzy with CycloneDDS, you may see "Failed to find a free participant index for domain 0" and nodes failing to start. See [Runtime Troubleshooting: CycloneDDS failed to find a free participant index](runtime-troubleshooting.md#cyclonedds-failed-to-find-a-free-participant-index) for the cause and how to fix it.
183+
180184
### Performance related issues
181185

182186
Symptoms:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Runtime Troubleshooting
2+
3+
This page describes runtime errors that are not covered by [Performance Troubleshooting](performance-troubleshooting.md) and how to resolve them.
4+
5+
## CycloneDDS: Failed to find a free participant index
6+
7+
### Symptoms
8+
9+
When running Autoware on **ROS 2 Jazzy** (Ubuntu 24.04) with `RMW_IMPLEMENTATION=rmw_cyclonedds_cpp`, some nodes fail to start with errors such as:
10+
11+
```text
12+
[component_container_mt-16] Failed to find a free participant index for domain 0
13+
[component_container_mt-16] [ERROR] [rmw_cyclonedds_cpp]: rmw_create_node: failed to create domain, error Error (check_create_domain() at ./src/rmw_node.cpp:1242)
14+
[component_container_mt-16] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
15+
[component_container_mt-16] what(): failed to initialize rcl node: error not set, at ./src/rcl/node.c:252
16+
```
17+
18+
This often occurs when launching demos that use many nodes (e.g. [Planning Simulator](https://autowarefoundation.github.io/autoware-documentation/main/demos/planning-sim/)).
19+
20+
### Cause
21+
22+
CycloneDDS itself defaults to `ParticipantIndex=none`, which does not limit the number of participants. However, on ROS 2 Jazzy, **rmw_cyclonedds_cpp** builds the domain configuration and explicitly sets `ParticipantIndex=auto` and `MaxAutoParticipantIndex=32`, overriding the CycloneDDS default. As a result, only about 32 DDS participants can exist per host. Autoware can use more DDS participants than this limit (e.g. 100 or more), so new nodes cannot obtain a free participant index and fail to create the domain.
23+
24+
This behavior comes from the RMW implementation; see [rmw_cyclonedds: check_create_domain()](https://github.com/ros2/rmw_cyclonedds/blob/7cd457de5825d4cb46ec7b081aa00a5392e388d0/rmw_cyclonedds_cpp/src/rmw_node.cpp#L1193-L1199) (lines 1193–1199).
25+
26+
### Solution
27+
28+
Configure CycloneDDS by adding a `<Discovery>` section to your `cyclonedds.xml` with `ParticipantIndex` set to `none`:
29+
30+
```xml
31+
<Discovery>
32+
<ParticipantIndex>none</ParticipantIndex>
33+
</Discovery>
34+
```
35+
36+
A full example is given in [CycloneDDS Configuration](../../../installation/additional-settings-for-developers/network-configuration/dds-settings.md#cyclonedds-configuration).
37+
38+
### References
39+
40+
- [autowarefoundation/autoware#6759](https://github.com/autowarefoundation/autoware/issues/6759) — Issue and discussion for this error
41+
- [rmw_cyclonedds: check_create_domain() (ParticipantIndex=auto, MaxAutoParticipantIndex=32)](https://github.com/ros2/rmw_cyclonedds/blob/7cd457de5825d4cb46ec7b081aa00a5392e388d0/rmw_cyclonedds_cpp/src/rmw_node.cpp#L1193-L1199) — Where the RMW overrides CycloneDDS defaults
42+
- [Eclipse Cyclone DDS — Controlling port numbers](https://cyclonedds.io/docs/cyclonedds/0.9.1/config.html#controlling-port-numbers)
43+
- [CycloneDDS config reference — MaxAutoParticipantIndex](https://cyclonedds.io/docs/cyclonedds/latest/config/config_file_reference.html#cyclonedds-domain-discovery-maxautoparticipantindex)

docs/installation/additional-settings-for-developers/network-configuration/dds-settings.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ Save the following file as `~/cyclonedds.xml`.
7474
<AllowMulticast>default</AllowMulticast>
7575
<MaxMessageSize>65500B</MaxMessageSize>
7676
</General>
77+
<Discovery>
78+
<ParticipantIndex>none</ParticipantIndex>
79+
</Discovery>
7780
<Internal>
7881
<SocketReceiveBufferSize min="10MB"/>
7982
<Watermarks>
@@ -84,6 +87,10 @@ Save the following file as `~/cyclonedds.xml`.
8487
</CycloneDDS>
8588
```
8689

90+
!!! note "When using CycloneDDS on ROS 2 Jazzy (Ubuntu 24.04)"
91+
92+
On ROS 2 Jazzy, the default maximum Participant Index in rmw_cyclonedds_cpp is limited to around 32, which can cause a "Failed to find a free participant index for domain 0" error when running many nodes (e.g. planning simulator). Adding the `<Discovery>` section above with `ParticipantIndex` set to `none` avoids this error. For more details, see [Runtime Troubleshooting: CycloneDDS failed to find a free participant index](../../../community/support/troubleshooting/runtime-troubleshooting.md#cyclonedds-failed-to-find-a-free-participant-index).
93+
8794
Then add the following lines to your `~/.bashrc` file.
8895

8996
```bash

0 commit comments

Comments
 (0)