feat: add 0xA9 feedforward frame and wire feedforward controller to motor output

- host 0xA9 frame → master_machine decode → robot_cmd publish
  via gimbal_feedforward topic → gimbal subscribe → yaw_motor.feed_input
- add DM_Feedforward_Controller_s with Kp and feed_input fields
- add feedforward term (Kp * feed_input) to motor control output
- add DM_Feedforward_Kp to motor init config
This commit is contained in:
2026-06-07 02:18:36 +08:00
parent c0f43940bd
commit e1a01e6b53
7 changed files with 91 additions and 17 deletions
+6
View File
@@ -63,6 +63,12 @@ typedef struct
float pitch_Kp, pitch_Ki, pitch_Kd;
} Motor_PID_Tune_s;
/* ---- CMD 发布给 gimbal 的前馈输入 ---- */
typedef struct
{
float feedforward;
} Gimbal_Feedforward_s;
#pragma pack()
#endif // !ROBOT_DEF_H