Skip to content

Commit

Permalink
Add ssrc models support for default px4 sitl build
Browse files Browse the repository at this point in the history
  • Loading branch information
haitomatic committed Jul 19, 2024
1 parent 541b750 commit 049e394
Show file tree
Hide file tree
Showing 55 changed files with 337,083 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=standard_vtol}

param set-default SIM_GZ_EN 1
param set-default SIM_GZ_RUN_GZSIM 0

param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=holybro_x500}

param set-default SIM_GZ_EN 1
param set-default SIM_GZ_RUN_GZSIM 0
param set-default SIM_GZ_SHOME 1
if [ "$PX4_RUN_GZSIM" = "0" ]; then
param set-default SIM_GZ_RUN_GZSIM 0
else
param set-default SIM_GZ_RUN_GZSIM 1
fi

param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
Expand Down
115 changes: 115 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/airframes/4404_gz_ssrc_standard_vtol
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/sh
#
# @name Standard VTOL
#
# @type Standard VTOL
#

. ${R}etc/init.d/rc.vtol_defaults

PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=ssrc_standard_vtol}

param set-default SIM_GZ_EN 1
param set-default SIM_GZ_SHOME 1
if [ "$PX4_RUN_GZSIM" = "0" ]; then
param set-default SIM_GZ_RUN_GZSIM 0
else
param set-default SIM_GZ_RUN_GZSIM 1
fi

param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1

# TODO: Enable motor failure detection when the
# VTOL no longer reports 0A for all ESCs in SITL
param set-default FD_ACT_EN 0
param set-default FD_ACT_MOT_TOUT 500

param set-default CA_AIRFRAME 2

param set-default COM_PREARM_MODE 2

param set-default CA_ROTOR_COUNT 5
param set-default CA_ROTOR0_PX 0.1515
param set-default CA_ROTOR0_PY 0.245
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.1515
param set-default CA_ROTOR1_PY -0.1875
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.1515
param set-default CA_ROTOR2_PY -0.245
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.1515
param set-default CA_ROTOR3_PY 0.1875
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_AX 1.0
param set-default CA_ROTOR4_AZ 0.0
param set-default CA_ROTOR4_PX 0.2

param set-default SIM_GZ_EC_FUNC1 101
param set-default SIM_GZ_EC_MIN1 10
param set-default SIM_GZ_EC_MAX1 1500
param set-default SIM_GZ_EC_FUNC2 102
param set-default SIM_GZ_EC_MIN2 10
param set-default SIM_GZ_EC_MAX2 1500
param set-default SIM_GZ_EC_FUNC3 103
param set-default SIM_GZ_EC_MIN3 10
param set-default SIM_GZ_EC_MAX3 1500
param set-default SIM_GZ_EC_FUNC4 104
param set-default SIM_GZ_EC_MIN4 10
param set-default SIM_GZ_EC_MAX4 1500

param set-default SIM_GZ_EC_FUNC5 105
param set-default SIM_GZ_EC_MIN5 0
param set-default SIM_GZ_EC_MAX5 3500

param set-default SIM_GZ_SV_FUNC1 201
param set-default SIM_GZ_SV_FUNC2 202
param set-default SIM_GZ_SV_FUNC3 203

param set-default COM_RC_IN_MODE 1
param set-default ASPD_PRIMARY 1

param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS1_TYPE 2
param set-default CA_SV_CS1_TRQ_R 0.5
param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS2_TRQ_P 1.0

param set-default FW_L1_PERIOD 12
param set-default FW_PR_FF 0.2
param set-default FW_PR_P 0.9
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.1
param set-default FW_RR_P 0.3
param set-default FW_THR_TRIM 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_THR_MIN 0.05
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2

param set-default MC_AIRMODE 1
param set-default MC_ROLLRATE_P 0.3
param set-default MC_YAW_P 1.6

param set-default MIS_TAKEOFF_ALT 10

param set-default MPC_XY_P 0.8
param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
param set-default MPC_XY_VEL_D_ACC 0.1

param set-default NAV_ACC_RAD 5

param set-default VT_FWD_THRUST_EN 4
param set-default VT_F_TRANS_THR 0.75
param set-default VT_TYPE 2
param set-default FD_ESCS_EN 0
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=skywalker_x8}

param set-default SIM_GZ_EN 1
param set-default SIM_GZ_RUN_GZSIM 0
param set-default SIM_GZ_SHOME 1
if [ "$PX4_RUN_GZSIM" = "0" ]; then
param set-default SIM_GZ_RUN_GZSIM 0
else
param set-default SIM_GZ_RUN_GZSIM 1
fi

param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=scout_mini}

param set-default SIM_GZ_EN 1
param set-default SIM_GZ_RUN_GZSIM 0
param set-default SIM_GZ_SHOME 1
if [ "$PX4_RUN_GZSIM" = "0" ]; then
param set-default SIM_GZ_RUN_GZSIM 0
else
param set-default SIM_GZ_RUN_GZSIM 1
fi

param set-default CA_AIRFRAME 6

Expand Down
6 changes: 4 additions & 2 deletions ROMFS/px4fmu_common/init.d-posix/airframes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ px4_add_romfs_files(
4004_gz_standard_vtol
4005_gz_x500_vision
4006_gz_px4vision
4401_gz_ssrc_fog_x

4401_gz_ssrc_holybro_x500
4440_gz_ssrc_skywalker_x8
50005_gz_ssrc_scout_mini_rover
4404_gz_ssrc_standard_vtol
50005_gz_ssrc_scout_mini

6011_gazebo-classic_typhoon_h480
6011_gazebo-classic_typhoon_h480.post
Expand Down
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 049e394

Please sign in to comment.