Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a param
DDS_DOMAIN_ID
.This allows the
ROS_DOMAIN_ID
to be set to values other than the current default of 0, useful for managing multiple vehicles or keeping various ROS 2 running instances separated. The behaviour is backward compatible with a default of 0.The range of valid domain ids is 0 to 232 (see: https://docs.ros.org/en/rolling/Concepts/About-Domain-ID.html)
Comment: the param should really be
ROS_DOMAIN_ID
to be consistent with usage with the ros2 cli, but as it's in theDDS_
param tree the nameDDS_ROS_DOMAIN_ID
would just be confusing.Testing
Run the default UDP instance:
In a separate terminal start mavproxy and set the DDS_DOMAIN_ID to a different value:
Now restart the SITL instance prefixing with the
ROS_DOMAIN_ID
env variable setUse the ros2 cli to inspect nodes:
# expect no nodes, as the default domain is 0 $ ros2 node list
# expect the ardupilot node in domain 1 $ ROS_DOMAIN_ID=1 ros2 node list /ardupilot_dds