mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 01:13:33 +08:00
Before #14212 the velocity control gains used in the multicopter position controller were defined as a scale between velocity error in one axis (or it's integral and derivative respectively) and the unit thrust vector. The problem with this is that the normalization of the unit thrust vector changes per vehicle or even vehicle configuration as 0 and 100% thrust get a different physical response. That's why the gains are now defined as scale between velocity error (integral/derivative) and the output acceleration in m/s².
64 lines
1.3 KiB
Bash
64 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# @name Generic quad delta VTOL
|
|
#
|
|
# @type Standard VTOL
|
|
# @class VTOL
|
|
#
|
|
# @maintainer Simon Wilks <simon@uaventure.com>
|
|
#
|
|
# @output MAIN1 motor 1
|
|
# @output MAIN2 motor 2
|
|
# @output MAIN3 motor 3
|
|
# @output MAIN4 motor 4
|
|
# @output AUX1 Right elevon
|
|
# @output AUX2 Left elevon
|
|
# @output AUX3 Motor
|
|
#
|
|
# @board intel_aerofc-v1 exclude
|
|
# @board bitcraze_crazyflie exclude
|
|
#
|
|
|
|
sh /etc/init.d/rc.vtol_defaults
|
|
|
|
if [ $AUTOCNF = yes ]
|
|
then
|
|
param set MC_ROLL_P 6.5
|
|
param set MC_ROLLRATE_P 0.15
|
|
param set MC_ROLLRATE_I 0.01
|
|
param set MC_ROLLRATE_D 0.003
|
|
param set MC_ROLLRATE_FF 0
|
|
param set MC_PITCH_P 6.5
|
|
param set MC_PITCHRATE_P 0.15
|
|
param set MC_PITCHRATE_I 0.01
|
|
param set MC_PITCHRATE_D 0.003
|
|
param set MC_PITCHRATE_FF 0
|
|
param set MC_YAW_P 3.5
|
|
param set MC_YAWRATE_P 0.2
|
|
param set MC_YAWRATE_I 0.1
|
|
param set MC_YAWRATE_D 0
|
|
param set MC_YAWRATE_FF 0
|
|
param set MC_YAWRATE_MAX 50
|
|
|
|
param set MPC_XY_P 0.8
|
|
param set MPC_XY_VEL_P_ACC 2
|
|
param set MPC_ACC_HOR_MAX 2
|
|
param set MPC_YAWRAUTO_MAX 20
|
|
|
|
param set PWM_AUX_DIS3 950
|
|
param set PWM_RATE 400
|
|
|
|
param set VT_MOT_ID 1234
|
|
param set VT_FW_MOT_OFFID 1234
|
|
param set VT_F_TRANS_THR 0.75
|
|
param set VT_IDLE_PWM_MC 1080
|
|
param set VT_TYPE 2
|
|
fi
|
|
|
|
set MAV_TYPE 22
|
|
|
|
set MIXER quad_x
|
|
set MIXER_AUX vtol_delta
|
|
|
|
set PWM_OUT 1234
|