* refactor sensor simulation modules to one module called SensorSimManager. allows better failure handling

* still all sensors can be enabled/disabled through parameters
* check airspeed simulation (sih.cpp has seperate calc.)
This commit is contained in:
Marco Hauswirth
2025-09-18 00:19:32 +02:00
parent 7ee9ba0c48
commit 8bf68e91e2
34 changed files with 873 additions and 2017 deletions
+13 -11
View File
@@ -193,14 +193,16 @@ else
exit 1
fi
# NOTE: Only for rover_mecanum and spacecraft_2d. All other models have
# the magnetometer sensor in the model.sdf.
if param compare -s SENS_EN_MAGSIM 1
then
sensor_mag_sim start
fi
# NOTE: new gz has airspeed sensor, remove once added
if param compare -s SENS_EN_ARSPDSIM 1
then
sensor_airspeed_sim start
fi
# TODO:
# # NOTE: Only for rover_mecanum and spacecraft_2d. All other models have
# # the magnetometer sensor in the model.sdf.
# if param compare -s SENS_EN_MAGSIM 1
# then
# sensor_mag_sim start
# fi
# # NOTE: new gz has airspeed sensor, remove once added
# if param compare -s SENS_EN_ARSPDSIM 1
# then
# sensor_airspeed_sim start
# fi
+1 -16
View File
@@ -15,22 +15,7 @@ fi
if simulator_sih start; then
if param compare -s SENS_EN_BAROSIM 1
then
sensor_baro_sim start
fi
if param compare -s SENS_EN_GPSSIM 1
then
sensor_gps_sim start
fi
if param compare -s SENS_EN_MAGSIM 1
then
sensor_mag_sim start
fi
if param compare -s SENS_EN_AGPSIM 1
then
sensor_agp_sim start
fi
sensor_sim_manager start
else
echo "ERROR [init] simulator_sih failed to start"
+1 -4
View File
@@ -336,10 +336,7 @@ else
if param compare SYS_HITL 2
then
simulator_sih start
sensor_baro_sim start
sensor_mag_sim start
sensor_gps_sim start
sensor_agp_sim start
sensor_sim_manager start
fi
else