Compare commits
2 Commits
f641fe4051
...
938115adff
| Author | SHA1 | Date | |
|---|---|---|---|
| 938115adff | |||
| 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,
|
||||
@ -171,10 +171,10 @@ Config_RobotParam_t robot_config = {
|
||||
.rc_can_param = {
|
||||
.can = BSP_CAN_1,
|
||||
.mode = RC_CAN_MODE_MASTER,
|
||||
.joy_id = 0x250,
|
||||
.sw_id = 0x251,
|
||||
.mouse_id = 0x252,
|
||||
.keyboard_id = 0x253,
|
||||
.joy_id = 0x30,
|
||||
.sw_id = 0x31,
|
||||
.mouse_id = 0x32,
|
||||
.keyboard_id = 0x33,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -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