业务 Flow
当前版本的业务 Flow 分为 Client Push 和 Server Push 两类。所有业务 Flow Data 都必须先通过协议层 Flow 协商建立 FlowContext,随后使用 FLOW_DATA 发送数据
Client Push Flow
Client Push Flow 目前只包含速度指令
| Flow Name | 方向 | Payload Codec | Schema | 载荷结构 |
|---|---|---|---|---|
/cmd_vel | Client -> Server | Raw Binary | Twist | Twist |
/cmd_vel 表示连续速度控制指令。该 Flow 应使用较短 TTL 和较高发送频率限制。Server 在本地处于 DEGRADED 时必须拒绝或丢弃该 Flow 的数据
Server Push Flow
下表定义当前版本 Server Push 状态反馈 Flow
| Flow Name | 方向 | Payload Codec | Schema | 载荷结构 |
|---|---|---|---|---|
/mode | Server -> Client | Raw Binary | uint8 | uint8 |
/gait | Server -> Client | Raw Binary | uint8 | uint8 |
/state | Server -> Client | Raw Binary | uint8 | uint8 |
/odometry | Server -> Client | Raw Binary | Odometry | Odometry |
/imu | Server -> Client | Raw Binary | Imu | Imu |
/motor_statuses | Server -> Client | Raw Binary | MotorStatusArray | MotorStatusArray |
/battery_statuses | Server -> Client | Raw Binary | BatteryStatusArray | BatteryStatusArray |
/cpu_metrics | Server -> Client | Raw Binary | CpuMetrics | CpuMetrics |
/memory_metrics | Server -> Client | Raw Binary | MemoryMetrics | MemoryMetrics |
/storage_metrics | Server -> Client | Raw Binary | StorageMetrics | StorageMetrics |
机器人故障 Flow
机器人本体故障体系属于业务 Flow,不属于协议层 Event。当前版本预留专门 Flow:
| Flow Name | 方向 | Payload Codec | Schema | 说明 |
|---|---|---|---|---|
/fault_events | Server -> Client | JSON | FaultEvent | 机器人本地故障、告警、恢复等事件 |
/fault_events 的具体字段后续在业务接口定义中补充
默认 QoS 策略
当前版本使用以下默认 QoS 策略。具体数值必须以 Server 返回的 Flow QoS Grant 为准:
/cmd_vel使用best_effort、短 TTL、高活性要求;/mode、/gait和/state使用reliable,按状态变化与周期性刷新发送;- 高频状态 Flow 使用
best_effort,允许丢帧; - 故障和告警 Flow 应使用
reliable; - 诊断指标 Flow 可使用较低频率和较长活性超时;