tune: retune vision and gimbal angle PID, fix manual mode velocity hold

- Vision PID: increase Kp to 100, zero Ki/Kd, tighten CoefA/B
- Gimbal angle PID: reduce to P-only (Kp=1), lower IntegralLimit,
  remove derivative/output filters, unify MaxOut to 2000
- Manual mode: hold last velocity command on lost frames instead of
  stopping
- Debug mode: reset debug_updated flag on mode switch
- Remove stale .vscode settings copy
This commit is contained in:
2026-06-02 23:44:08 +08:00
parent 6c6efc7f36
commit fd2386d33a
3 changed files with 23 additions and 29 deletions
+7 -8
View File
@@ -36,12 +36,11 @@ void GimbalInit()
},
.controller_param_init_config = {
.angle_PID = {
.Kp = 30, .Ki = 80, .Kd = 0.2f,
.IntegralLimit = 1000,
.CoefA = 20, .CoefB = 10,
.Kp = 1, .Ki = 0, .Kd = 0,
.IntegralLimit = 45,
.CoefA = 15, .CoefB = 5,
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit |
PID_Derivative_On_Measurement | PID_ChangingIntegrationRate |
PID_DerivativeFilter | PID_OutputFilter,
PID_Derivative_On_Measurement | PID_ChangingIntegrationRate,
.MaxOut = 2000,
},
.other_angle_feedback_ptr = &gimbal_IMU_data->YawTotalAngle,
@@ -65,12 +64,12 @@ void GimbalInit()
},
.controller_param_init_config = {
.angle_PID = {
.Kp = 20, .Ki = 50, .Kd = 0.1f,
.IntegralLimit = 500,
.Kp = 1, .Ki = 0, .Kd = 0,
.IntegralLimit = 45,
.CoefA = 15, .CoefB = 5,
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit |
PID_Derivative_On_Measurement | PID_ChangingIntegrationRate,
.MaxOut = 1000,
.MaxOut = 2000,
},
.other_angle_feedback_ptr = &gimbal_IMU_data->Pitch,
.other_speed_feedback_ptr = &gimbal_IMU_data->Gyro[0],