mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
feat(sim): add RotorPy simulator support (#27116)
* Add rotorpy simulator and integrate with main simulator script * docs: add rotorpy simulator instructions * docs(update): subedit * docs: address RotorPy review comments --------- Co-authored-by: Davide Iafrate <dvde.iafrate98@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
This commit is contained in:
@@ -40,6 +40,7 @@ px4_add_romfs_files(
|
||||
px4-rc.jmavsim
|
||||
px4-rc.mavlinksim
|
||||
px4-rc.sihsim
|
||||
px4-rc.rotorpy
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
33
ROMFS/px4fmu_common/init.d-posix/px4-rc.rotorpy
Normal file
33
ROMFS/px4fmu_common/init.d-posix/px4-rc.rotorpy
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "INFO [init] rotorpy sensors simulator"
|
||||
|
||||
param set-default SYS_HITL 1
|
||||
|
||||
if [ -n "${PX4_HOME_LAT}" ]; then
|
||||
param set SIH_LOC_LAT0 ${PX4_HOME_LAT}
|
||||
fi
|
||||
|
||||
if [ -n "${PX4_HOME_LON}" ]; then
|
||||
param set SIH_LOC_LON0 ${PX4_HOME_LON}
|
||||
fi
|
||||
if [ -n "${PX4_HOME_ALT}" ]; then
|
||||
param set SIH_LOC_H0 ${PX4_HOME_ALT}
|
||||
fi
|
||||
|
||||
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
|
||||
@@ -11,6 +11,11 @@ if [ "$PX4_SIMULATOR" = "sihsim" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "0"
|
||||
# Run SIH
|
||||
. px4-rc.sihsim
|
||||
|
||||
elif [ "$PX4_SIMULATOR" = "rotorpy" ]; then
|
||||
# No simulator, possibly HITL
|
||||
. px4-rc.mavlinksim
|
||||
. px4-rc.rotorpy
|
||||
|
||||
elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" = "1" ]; then
|
||||
# Run Gazebo (gz)
|
||||
. px4-rc.gzsim
|
||||
|
||||
Reference in New Issue
Block a user