mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
遥控器键鼠
This commit is contained in:
@@ -26,26 +26,26 @@ void GimbalInit()
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kp = 0.5, //0.55
|
||||
.Ki = 0.0,//0.05
|
||||
.Kd = 0.0,//0.02
|
||||
.CoefA =0.0,//0.5
|
||||
.CoefB = 0.0,//0.6
|
||||
.Kp = 0.8, //0.5
|
||||
.Ki = 6.0,//0
|
||||
.Kd = 0.0,//0
|
||||
.CoefA =10.0,//0
|
||||
.CoefB = 0.5,//0
|
||||
.Output_LPF_RC = 0,
|
||||
.DeadBand = 0.0,//0.02
|
||||
.Derivative_LPF_RC=0.0,//0.008
|
||||
.DeadBand = 0.0,//0
|
||||
.Derivative_LPF_RC=0.0,//0
|
||||
.Improve = PID_Trapezoid_Intergral |PID_ChangingIntegrationRate| PID_Integral_Limit |PID_Derivative_On_Measurement | PID_OutputFilter |PID_DerivativeFilter,
|
||||
.IntegralLimit = 0.0,
|
||||
.IntegralLimit = 5.0,
|
||||
|
||||
.MaxOut = 400,
|
||||
.MaxOut = 20,
|
||||
},
|
||||
.speed_PID = {
|
||||
.Kp = 15000,//22000
|
||||
.Kp = 25000,//14000
|
||||
.Ki = 0,//
|
||||
.Kd =0,
|
||||
// .CoefA = 0.8,
|
||||
// .CoefB = 0.1,
|
||||
.Output_LPF_RC = 0.0,//0.002
|
||||
.Output_LPF_RC = 0.0,//0
|
||||
.Improve = PID_Trapezoid_Intergral |PID_Integral_Limit |PID_Derivative_On_Measurement | PID_OutputFilter,
|
||||
.IntegralLimit = 0,
|
||||
.MaxOut = 20000,
|
||||
@@ -72,7 +72,7 @@ void GimbalInit()
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kp =0.4,//0.4
|
||||
.Kp =0.6,//0.4
|
||||
.Ki = 0.0,//0.15
|
||||
.Kd = 0.0,//0.006
|
||||
.CoefA = 0.0,//0.5
|
||||
@@ -81,17 +81,17 @@ void GimbalInit()
|
||||
.Output_LPF_RC = 0.0,//0.01
|
||||
.Improve = PID_Trapezoid_Intergral |PID_ChangingIntegrationRate| PID_Integral_Limit| PID_OutputFilter|PID_DerivativeFilter,
|
||||
.IntegralLimit =1,//1
|
||||
.MaxOut = 600,//600
|
||||
.MaxOut = 10,//600
|
||||
},
|
||||
.speed_PID = {
|
||||
.Kp=10000,//14000
|
||||
.Kp=13000,//10000
|
||||
.Ki =0,//0
|
||||
.Kd =0.0,//0.0005
|
||||
.CoefA =0,//1500
|
||||
.CoefB =0,//2000
|
||||
.Output_LPF_RC = 0.0,//0.005
|
||||
.Kd =0.0,//0
|
||||
.CoefA =0,//0
|
||||
.CoefB =0,//0
|
||||
.Output_LPF_RC = 0.0,//0
|
||||
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_OutputFilter,
|
||||
.IntegralLimit =3000,//3000
|
||||
.IntegralLimit =3000,//0
|
||||
.MaxOut = 20000,//20000
|
||||
},
|
||||
.other_angle_feedback_ptr = &gimba_IMU_data->Pitch,
|
||||
@@ -137,7 +137,7 @@ void GimbalTask()
|
||||
// DJIMotorSetFeedfoward(yaw_motor,SPEED_FEEDFORWARD);
|
||||
DJIMotorEnable(yaw_motor);
|
||||
DJIMotorEnable(pitch_motor);
|
||||
DJIMotorChangeFeed(yaw_motor, ANGLE_LOOP, OTHER_FEED);
|
||||
//DJIMotorChangeFeed(yaw_motor, ANGLE_LOOP, OTHER_FEED);
|
||||
DJIMotorChangeFeed(yaw_motor, SPEED_LOOP, OTHER_FEED);
|
||||
DJIMotorChangeFeed(pitch_motor, ANGLE_LOOP, OTHER_FEED);
|
||||
DJIMotorChangeFeed(pitch_motor, SPEED_LOOP, OTHER_FEED);
|
||||
|
||||
Reference in New Issue
Block a user