自瞄测试、云台底盘PID粗调

This commit is contained in:
周楚杰 2024-02-01 21:43:57 +08:00
parent 26e53fa916
commit 8be769bf3f
3 changed files with 9 additions and 9 deletions

View File

@ -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,

View File

@ -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度

View File

@ -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,