fix: let UXRCE DDS agent IP to be set via parameter in SITL (#25231)

* Read XRCE_DDS IP from ENV

* just remove the -h flag from the launch command

* add 127.0.0.1 as default IP

* add default value for IP
This commit is contained in:
Sandesh Sharma
2025-07-25 15:10:02 +02:00
committed by GitHub
parent 539ef8b0d1
commit 959587d2c9

View File

@@ -190,6 +190,9 @@ param set-default SYS_FAILURE_EN 1
# does not go below 50% by default, but failure injection can trigger failsafes.
param set-default COM_LOW_BAT_ACT 3
# set default IP to localhost
param set-default UXRCE_DDS_AG_IP 2130706433 # 127.0.0.1
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
@@ -319,7 +322,7 @@ then
uxrce_dds_port="$PX4_UXRCE_DDS_PORT"
fi
uxrce_dds_client start -t udp -h 127.0.0.1 -p $uxrce_dds_port $uxrce_dds_ns
uxrce_dds_client start -t udp -p $uxrce_dds_port $uxrce_dds_ns
if param greater -s MNT_MODE_IN -1
then