mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
修复INS_Task双重循环NAN的问题,暂时关闭了急停模式
This commit is contained in:
@@ -62,10 +62,14 @@ void ChassisInit()
|
||||
.can_init_config.can_handle=&hcan2,
|
||||
.controller_param_init_config = {
|
||||
.speed_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
.current_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
},
|
||||
.controller_setting_init_config = {
|
||||
|
||||
@@ -26,12 +26,14 @@ void GimbalInit()
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kd = 10,
|
||||
.Ki = 1,
|
||||
.Kd = 2,
|
||||
.Kd = 1,
|
||||
.Ki = 0,
|
||||
.Kd = 0,
|
||||
},
|
||||
.speed_PID = {
|
||||
|
||||
.Kd = 1,
|
||||
.Ki = 0,
|
||||
.Kd = 0,
|
||||
},
|
||||
.other_angle_feedback_ptr = &Gimbal_IMU_data->YawTotalAngle,
|
||||
// 还需要增加角速度额外反馈指针
|
||||
@@ -58,7 +60,9 @@ void GimbalInit()
|
||||
.Kd = 2,
|
||||
},
|
||||
.speed_PID = {
|
||||
|
||||
.Kd = 1,
|
||||
.Ki = 0,
|
||||
.Kd = 0,
|
||||
},
|
||||
.other_angle_feedback_ptr = &Gimbal_IMU_data->Pitch,
|
||||
// 还需要增加角速度额外反馈指针
|
||||
@@ -71,8 +75,8 @@ void GimbalInit()
|
||||
.close_loop_type = ANGLE_LOOP | SPEED_LOOP,
|
||||
.reverse_flag = MOTOR_DIRECTION_REVERSE,
|
||||
},
|
||||
.motor_type = GM6020};
|
||||
|
||||
.motor_type = GM6020,
|
||||
};
|
||||
// 电机对total_angle闭环,上电时为零,会保持静止,收到遥控器数据再动
|
||||
yaw_motor = DJIMotorInit(&yaw_config);
|
||||
pitch_motor = DJIMotorInit(&pitch_config);
|
||||
|
||||
@@ -28,16 +28,15 @@ void ShootInit()
|
||||
.tx_id = 1,
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kd = 10,
|
||||
.Ki = 1,
|
||||
.Kd = 2,
|
||||
},
|
||||
.speed_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
.current_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
},
|
||||
.controller_setting_init_config = {
|
||||
@@ -56,16 +55,15 @@ void ShootInit()
|
||||
.tx_id = 2,
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
.Kd = 10,
|
||||
.Ki = 1,
|
||||
.Kd = 2,
|
||||
},
|
||||
.speed_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
.current_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
},
|
||||
.controller_setting_init_config = {
|
||||
@@ -90,13 +88,19 @@ void ShootInit()
|
||||
.Kd = 2,
|
||||
},
|
||||
.angle_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
.speed_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
.current_PID = {
|
||||
|
||||
.Kp=1,
|
||||
.Ki=0,
|
||||
.Kd=0,
|
||||
},
|
||||
},
|
||||
.controller_setting_init_config = {
|
||||
|
||||
Reference in New Issue
Block a user