From b54c2936beec3091f0120da655b77eb568dc63bd Mon Sep 17 00:00:00 2001 From: xtkuang <87661715@qq.com> Date: Fri, 31 Jul 2026 09:39:21 +0800 Subject: [PATCH] refactor: restore single root configuration Remove redundant UME and robot root profiles, keep the canonical cmvr_es configuration tree, and document per-host external deployment configuration. --- cmvr-es/config/README.md | 61 +++++++++---------- cmvr-es/config/cmvr_es_robot.pb.txt | 11 ---- cmvr-es/config/cmvr_es_ume.pb.txt | 10 --- .../manager/device_manager_robot.pb.txt | 24 -------- .../config/manager/device_manager_ume.pb.txt | 24 -------- .../config/manager/task_manager_robot.pb.txt | 14 ----- .../config/manager/task_manager_ume.pb.txt | 12 ---- 7 files changed, 30 insertions(+), 126 deletions(-) delete mode 100644 cmvr-es/config/cmvr_es_robot.pb.txt delete mode 100644 cmvr-es/config/cmvr_es_ume.pb.txt delete mode 100644 cmvr-es/config/manager/device_manager_robot.pb.txt delete mode 100644 cmvr-es/config/manager/device_manager_ume.pb.txt delete mode 100644 cmvr-es/config/manager/task_manager_robot.pb.txt delete mode 100644 cmvr-es/config/manager/task_manager_ume.pb.txt diff --git a/cmvr-es/config/README.md b/cmvr-es/config/README.md index 9fb2f0bc..e127e5c4 100644 --- a/cmvr-es/config/README.md +++ b/cmvr-es/config/README.md @@ -18,8 +18,6 @@ cmvr_es.pb.txt 入口文件: - [`cmvr_es.pb.txt`](cmvr_es.pb.txt) -- [`cmvr_es_ume.pb.txt`](cmvr_es_ume.pb.txt):UME 主端样例 -- [`cmvr_es_robot.pb.txt`](cmvr_es_robot.pb.txt):人形机械臂从端样例 - [`manager/device_manager.pb.txt`](manager/device_manager.pb.txt) - [`manager/task_manager.pb.txt`](manager/task_manager.pb.txt) @@ -111,47 +109,48 @@ output/bin/protoc \ 该命令只验证 Proto Text 解析,不验证文件、设备、证书、网络和跨字段语义。最终仍需运行组件测试和进程烟雾测试。 -## 双边遥操部署样例 +## 双边遥操配置 -仓库提供两个相互独立的 CMVR-ES 配置入口: +源码仓库保持唯一根入口 [`cmvr_es.pb.txt`](cmvr_es.pb.txt)。统一的 +[`manager/device_manager.pb.txt`](manager/device_manager.pb.txt) 已声明 +`ume_left`、`ume_right`、`ti5_motors` 和 `right_arm`;统一的 +[`manager/task_manager.pb.txt`](manager/task_manager.pb.txt) 已声明 +`ume_teleop` 和 gRPC server。角色差异不通过增加新的源码根配置文件表达,而由 +两台机器各自的外部部署配置决定。 -- UME 主端:[`cmvr_es_ume.pb.txt`](cmvr_es_ume.pb.txt),只声明 - `ume_left` 和 `ume_right`。两条机械臂在 DeviceManager 层默认关闭, - [`devices/arm/ume_arms.pb.txt`](devices/arm/ume_arms.pb.txt) 内部的 - `hardware_enabled` 也默认关闭;两层开关必须经过标定与安全验收后分别启用。 - 出站 `ume_teleop` Task 默认关闭,样例不包含机器人地址或凭据。当前 Task - 只实现会话/重连/心跳和 latest-only 指令邮箱,尚无生产算法调用 +UME 主端部署配置应只启用本机需要的 UME 设备和 `ume_teleop` Task: + +- `ume_left`、`ume_right` 在 DeviceManager 层默认关闭; +- [`devices/arm/ume_arms.pb.txt`](devices/arm/ume_arms.pb.txt) 内部的 + `hardware_enabled` 也默认关闭; +- 两层硬件门必须在完成 CAN 映射、限位标定和安全验收后分别启用; +- 当前 Task 只实现会话、重连、心跳和 latest-only 指令邮箱,尚无生产算法调用 `submitSetpoint()`,返回 effort 也尚未接入本地触觉协调器。 -- 人形机械臂从端:[`cmvr_es_robot.pb.txt`](cmvr_es_robot.pb.txt),通用 gRPC - server 可以启动,但 `ti5_motors` 和 `right_arm` 仍默认关闭。生产 - `ArmTeleop` 已实现真实 `RobotArm` 适配,但服务配置的 `enable` 显式关闭且 - 样例哈希故意留空。`MotorRobotArm.enable_teleop_group_servo` 目前只是预留字段; - 因为现有 `servoJ` 仍是逐关节顺序写,代码即使看到该字段为 true 也会拒绝能力。 - 必须先实现并验收原子或定时的组下发原语。因此启动 gRPC server 不等于允许遥操 - 执行,也不能绕过设备层硬件门。 -在两台边缘设备各自的源码或安装目录运行: +机器人从端部署配置应只启用经过验收的机械臂设备以及所需的 gRPC server: -```bash -# UME 主端(源码配置) -./output/bin/cmvr_es \ - --config ./cmvr-es/config/cmvr_es_ume.pb.txt +- `ti5_motors`、`right_arm` 默认关闭; +- `ArmTeleop` 服务后端默认关闭,模型哈希必须由部署配置明确给出; +- 当前 `MotorRobotArm::servoJ()` 仍是逐关节顺序写,不满足遥操作组伺服能力门; +- 启动 gRPC server 不代表允许遥操作执行,也不能绕过设备层硬件门。 -# 人形机械臂从端(源码配置) -./output/bin/cmvr_es \ - --config ./cmvr-es/config/cmvr_es_robot.pb.txt +部署时应把完整配置树分别复制到两台机器的外部目录,并继续使用相同的标准文件名: + +```text +/etc/cmvr-es/ume/cmvr_es.pb.txt +/etc/cmvr-es/robot/cmvr_es.pb.txt ``` -如果使用安装后的配置副本,则相应命令为: +两套根配置都继续引用各自目录下同名的 +`manager/device_manager.pb.txt` 和 `manager/task_manager.pb.txt`。运行命令为: ```bash -./output/bin/cmvr_es --config ./output/bin/config/cmvr_es_ume.pb.txt -./output/bin/cmvr_es --config ./output/bin/config/cmvr_es_robot.pb.txt +./output/bin/cmvr_es --config /etc/cmvr-es/ume/cmvr_es.pb.txt +./output/bin/cmvr_es --config /etc/cmvr-es/robot/cmvr_es.pb.txt ``` -上线前应把两套配置分别复制到两台机器的外部配置目录。主端需要填写从端地址、 -会话 manifest 和认证配置;从端需要换成现场机械臂设备配置,并在真实硬件测试后 -逐层开启。不要把生产 IP、token、私钥或设备标定值提交到仓库样例。 +UME 主端需要填写从端地址、会话 manifest 和认证配置;机器人从端需要填写现场 +机械臂配置。不要把生产 IP、token、私钥或设备标定值提交到仓库默认配置。 ## 生产配置 diff --git a/cmvr-es/config/cmvr_es_robot.pb.txt b/cmvr-es/config/cmvr_es_robot.pb.txt deleted file mode 100644 index 44f6f00f..00000000 --- a/cmvr-es/config/cmvr_es_robot.pb.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Follower robot-side CMVR-ES profile. -# -# The RobotArm ArmTeleop backend is implemented but explicitly disabled. The -# physical arm and service backend remain closed. Current MotorRobotArm -# sequential joint writes are rejected as a teleop group-servo capability until -# an atomic/timed group primitive and its safety timing gates are accepted. -cmvr_es { - logger_config_file: "logger/logger.pb.txt" - device_manager_config_file: "manager/device_manager_robot.pb.txt" - task_manager_config_file: "manager/task_manager_robot.pb.txt" -} diff --git a/cmvr-es/config/cmvr_es_ume.pb.txt b/cmvr-es/config/cmvr_es_ume.pb.txt deleted file mode 100644 index e20ef540..00000000 --- a/cmvr-es/config/cmvr_es_ume.pb.txt +++ /dev/null @@ -1,10 +0,0 @@ -# UME leader-side CMVR-ES profile. -# -# All relative paths below are resolved from this file's directory. This -# checked-in profile contains no production endpoint, credentials or hardware -# enablement. -cmvr_es { - logger_config_file: "logger/logger.pb.txt" - device_manager_config_file: "manager/device_manager_ume.pb.txt" - task_manager_config_file: "manager/task_manager_ume.pb.txt" -} diff --git a/cmvr-es/config/manager/device_manager_robot.pb.txt b/cmvr-es/config/manager/device_manager_robot.pb.txt deleted file mode 100644 index efc4a383..00000000 --- a/cmvr-es/config/manager/device_manager_robot.pb.txt +++ /dev/null @@ -1,24 +0,0 @@ -# Follower robot-side devices. -device_manager { - name: "cmvr_es_robot" - version: "0.1" - description: "CMVR humanoid follower edge system" - init_all_motors_when_no_active_joints: false - - devices { - id: "ti5_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/ti5_motors.pb.txt" - # Physical motor communication remains fail-closed in this example. - enable: false - } - - devices { - id: "right_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/arm.pb.txt" - # Do not enable until the motor system, URDF, limits, servoJ timing and - # independent emergency-stop path have passed the robot safety checkout. - enable: false - } -} diff --git a/cmvr-es/config/manager/device_manager_ume.pb.txt b/cmvr-es/config/manager/device_manager_ume.pb.txt deleted file mode 100644 index c908e447..00000000 --- a/cmvr-es/config/manager/device_manager_ume.pb.txt +++ /dev/null @@ -1,24 +0,0 @@ -# UME leader-side devices only. -device_manager { - name: "cmvr_es_ume" - version: "0.1" - description: "UME leader edge system" - init_all_motors_when_no_active_joints: false - - devices { - id: "ume_right" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/ume_arms.pb.txt" - # Hardware gate 1/2. Gate 2/2 is ume.hardware_enabled in the arm config. - # Keep both false until CAN mapping, limits and physical safety are verified. - enable: false - } - - devices { - id: "ume_left" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/ume_arms.pb.txt" - # Hardware gate 1/2. Gate 2/2 is ume.hardware_enabled in the arm config. - enable: false - } -} diff --git a/cmvr-es/config/manager/task_manager_robot.pb.txt b/cmvr-es/config/manager/task_manager_robot.pb.txt deleted file mode 100644 index dc53850a..00000000 --- a/cmvr-es/config/manager/task_manager_robot.pb.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Follower robot-side tasks. -task_manager { - tasks { - id: "grpc_server" - type: TASK_TYPE_GRPC_SERVER - run_mode: TASK_RUN_MODE_BLOCKING_SERVICE - config_file: "tasks/grpc_server_task/grpc_server_task.pb.txt" - # The generic gRPC server may be enabled for integration. This does not - # enable a physical arm: device entries and the implemented RobotArm - # ArmTeleop adapter are explicitly disabled. Current MotorRobotArm - # sequential joint dispatch also fails the group-servo capability gate. - enable: true - } -} diff --git a/cmvr-es/config/manager/task_manager_ume.pb.txt b/cmvr-es/config/manager/task_manager_ume.pb.txt deleted file mode 100644 index 0793bb7d..00000000 --- a/cmvr-es/config/manager/task_manager_ume.pb.txt +++ /dev/null @@ -1,12 +0,0 @@ -# UME leader-side tasks. -task_manager { - tasks { - id: "ume_teleop" - type: TASK_TYPE_UME_TELEOP - run_mode: TASK_RUN_MODE_BLOCKING_SERVICE - config_file: "tasks/ume_teleop_task/ume_teleop_task.pb.txt" - # Fail-closed: configure the follower endpoint, expected manifest and - # transport security before enabling outbound teleoperation. - enable: false - } -}