好用的云台pid
This commit is contained in:
parent
f641fe4051
commit
555e6e3747
@ -131,7 +131,7 @@ Config_RobotParam_t robot_config = {
|
||||
.range = -1.0f,
|
||||
},
|
||||
.pit_angle = {
|
||||
.k = 2.0f,
|
||||
.k = 5.0f,
|
||||
.p = 5.0f,
|
||||
.i = 2.5f,
|
||||
.d = 0.0f,
|
||||
|
||||
@ -239,7 +239,7 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
void Gimbal_Output(Gimbal_t *g){
|
||||
MOTOR_RM_SetOutput(&g->param->pit_motor, g->out.pit);
|
||||
MOTOR_MIT_Output_t output = {0};
|
||||
output.torque = g->out.yaw * 6.0f; // 乘以减速比
|
||||
output.torque = g->out.yaw * 5.0f; // 乘以减速比
|
||||
output.kd = 0.5f;
|
||||
MOTOR_RM_Ctrl(&g->param->pit_motor);
|
||||
MOTOR_DM_MITCtrl(&g->param->yaw_motor, &output);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user