feat: add DEBUG mode with host-side PID tuning, motor enable/disable protection
- Add DEBUG mode (parallel to AUTO/MANUAL) for real-time PID parameter tuning - New 0xA8 debug frame: 12 floats for vision/motor angle PID tuning params - DMMotorSetMode: send zero-velocity before disable, clear PID to prevent jumps - motor_enable topic: pub from robot_cmd, sub in gimbal, controls motor on/off - motor_pid topic: pub from robot_cmd, sub in gimbal, updates motor angle PID - Rename DM motor enums (DM_CMD_ENABLE_MODE/DISABLE_MODE, DM_Motor_Ctrl_Mode_e) - SwitchToAuto/Manual: re-enable motors when switching back from DEBUG mode - Static-allocate enable_msg/pid_tune in GimbalTask to avoid stack churn - Add docs/host_comm_guide.md with Python Tkinter tuning GUI example - Remove ARCHITECTURE.md
This commit is contained in:
@@ -47,6 +47,19 @@ typedef struct
|
||||
uint8_t gimbal_power;
|
||||
} Gimbal_Upload_Data_s;
|
||||
|
||||
/* ---- CMD 发布给 gimbal 的电机使能指令 ---- */
|
||||
typedef struct
|
||||
{
|
||||
uint8_t enable; // 0=失能, 1=使能
|
||||
} Motor_Enable_s;
|
||||
|
||||
/* ---- CMD 发布给 gimbal 的电机角度环 PID 参数 ---- */
|
||||
typedef struct
|
||||
{
|
||||
float yaw_Kp, yaw_Ki, yaw_Kd;
|
||||
float pitch_Kp, pitch_Ki, pitch_Kd;
|
||||
} Motor_PID_Tune_s;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif // !ROBOT_DEF_H
|
||||
|
||||
Reference in New Issue
Block a user