Skip to content

Commit

Permalink
Adjust to gz, and quick tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
Perrrewi committed Dec 11, 2024
1 parent 1c2fd2f commit 68647d3
Showing 1 changed file with 42 additions and 11 deletions.
53 changes: 42 additions & 11 deletions ROMFS/px4fmu_common/init.d-posix/airframes/4030_gz_tiltrotor
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@

. ${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:=tiltrotor}

param set-default SIM_GZ_EN 1 # Gazebo bridge

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

param set-default MAV_TYPE 21

param set-default CA_AIRFRAME 3
Expand All @@ -27,6 +38,15 @@ param set-default CA_ROTOR3_KM -0.05

param set-default CA_ROTOR0_TILT 1
param set-default CA_ROTOR2_TILT 2
param set-default CA_SV_TL0_MAXA 90
param set-default CA_SV_TL0_MINA 0
param set-default CA_SV_TL0_TD 0
param set-default CA_SV_TL0_CT 1
param set-default CA_SV_TL1_MAXA 90
param set-default CA_SV_TL1_MINA 0
param set-default CA_SV_TL1_TD 0
param set-default CA_SV_TL1_CT 1

param set-default CA_SV_CS0_TRQ_R -0.5
param set-default CA_SV_CS0_TYPE 1
param set-default CA_SV_CS1_TRQ_R 0.5
Expand All @@ -36,15 +56,26 @@ param set-default CA_SV_CS2_TYPE 3
param set-default CA_SV_CS_COUNT 3
param set-default CA_SV_TL_COUNT 2

param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 204
param set-default PWM_MAIN_FUNC6 205
param set-default PWM_MAIN_FUNC7 201
param set-default PWM_MAIN_FUNC8 202
param set-default PWM_MAIN_FUNC9 203
param set-default SIM_GZ_EC_FUNC1 101
param set-default SIM_GZ_EC_FUNC2 102
param set-default SIM_GZ_EC_FUNC3 103
param set-default SIM_GZ_EC_FUNC4 104

param set-default SIM_GZ_EC_MIN1 10
param set-default SIM_GZ_EC_MIN2 10
param set-default SIM_GZ_EC_MIN3 10
param set-default SIM_GZ_EC_MIN4 10

param set-default SIM_GZ_EC_MAX1 1500
param set-default SIM_GZ_EC_MAX2 1500
param set-default SIM_GZ_EC_MAX3 1500
param set-default SIM_GZ_EC_MAX4 1500

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 SIM_GZ_SV_FUNC4 204
param set-default SIM_GZ_SV_FUNC5 205

param set-default NPFG_PERIOD 12
param set-default FW_PR_FF 0.2
Expand All @@ -61,8 +92,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_YAWRATE_P 0.3
param set-default MC_YAWRATE_I 0.3
param set-default MC_YAWRATE_P 0.4
param set-default MC_YAWRATE_I 0.1

param set-default MPC_XY_VEL_P_ACC 3
param set-default MPC_XY_VEL_I_ACC 4
Expand Down

0 comments on commit 68647d3

Please sign in to comment.