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 Ramon Roche
parent 6ea3539157
commit 61079bd08b
+4 -1
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
@@ -314,7 +317,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