refactor launch_ui.py and update README.md

This commit is contained in:
2026-05-25 18:22:59 +08:00
parent 7551f1e8ea
commit e57890cb11
6 changed files with 13 additions and 322 deletions

View File

@ -18,7 +18,7 @@ PICO/XR 双手柄 UDP 数据
已完成:
- PICO/XR 手柄 UDP 数据接收,并分发到左右手柄 ROS2 话题。
- 左臂、右臂、双臂的 mock 调试和真机调试 launch
- 通过统一的 `arm_debug.launch.py` 支持左臂、右臂、双臂的 mock 调试和真机调试。
- RM75 真机连接适配,包含速度透传初始化、安全速度/加速度配置、可选初始化点位移动。
- Tkinter 启动面板 `launcher_ui.py`,用于现场快速启动、监控 topic、检查环境和清理进程。
@ -40,9 +40,7 @@ src/
│ │ ├── left_arm_rm75.yaml # 左臂单独调试配置
│ │ └── right_arm_rm75.yaml # 右臂单独调试配置
│ ├── launch/
│ │ ── arm_debug.launch.py # 推荐主入口arm:=left/right/both, use_mock:=true/false
│ │ ├── dual_arm_mock.launch.py # 双臂 mock 快速入口
│ │ └── dual_arm_realman.launch.py
│ │ ── arm_debug.launch.py # 统一主入口arm:=left/right/both, use_mock:=true/false
│ └── tools/
│ └── launcher_ui.py # 图形化调试启动面板
├── xr_rm_input/
@ -57,8 +55,7 @@ src/
└── xr_rm_teleop/
└── xr_rm_teleop/
├── single_arm_velocity_teleop.py
── realman_adapter.py
└── gripper_trigger_bridge.py
── realman_adapter.py
```
`single_arm_velocity_teleop` 这个名字保留是有意的:双臂模式不是一个大节点直接控制两台机械臂,而是启动两个相同的单臂控制节点,分别命名为 `left_arm_teleop``right_arm_teleop`
@ -177,7 +174,7 @@ ros2 launch xr_rm_bringup arm_debug.launch.py arm:=both use_mock:=false \
## Launch 入口说明
`arm_debug.launch.py` 是当前推荐主入口
`arm_debug.launch.py` 是当前唯一的遥操作 launch 主入口,`launcher_ui.py` 中的 mock、单臂真机和双臂真机按钮都调用它
常用参数:
@ -190,8 +187,6 @@ ros2 launch xr_rm_bringup arm_debug.launch.py arm:=both use_mock:=false \
- `robot_port`RM75 TCP 端口,默认 `8080`
- `move_to_initial_pose_on_connect`:连接后是否执行 `movej`/`movel` 初始化,默认 `false`
`dual_arm_mock.launch.py``dual_arm_realman.launch.py` 是双臂快速入口,适合脚本化启动。它们也支持 `run_udp``run_left_arm``run_right_arm` 等开关,用于只启动部分节点。
## 配置文件说明
`xr_rm_bringup/config/dual_arm_rm75.yaml` 是双臂配置主文件,包含两个 ROS 节点命名空间:
@ -260,7 +255,7 @@ ros2 launch xr_rm_bringup arm_debug.launch.py arm:=both use_mock:=false \
- `hand``left``right`
- `grip`:运动使能。`true` 时进入相对位移控制,`false` 时停止。
- `trigger`:扳机值,范围 `0.0-1.0`。当前控制主链路不使用它,`gripper_trigger_bridge.py` 可将其转换为夹爪力控比例
- `trigger`:扳机值,范围 `0.0-1.0`。当前控制主链路不使用它,预留给后续夹爪集成
- `pos`:手柄位置,长度 3。
- `quat`:手柄姿态四元数,默认按 `xyzw` 解析。
@ -298,7 +293,7 @@ ros2 launch xr_rm_bringup arm_debug.launch.py arm:=both use_mock:=false \
### 3. 集成末端执行器
- `gripper_trigger_bridge.py` 纳入 bringup launch
- 新增夹爪控制节点或桥接节点,并纳入 `arm_debug.launch.py``launcher_ui.py`
- 明确夹爪 topic、力控比例、开合方向和安全上限。
-`launcher_ui.py` 中加入夹爪测试按钮和夹爪状态监控。
-`trigger` 从“预留字段”变成稳定的夹爪控制输入。