cmvr-es/protos/cmvr/config/biohead_config/biohead_config.proto
xtkuang 567ae938ef feat(head): add USB eRPC head control and expression gRPC
Add a head-local USB serial/eRPC backend through the existing device factory,
configuration, BioHeadService, logging and control arbiter. Support typed joint
commands, custom five-joint expressions and six frozen upper-computer presets
with 20 ms transitions, validation, ACK baselines and cancellation.

Retain existing ESP32 behavior and API field numbers. Publish only USB head
registration; preserve the machine-local AGV disable override in the worktree.

Validation: cmvr_es build; four head test targets (17 backend and 14 gRPC cases,
plus protocol and serial tests); live USB connection and gRPC state query.
The user additionally confirmed physical testing passed.
2026-11-11 14:58:50 +08:00

59 lines
1.5 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package cmvr.config;
// 原 ESP32 头部的舵机分组配置。
message BioHeadServoGroupConfig {
string name = 1;
int32 address = 2;
int32 channel_start = 3;
int32 channel_end = 4;
repeated double offset = 5;
repeated double min_angles = 6;
repeated double max_angles = 7;
}
// USB eRPC 服务 1 的单个舵机关节配置。
// 所有位置参数的单位均为弧度 rad。
message UsbHeadJointConfig {
// 与控制板固件中的舵机 ID 对应。
string id = 1;
// 允许下发的最小位置。
double min_position_rad = 2;
// 允许下发的最大位置。
double max_position_rad = 3;
// 显式调用 home 时使用的目标位置。
double home_position_rad = 4;
}
// USB eRPC 服务 1 的设备配置。
message UsbHeadErpcConfig {
// 应答超时,单位 ms。
// 后续驱动中:0 表示使用默认 2000 ms,最大允许 30000 ms。
uint32 response_timeout_ms = 1;
// 该设备允许控制的关节及其标定参数。
repeated UsbHeadJointConfig joints = 2;
}
// 头部设备配置。
message BioHeadRobotConfig {
string id = 1;
string serial_port = 2;
int32 baud_rate = 3;
// 原 ESP32 后端使用的配置,保留原字段编号。
repeated BioHeadServoGroupConfig servo_groups = 4;
// 配置此字段时,选择新增的 USB eRPC 后端。
// 未配置时,继续使用原 ESP32 后端。
UsbHeadErpcConfig usb_erpc = 5;
}
// 配置文件的根结构。
message BioHeadRobotRootConfig {
BioHeadRobotConfig bio_head = 1;
}