diff --git a/docs/source/_static/videos/go2_hardware_deployment.mp4 b/docs/source/_static/videos/go2_hardware_deployment.mp4 new file mode 100644 index 00000000..61bf3b50 --- /dev/null +++ b/docs/source/_static/videos/go2_hardware_deployment.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b53062ae96377dc5c285618e7568b22d7579ab7a6645d411ad91b2d614025d11 +size 2650336 diff --git a/docs/source/_static/videos/go2_sim2real.mp4 b/docs/source/_static/videos/go2_sim2real.mp4 deleted file mode 100644 index 35d55eb5..00000000 --- a/docs/source/_static/videos/go2_sim2real.mp4 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:730620ee7b682aff4b763f7f6bbed45565fca0fc9d274c9e294ff8e35e6298b2 -size 2100189 diff --git a/docs/source/_static/videos/go2_sim2real_h264.mp4 b/docs/source/_static/videos/go2_sim2real_h264.mp4 deleted file mode 100644 index ad851e67..00000000 --- a/docs/source/_static/videos/go2_sim2real_h264.mp4 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6eb584e79bcc72b455af94a4c0ed260b041f1f407a7612305625187c28375858 -size 4422316 diff --git a/docs/source/_static/videos/go2_sim2sim.mp4 b/docs/source/_static/videos/go2_sim2sim.mp4 deleted file mode 100644 index edd3f3c5..00000000 --- a/docs/source/_static/videos/go2_sim2sim.mp4 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9969b4dd31e4245604b7743e1b00a03a69963f87babefbb2483177e13cde6411 -size 990750 diff --git a/docs/source/en/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md b/docs/source/en/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md index 3ba55177..20b53c84 100644 --- a/docs/source/en/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md +++ b/docs/source/en/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md @@ -1,137 +1,120 @@ -# Go2 flat-ground walking: sim2sim and sim2real +# Physical deployment -This page describes the complete path from a `go2-walk-flat` training policy to deployment: export an artifact, check it in MuJoCo or MotrixSim, and then run it on the real robot through the Unitree SDK2 DDS backend. The artifact keeps the policy, joint order, default pose, action scaling, and control period together; passing simulation does not guarantee hardware safety. +This page explains how to deploy the `go2-walk-flat` policy to a Unitree Go2: export and inspect a deployment artifact, check the policy in MuJoCo or MotrixSim, and then connect the real robot using the safety procedure. Simulation success does not establish hardware safety. For the first run, prepare load-bearing support, an independent emergency stop, and an on-site operator. -## 1. Train the policy +```{video} /_static/videos/go2_hardware_deployment.mp4 +:nocontrols: +:autoplay: +:playsinline: +:muted: +:loop: +:width: 100% +:align: center +``` + +## 1. Train and export the policy + +If you do not already have a training run, execute this from the repository root: ```bash source .venv/bin/activate mxlab train task=go2-walk-flat/rslrl.ppo ``` -Training outputs are stored under `runs/go2-walk-flat/`, and the trained gait should be replayed with `mxlab play` for inspection. - -## 2. Export and inspect the artifact +Training results are stored under `runs/go2-walk-flat/`. Export the latest run with metadata, or select a specific run with `run_dir`; exactly one of them may be set. When `output` is omitted, the artifact is saved to `artifacts/.deploy` by default: ```bash -mxlab export-deploy env=go2-walk-flat output=artifacts/go2-walk-flat.deploy -mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy -``` - -To pin a specific experiment, use `run_dir=/path/to/run` instead of `env`; exactly one may be set. Inspection must report `valid: true`. The artifact is self-contained: +mxlab export-deploy env=go2-walk-flat +# or: +mxlab export-deploy run_dir=/path/to/run -```text -go2-walk-flat.deploy/ -├── manifest.json # robot, control, task settings, and payload checksums -├── policy/model.onnx # exported actor with input normalization -└── task/ # task-owned payloads (for example, a G1 motion NPZ) +mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy ``` -Deployment also requires the `motrix_deploy_tasks` plugin, which provides the walking task implementation, deployment scene, and Hydra recipe, together with the runtime plugin for the selected target. The recipe is installed with the plugin and does not require a workspace configuration path when run outside the repository. Task defaults compose the typed runtime configuration, so no separate runtime group override is needed. Common top-level settings are `artifact` and `duration_s`. Runtime settings live under `runtime`; Unitree robot options live under `runtime.robot`, while transport settings such as `runtime.network_interface` remain directly under `runtime`. The configuration distinguishes simulation and hardware execution; `runtime.backend` selects `mujoco` or `motrixsim` for simulation and `unitree` for hardware. It is a scalar string selector, not a nested configuration mapping or Hydra config group. +Inspection must report `valid: true`. Add `output=` only when a custom output location is needed. -## 3. sim2sim: MuJoCo +Deployment requires `motrix_deploy_tasks` and the backend plugin for the selected target. The deployment recipe uses `runtime.transport.network_interface` to select the hardware Ethernet interface. -Headless bounded run: +## 2. Check the policy in simulation first -```bash -mxlab deploy task=go2-walk-flat/sim \ - artifact=artifacts/go2-walk-flat.deploy \ - runtime.viewer=false duration_s=2.0 -``` - -For interactive viewing, omit `runtime.viewer=false` to use the MuJoCo viewer: +Open the MuJoCo viewer: ```bash mxlab deploy task=go2-walk-flat/sim \ artifact=artifacts/go2-walk-flat.deploy ``` -In the viewer, use `W/S` for forward/backward motion, `A/D` for lateral motion, and `Q/E` for yaw; press Esc or Ctrl-C to exit. +Use `W/S` for forward/backward motion, `A/D` for lateral motion, and `Q/E` for yaw. Close the window, press Esc, or press Ctrl-C to exit. -```{video} /_static/videos/go2_sim2sim.mp4 -:nocontrols: -:autoplay: -:playsinline: -:muted: -:loop: -:width: 60% -:align: center -``` - -To select native MotrixSim, install `motrix-deploy-motrixsim` and reuse the same artifact: +After installing `motrix-deploy-motrixsim`, the same artifact can be reused: ```bash mxlab deploy task=go2-walk-flat/sim \ artifact=artifacts/go2-walk-flat.deploy \ - runtime.backend=motrixsim runtime.viewer=true + runtime.backend=motrixsim ``` -Use `task=go2-walk-rough/sim` to select the packaged rough-terrain scene. Changing the scene does not mean that a flat-ground policy is suitable for rough terrain; confirm policy applicability before testing. +`task=go2-walk-rough/sim` selects the rough-terrain scene, but a flat-ground policy is not automatically suitable for rough terrain. Go2 flat-ground training uses approximately `kp=35, kd=0.5` by default, while the hardware recipe uses `kp=50, kd=1`; confirm such differences before hardware execution. -Velocity tracking in simulation also does not equal hardware tracking. Simulation may randomize action delay, friction, mass, center of mass, observation noise, and other factors. A policy that walks in simulation is not necessarily stable on the real robot. Go2 simulation training and the artifact use approximately `kp=35, kd=0.5` by default, while the hardware recipe overrides these to `kp=50, kd=1`; this is one clear difference between sim2sim and sim2real. +## 3. Connect the robot and prepare safely -## 4. Hardware deployment: Unitree Go2 sim2real +Before starting: -Before starting, prepare reliable load-bearing supports, sufficient clearance for all legs, an independent emergency stop that the operator can reach, and a second operator. Stop all other low-level command publishers. Damping and deployment shutdown do not provide standing support; do not continue without a supported recovery plan. Before hardware execution, suspend the Go2 and switch it to low-level/debug mode. +- use reliable load-bearing support and provide clearance for every leg; +- prepare an independent emergency stop within the operator's reach and assign a second operator; +- stop every other low-level command publisher; +- remember that damping or deployment shutdown cannot maintain standing support, and prepare a supported recovery plan; +- for the first run, suspend the Go2 and switch it to low-level/debug mode. -Find the wired network interface and replace `enp5s0` in the commands below with the actual interface: +Find the wired interface connected to the robot: ```bash ip -br addr ``` -Connect the PC and Go2 with an Ethernet cable and verify that they can communicate. Set the PC Ethernet address on the same subnet as the robot, for example: +Replace `enp5s0` in the commands below with the actual interface. The PC and Go2 must be on the same subnet, for example: ```text PC address: 192.168.123.100 Go2 address: 192.168.123.161 ``` -Test the connection to the Go2 onboard computer: +Connect the Ethernet cable and verify communication: ```bash ping 192.168.123.161 ``` -### Read-only state check +## 4. Perform a read-only check before running the policy -This diagnostic does not create a command publisher. Replace `enp5s0` with the actual interface: +The read-only diagnostic does not create a command publisher or send motor commands: ```bash -motrix-deploy-unitree read-lowstate enp5s0 +motrix-deploy-unitree read-lowstate enp5s0 --robot go2 --duration-s 10 ``` -Check that valid state messages continue to arrive and that there are no CRC or decoding errors. The tool does not send motor commands or take official control. While official control remains active, remote buttons may also trigger official actions; do not treat button checks as side-effect-free operations. +Confirm that valid state samples continue to arrive and that there are no CRC or decoding errors. Remote buttons may still trigger the official controller while it is active; do not treat button checks as side-effect-free. -### Bounded single-joint check +## 5. Start the hardware policy -This test does not require an artifact or policy, but the whole body first transitions to a hold pose. Therefore all 12 joints may move even with `--offset 0`. Prepare supports and clearance, and use gains verified for the current robot and support arrangement, such as `kp=50` and `kd=1`. - -```bash -motrix-deploy-unitree joint-control enp5s0 FL_thigh_joint 0.9 \ - --artifact artifacts/go2-walk-flat.deploy -``` - -`Start` begins the hold-pose transition and `A` starts the selected joint test. `B` returns to the hold pose and then stops; before the test starts or while the startup transition is still running, `B` cancels and applies damping directly. - -### Full hardware run - -Keep `kp=50` and `kd=1` for the first run; do not increase gains before the suspended check. To reduce the fall risk from a DDS disconnect, press `L2+A` twice first to request lie-down. Replace `enp5s0` with the actual interface: +Keep `kp=50` and `kd=1` for the first run; do not increase gains before the suspended check. Maintain load-bearing protection when stopping. Communication loss, state timeout, Ctrl-C, and other faults do not execute the normal lie-down trajectory. ```bash mxlab deploy task=go2-walk-flat/hardware \ artifact=artifacts/go2-walk-flat.deploy \ - runtime.network_interface=enp5s0 + runtime.transport.network_interface=enp5s0 ``` -Press `Start`, wait for the pose transition to finish, then press `A` to enable the policy. Hold `L1` while moving the stick to send commands. `B` requests lie-down and `Select` triggers the emergency stop. Send damping before closing DDS. +If official control is still active, deployment asks for two confirmations: type `yes` only when ready to authorize the official StandDown movement; after observing that movement has finished and the body has reliable support, type `down` to authorize release. If official control has already been released, this step is skipped. An error or interruption after release does not restore official control automatically; never enable two controllers at once. -```{video} /_static/videos/go2_sim2real_h264.mp4 -:nocontrols: -:autoplay: -:playsinline: -:muted: -:loop: -:width: 50% -:align: center -``` +Use these controls during preparation and operation: + +| Control | Action | +| --- | --- | +| `Start` | Begin the transition to the default standing pose. | +| `A` | Enable the policy after preparation is complete and measured state is ready. | +| Hold `L1` and move the sticks | Send velocity commands; use small commands on the first run. | +| `B` | Transition toward the built-in lie-down pose, then finish with damping. Before preparation starts, apply damping only. | +| `Select` | Latch a software emergency damping stop; not a substitute for an independent emergency stop. | + +The Go2 task maps the left stick to planar motion and the right stick to yaw; `L1` must be held for stick commands to reach the policy. At the end, confirm that all low-level publishers have stopped before restoring official control using the robot's supported procedure. diff --git a/docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md b/docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md index 61151ba9..b8248add 100644 --- a/docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md +++ b/docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md @@ -27,7 +27,7 @@ plugin for the target. ## 2. Export and inspect ```bash -mxlab export-deploy env=go2-walk-flat output=artifacts/go2-walk-flat.deploy +mxlab export-deploy env=go2-walk-flat mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy ``` @@ -125,32 +125,6 @@ Check for valid state samples and CRC/decode errors. The tool sends no motor com control. Remote buttons may still affect the official controller while it is active; do not treat button checks as side-effect-free. -### Run a bounded single-joint test - -This test needs no artifact or policy. It can move **all twelve joints**, including with `--offset 0`, because it first -moves the whole robot to a holding pose. Use support, clearance, and gains reviewed for this robot and setup. - -First explicitly release official control; follow its `yes` and `down` confirmations: - -```bash -motrix-deploy-unitree release-control enp5s0 -``` - -Then run the test with explicitly selected gains: - -```bash -motrix-deploy-unitree joint-control enp5s0 FL_thigh_joint \ - --offset 0.05 --kp "${KP:?Set reviewed stiffness}" --kd "${KD:?Set reviewed damping}" -``` - -The command displays its targets and asks for `yes` before connecting. Start begins the holding-pose transition; A -starts the selected-joint test. `--offset` is in radians relative to the holding pose, not the initial measured angle; -use `--target` instead for an absolute angle. B returns to the holding pose and stops, except before or during startup, -when it cancels directly into damping. **This diagnostic B behavior differs from walking deployment's lie-down.** - -Use `motrix-deploy-unitree joint-control --help` for motion/startup timing options. Limit checks and startup protections -do not certify mechanical safety or total actuator torque. - ## 6. Common settings and failures Pass overrides after the selected task, for example: diff --git a/docs/source/zh_CN/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md b/docs/source/zh_CN/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md index f56fefcd..b480fad7 100644 --- a/docs/source/zh_CN/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md +++ b/docs/source/zh_CN/user_guide/envs/quadruped_velocity_tracking/go2_flat_sim2real.md @@ -1,145 +1,120 @@ -# Go2 平地步行:sim2sim 与 sim2real +# 真机部署 -本页描述 `go2-walk-flat` 从训练策略到部署的完整路径:导出 artifact,在 MuJoCo 或 MotrixSim 中检查,再通过 Unitree SDK2 DDS 运行真机。 -artifact 统一保存策略、关节顺序、默认姿态、动作缩放和控制周期;仿真通过不代表真机安全。 +本页介绍如何将 `go2-walk-flat` 策略部署到 Unitree Go2:先导出并检查 deployment artifact,再在 MuJoCo 或 MotrixSim 中检查策略,最后按安全流程连接真机。仿真成功不代表真机安全;首次运行必须准备承重支撑、独立急停和现场操作员。 -## 1. 训练策略 +```{video} /_static/videos/go2_hardware_deployment.mp4 +:nocontrols: +:autoplay: +:playsinline: +:muted: +:loop: +:width: 100% +:align: center +``` + +## 1. 训练并导出策略 + +如果还没有训练结果,在仓库根目录执行: ```bash source .venv/bin/activate mxlab train task=go2-walk-flat/rslrl.ppo ``` -训练结果位于 `runs/go2-walk-flat/`,训练后的步态需要通过 `mxlab play` 回放策略查看。 - -## 2. 导出并检查 artifact +训练结果位于 `runs/go2-walk-flat/`。导出最近一次包含 metadata 的实验,或使用 `run_dir` 固定某次实验;两者只能设置一个。未指定 `output` 时,artifact 默认保存到 `artifacts/.deploy`: ```bash -mxlab export-deploy env=go2-walk-flat output=artifacts/go2-walk-flat.deploy -mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy -``` +mxlab export-deploy env=go2-walk-flat +# 或: +mxlab export-deploy run_dir=/path/to/run -固定某次实验时用 `run_dir=/path/to/run` 替代 `env`,二者只能设置一个。检查输出必须为 `valid: true`。 -artifact 目录自包含: - -```text -go2-walk-flat.deploy/ -├── manifest.json # 机器人/控制/任务设置与 payload 校验和 -├── policy/model.onnx # 导出的 actor(含输入归一化) -└── task/ # 任务自有 payload(例如 G1 的 motion NPZ) +mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy ``` -部署还需要安装 `motrix_deploy_tasks` 插件,提供行走任务实现、 -部署场景和 Hydra 配方,以及目标对应的运行时插件。配方安装在插件中,在仓库外运行也不需要 workspace 配置路径。 -任务 defaults 组合类型化运行时配置,无需另行覆盖运行时组。 -顶层公共设置为 `artifact` 和 `duration_s`。运行时设置位于 `runtime` 下;Unitree 机器人专用选项 -位于 `runtime.robot` 下,而 `runtime.network_interface` 等传输设置仍直接位于 `runtime` 下。 -配置类型区分仿真与硬件执行路径;`runtime.backend` 选择插件(仿真为 `mujoco` 或 `motrixsim`,硬件为 `unitree`)。 -`runtime.backend` 是标量字符串选择器,不是嵌套配置映射或 Hydra 配置组。 +检查结果必须包含 `valid: true`。如需自定义输出位置,再添加 `output=`。 -## 3. sim2sim:MuJoCo +部署需要安装 `motrix_deploy_tasks`,并安装目标对应的后端插件。部署配方使用 `runtime.transport.network_interface` 指定真机网卡。 -无窗口短跑: +## 2. 部署前的仿真检查 -```bash -mxlab deploy task=go2-walk-flat/sim \ - artifact=artifacts/go2-walk-flat.deploy \ - runtime.viewer=false duration_s=2.0 -``` - -有窗口交互:查看时省略 `runtime.viewer=false`,默认使用MuJoco viewer。 +先使用 MuJoCo viewer 检查策略: ```bash mxlab deploy task=go2-walk-flat/sim \ artifact=artifacts/go2-walk-flat.deploy ``` -若要选择原生的MotrixSim,安装 `motrix-deploy-motrixsim` 后可复用同一 artifact: +按 `W/S` 前后移动、`A/D` 横移、`Q/E` 转向;关闭窗口、按 Esc 或 Ctrl-C 退出。 + +安装 `motrix-deploy-motrixsim` 后,也可以复用同一 artifact: ```bash mxlab deploy task=go2-walk-flat/sim \ artifact=artifacts/go2-walk-flat.deploy \ runtime.backend=motrixsim ``` -窗口中 `W/S` 前后移动、`A/D` 横移、`Q/E` 转向,Esc 或 Ctrl-C 退出。 -```{video} /_static/videos/go2_sim2sim.mp4 -:nocontrols: -:autoplay: -:playsinline: -:muted: -:loop: -:width: 60% -:align: center -``` - -使用 `task=go2-walk-rough/sim` 可选择随包提供的粗糙地形场景。更换场景不代表平地策略适合粗糙地形,测试前需确认策略适用范围。 +`task=go2-walk-rough/sim` 使用粗糙地形场景,但平地策略不因此就适用于粗糙地形。Go2 平地训练默认使用约 `kp=35, kd=0.5`,真机配方使用 `kp=50, kd=1`;这类差异需要在真机前确认。 -同时仿真中的速度跟踪并不等于真机跟踪,仿真中还涉及动作延迟、摩擦、质量、质心、观测噪声等随机化。即使 sim 中能走,也不能直接说明真机一定稳定。 -Go2 的仿真训练和 artifact 默认增益约为 `kp=35, kd=0.5`,而真机配方覆盖成了 `kp=50, kd=1`,这也是 sim2sim 到 sim2real 的一个明显差异。 +## 3. 真机连接与安全准备 -## 4. 真机部署sim2real:Unitree Go2 +开始前必须完成以下准备: -事前准备:准备可靠承重支撑、所有腿的活动空间、操作员就绪的独立急停,以及另一名操作人员。停止其他所有低层指令发布程序。 -阻尼和部署停止都不能维持站立支撑;没有受支撑的恢复方案时不要继续。 -真机前将 Go2 悬空,切换低层/调试模式,准备独立急停和现场操作员。 +- 使用可靠承重支撑,并确认所有腿有足够活动空间; +- 准备操作员可立即触达的独立急停,并安排第二名操作人员; +- 停止其他所有低层指令发布程序; +- 确认阻尼或部署停止不能维持站立支撑,并准备受支撑的恢复方案; +- 首次运行先让 Go2 悬空,切换到低层/调试模式。 -查找连接机器人的有线网卡,把后续指令的`enp5s0` 换成实际网卡: +查找连接机器人的有线网卡: ```bash ip -br addr ``` -将PC与Go2通过网线连接后,需要观察是否能够ping通,需将电脑 Ethernet 地址设置为与机器狗同一网段,如: + +将下面命令中的 `enp5s0` 替换为实际网卡。PC 与 Go2 需要位于同一网段,例如: ```text PC 地址:192.168.123.100 Go2 地址:192.168.123.161 ``` -为了测试用户电脑与Go2机器人内置电脑是否正常连接,可在终端中输入: - -```bash -ping 192.168.123.161 -``` -### 只读状态检查: +连接网线后先确认通信: -只读诊断不创建指令 publisher,把 `enp5s0` 换成实际网卡。: ```bash -motrix-deploy-unitree read-lowstate enp5s0 +ping 192.168.123.161 ``` -检查是否持续收到有效状态,以及是否有 CRC 或解码错误。该工具不发送电机指令,也不释放官方控制权。 -官方控制仍活动时,遥控器按键可能同时触发官方动作,不要将按键检查视为无副作用操作。 -### 有界单关节检查: +## 4. 策略运行前的只读检查 -此测试不需要 artifact 或策略,但会先让全身过渡到保持姿态,因此即使 `--offset 0`,全部 12 个关节仍可能运动。 -必须准备支撑和活动空间,并使用已针对当前机器人和支撑方式核验的增益,如 `kp=50`、`kd=1`。 +只读诊断不创建指令 publisher,也不发送电机指令: ```bash -motrix-deploy-unitree joint-control enp5s0 FL_thigh_joint 0.9 \ - --artifact artifacts/go2-walk-flat.deploy +motrix-deploy-unitree read-lowstate enp5s0 --robot go2 --duration-s 10 ``` -`Start` 开始保持姿态过渡,`A` 开始所选关节测试。`B` 返回保持姿态后停止;尚未开始或仍在启动过渡时,`B` 直接取消并阻尼。 -### 正式真机运行: +确认持续收到有效状态,并且没有 CRC 或解码错误。官方控制仍活动时,遥控器按键可能触发官方动作,不要将按键检查视为无副作用操作。 + +## 5. 启动真机策略 -首次运行保持 `kp=50`、`kd=1`,不要在悬空检查前提高增益。为了防止DDS断联Go2摔落,可先按两次L2+A,让机器人趴下,`enp5s0` 换成实际网卡,运行: +首次运行保持 `kp=50`、`kd=1`,不要在悬空检查前提高增益。停止时仍需承重保护;失联、状态超时、Ctrl-C 或其他故障不会执行正常趴下轨迹。 ```bash mxlab deploy task=go2-walk-flat/hardware \ artifact=artifacts/go2-walk-flat.deploy \ - runtime.network_interface=enp5s0 + runtime.transport.network_interface=enp5s0 ``` -按 `Start`,等待姿态过渡完成后按 `A` 接管策略;按住 `L1` 并移动摇杆发送指令。 -`B` 请求趴下,`Select` 急停。结束时先发送阻尼,再关闭 DDS。 +如果官方控制仍活动,部署命令会要求两次确认:仅在准备好授权官方 StandDown 动作时输入 `yes`;观察动作完成且机体已有可靠支撑后,再输入 `down` 授权释放。官方控制已经释放时会跳过这一步。释放后发生错误或中断不会自动恢复官方控制,不要同时启用两个控制器。 -```{video} /_static/videos/go2_sim2real_h264.mp4 -:nocontrols: -:autoplay: -:playsinline: -:muted: -:loop: -:width: 50% -:align: center -``` +准备和操作按键如下: + +| 操作 | 作用 | +| --- | --- | +| `Start` | 开始向默认站立姿态过渡。 | +| `A` | 准备完成并确认实测状态后启用策略。 | +| 按住 `L1` 并移动摇杆 | 发送速度指令;首次运行使用小幅指令。 | +| `B` | 向内置趴下姿态过渡,再阻尼结束。尚未开始准备时只执行阻尼。 | +| `Select` | 锁存软件急停阻尼,不能替代独立急停。 | + +Go2 遥控器输入由策略任务解释:左摇杆控制平面移动,右摇杆控制转向,必须按住 `L1` 才会发送摇杆指令。结束时先确认低层发布已停止,再按机器人支持的流程恢复官方控制。 diff --git a/docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md b/docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md index 6f89952e..03327c5a 100644 --- a/docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md +++ b/docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md @@ -24,7 +24,7 @@ mxlab train task=go2-walk-flat/rslrl.ppo ## 2. 导出与检查 ```bash -mxlab export-deploy env=go2-walk-flat output=artifacts/go2-walk-flat.deploy +mxlab export-deploy env=go2-walk-flat mxlab deploy inspect artifact=artifacts/go2-walk-flat.deploy ``` @@ -113,31 +113,6 @@ motrix-deploy-unitree read-lowstate enp5s0 --robot go2 --duration-s 10 检查是否持续收到有效状态,以及是否有 CRC 或解码错误。该工具不发送电机指令,也不释放官方控制权。 官方控制仍活动时,遥控器按键可能同时触发官方动作,不要将按键检查视为无副作用操作。 -### 有界单关节测试 - -此测试不需要 artifact 或策略,但会先让全身过渡到保持姿态,因此**即使 `--offset 0`,全部 12 个关节仍可能运动**。 -必须准备支撑和活动空间,并使用已针对当前机器人和支撑方式核验的增益。 - -先显式释放官方控制,并按提示完成 `yes` 和 `down` 确认: - -```bash -motrix-deploy-unitree release-control enp5s0 -``` - -再用明确选择的增益执行测试: - -```bash -motrix-deploy-unitree joint-control enp5s0 FL_thigh_joint \ - --offset 0.05 --kp "${KP:?请设置已核验的刚度}" --kd "${KD:?请设置已核验的阻尼}" -``` - -命令会展示目标,并在连接前要求输入 `yes`。Start 开始保持姿态过渡,A 开始所选关节测试。 -`--offset` 单位为 rad,相对于保持姿态而非启动实测角度;绝对目标用 `--target` 替代。 -B 返回保持姿态后停止;尚未开始或仍在启动过渡时,B 直接取消并阻尼。 -**这里的 B 不同于行走部署的趴下行为。** - -运动及启动时序选项见 `motrix-deploy-unitree joint-control --help`。限位和启动保护不认证机械安全,也不保证总输出力矩安全。 - ## 6. 常用设置与故障处理 在选定任务后附加覆写参数,例如: