fix(test): harden SITL integration startup

Run PX4 integration tests from an isolated rootfs, wait for the ROS 2 vehicle_status publisher before launching ROS tests, and keep param set from consuming the startup env loop stdin.

This preserves multi-parameter test overrides used by EKF and attitude-controller cases while turning early PX4 exits into clear runner failures.
This commit is contained in:
Nuno Marques
2026-05-11 10:34:11 -07:00
parent 9b0475d0be
commit 1bce73fbb6
3 changed files with 54 additions and 4 deletions
+4 -4
View File
@@ -187,15 +187,15 @@ 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
COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
COM_DL_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR * 10))
echo "COM_DL_LOSS_T set to $COM_DL_LOSS_T_LONGER"
param set COM_DL_LOSS_T $COM_DL_LOSS_T_LONGER
COM_RC_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 1.0" | bc)
COM_RC_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR))
echo "COM_RC_LOSS_T set to $COM_RC_LOSS_T_LONGER"
param set COM_RC_LOSS_T $COM_RC_LOSS_T_LONGER
COM_OF_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 1.0" | bc)
COM_OF_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR))
echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER"
param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER
fi
@@ -231,7 +231,7 @@ env | while IFS='=' read -r line; do
value=${line#*=}
name=${line%%=*}
case $name in
"PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" ;;
"PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" < /dev/null ;;
esac
done