自瞄测试、云台底盘PID粗调
This commit is contained in:
parent
26e53fa916
commit
8be769bf3f
|
@ -62,16 +62,16 @@ void ChassisInit()
|
|||
.can_init_config.can_handle = &hcan1,
|
||||
.controller_param_init_config = {
|
||||
.speed_PID = {
|
||||
.Kp = 10, // 4.5
|
||||
.Ki = 0, // 0
|
||||
.Kd = 0, // 0
|
||||
.Kp = 17, // 4.5
|
||||
.Ki = 3, // 0
|
||||
.Kd = 0.02f, // 0
|
||||
.IntegralLimit = 3000,
|
||||
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement,
|
||||
.MaxOut = 12000,
|
||||
},
|
||||
.current_PID = {
|
||||
.Kp = 0.4, // 0.4
|
||||
.Ki = 0, // 0
|
||||
.Kp = 0.4f, // 0.4
|
||||
.Ki = 0.1f, // 0
|
||||
.Kd = 0,
|
||||
.IntegralLimit = 3000,
|
||||
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement,
|
||||
|
|
|
@ -172,9 +172,9 @@ static void RemoteControlSet()
|
|||
|
||||
auto_aim(&aim_select, &trajectory_cal, vision_recv_data);
|
||||
|
||||
gimbal_cmd_send.yaw = trajectory_cal.cmd_yaw * 180 / PI;
|
||||
gimbal_cmd_send.yaw = -trajectory_cal.cmd_yaw * 180 / PI;
|
||||
|
||||
gimbal_cmd_send.pitch = trajectory_cal.cmd_pitch * 180 / PI;
|
||||
gimbal_cmd_send.pitch = -trajectory_cal.cmd_pitch * 180 / PI;
|
||||
|
||||
float yaw_err = fabsf(trajectory_cal.cmd_yaw - gimbal_cmd_send.yaw);
|
||||
if (yaw_err <= 0.008) //3度
|
||||
|
|
|
@ -26,9 +26,9 @@ void GimbalInit()
|
|||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kp = 30, // 8
|
||||
.Kp = 200, // 8
|
||||
.Ki = 0,
|
||||
.Kd = 1,
|
||||
.Kd = 6,
|
||||
.DeadBand = 0.1,
|
||||
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement,
|
||||
.IntegralLimit = 100,
|
||||
|
|
Loading…
Reference in New Issue