map ROS_LOCALHOST_ONLY to UXRCE_DDS_PTCFG#26547
Open
varadVaidya wants to merge 1 commit intoPX4:mainfrom
Open
Conversation
Author
|
If this is accepted on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In SITL startup, mirror
ROS_LOCALHOST_ONLYintoUXRCE_DDS_PTCFGso PX4 and ROS middleware locality policy stay aligned with environment-based bringup.Also document
ROS_LOCALHOST_ONLYas an env override forUXRCE_DDS_PTCFG.Solved Problem
When running PX4 SITL with ROS 2,
ROS_LOCALHOST_ONLYand PX4UXRCE_DDS_PTCFGcan become misaligned unless set manually.That mismatch causes DDS discovery/data flow failure from ROS 2 (e.g. missing
/fmu/out/*topics).Fixes #N/A
Solution
ROMFS/px4fmu_common/init.d-posix/rcS, mapROS_LOCALHOST_ONLYtoUXRCE_DDS_PTCFGduring SITL startup:ROS_LOCALHOST_ONLYis set and equals"1":UXRCE_DDS_PTCFG=1ROS_LOCALHOST_ONLYis set and is anything else:UXRCE_DDS_PTCFG=0ROS_LOCALHOST_ONLYis unset: leave parameter default behavior unchangeddocs/en/middleware/uxrce_dds.mdto documentROS_LOCALHOST_ONLYoverride and update example command.Changelog Entry
For release notes:
Alternatives
Test coverage
Tested with SITL (gz_x500, headless), MicroXRCEAgent UDP 8888, ROS_DOMAIN_ID=42.
Echo command used:
ros2 topic echo --once --no-daemon /fmu/out/vehicle_status_v1
--qos-reliability best_effort --qos-durability transient_local
Context
This keeps env-based SITL bringup minimal and deterministic: setting ROS_LOCALHOST_ONLY directly drives PX4 uXRCE locality mode.