关节状态接口
TCP 查询电机温度
Section titled “TCP 查询电机温度”| 参数项 | 含义 | 数据类型 | 单位 |
|---|---|---|---|
| LeftFrontSway | 左前足侧摆关节电机的温度 | float | ℃ |
| LeftFrontHip | 左前足髋关节电机的温度 | float | ℃ |
| LeftFrontKnee | 左前足膝关节电机的温度 | float | ℃ |
| RightFrontSway | 右前足侧摆关节电机的温度 | float | ℃ |
| RightFrontHip | 右前足髋关节电机的温度 | float | ℃ |
| RightFrontKnee | 右前足膝关节电机的温度 | float | ℃ |
| LeftBackSway | 左后足侧摆关节电机的温度 | float | ℃ |
| LeftBackHip | 左后足髋关节电机的温度 | float | ℃ |
| LeftBackKnee | 左后足膝关节电机的温度 | float | ℃ |
| RightBackSway | 右后足侧摆关节电机的温度 | float | ℃ |
| RightBackHip | 右后足髋关节电机的温度 | float | ℃ |
| RightBackKnee | 右后足膝关节电机的温度 | float | ℃ |
UDP 上报关节数据
Section titled “UDP 上报关节数据”运动主机通过 UDP 上报 LegJointData 结构体数据(包含在 ControllerSensorData 中):
| 指令码 | 指令类型 | 发送频率 |
|---|---|---|
| 0x100A | 1 | 200Hz |
struct LegJointData{ union{ float data[12]; struct{ float fl_hipx_value, fl_hipy_value, fl_knee_value; float fr_hipx_value, fr_hipy_value, fr_knee_value; float hl_hipx_value, hl_hipy_value, hl_knee_value; float hr_hipx_value, hr_hipy_value, hr_knee_value; }; };};| 字段 | 类型 | 含义 |
|---|---|---|
| joint_pos | LegJointData | 关节位置(rad) |
| joint_vel | LegJointData | 关节速度(rad/s) |
| joint_tau | LegJointData | 关节力矩(N·m) |
12个关节的排列顺序:左前侧摆关节fl_hipx、左前髋关节fl_hipy、左前膝关节fl_knee、右前侧摆关节fr_hipx、右前髋关节fr_hipy、右前膝关节fr_knee、左后侧摆关节hl_hipx、左后髋关节hl_hipy、左后膝关节hl_knee、右后侧摆关节hr_hipx、右后髋关节hr_hipy、右后膝关节hr_knee。
UDP 上报关节温度
Section titled “UDP 上报关节温度”运动主机通过 UDP 上报关节温度数据(包含在 ControllerSafeData 中):
| 指令码 | 指令类型 | 发送频率 |
|---|---|---|
| 0x100B | 1 | 1Hz |
| 字段 | 类型 | 含义 |
|---|---|---|
| motor_temperature | float[12] | 12个关节的电机温度(℃) |
| driver_temperature | uint8_t[12] | 12个关节的驱动器温度(℃) |