mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-24 01:52:20 +08:00
damiao motor driver init
This commit is contained in:
@@ -79,12 +79,20 @@ void GimbalInit()
|
||||
},
|
||||
.speed_PID = {
|
||||
.Kp = 50, // 50
|
||||
.Ki = 350, // 350
|
||||
.Ki = 175, // 350
|
||||
.Kd = 0, // 0
|
||||
.Improve = PID_Trapezoid_Intergral | PID_Integral_Limit | PID_Derivative_On_Measurement,
|
||||
.IntegralLimit = 2500,
|
||||
.MaxOut = 20000,
|
||||
.MaxOut = 12000,
|
||||
},
|
||||
// .current_PID = { // 添加current_PID配置
|
||||
// .Kp = 0,
|
||||
// .Ki = 0,
|
||||
// .Kd = 0,
|
||||
// .Improve = PID_Integral_Limit,
|
||||
// .IntegralLimit = 5000,
|
||||
// .MaxOut = 15000,
|
||||
// },
|
||||
.other_angle_feedback_ptr = &gimba_IMU_data->Pitch,
|
||||
// 还需要增加角速度额外反馈指针,注意方向,ins_task.md中有c板的bodyframe坐标系说明
|
||||
.other_speed_feedback_ptr = (&gimba_IMU_data->Gyro[0]),
|
||||
@@ -95,6 +103,7 @@ void GimbalInit()
|
||||
.outer_loop_type = ANGLE_LOOP,
|
||||
.close_loop_type = SPEED_LOOP | ANGLE_LOOP,
|
||||
.motor_reverse_flag = MOTOR_DIRECTION_NORMAL,
|
||||
.feedback_reverse_flag = FEEDBACK_DIRECTION_REVERSE,
|
||||
},
|
||||
.motor_type = DM4310,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user