mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 03:40:35 +08:00
* 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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user