Repository navigation
feat(deploy): add Go2 flat walking policy and gated sim lifecycle - #116
Conversation
2fc3729 to
30b53a0
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It is a broad, safety-relevant refactor of deployment/hardware runtime contracts, config schemas, and a new control lifecycle spanning many packages, which warrants human review despite only documentation-staleness issues being found.
2 open findings
What changed in this PR
This PR adds the RSLRL PPO Go2 flat-walking deployment artifact and makes it the default simulation recipe, fixes gait-phase accumulation/reset to match training, and introduces a simulation-only "gated" standing lifecycle (crouch spawn → R stand-up → measured-readiness gate → P policy takeover → O damping-before-shutdown). It also refactors the Unitree hardware backend from a single UnitreeGo2BackendConfig into a shared UnitreeBackendConfig + robot-specific UnitreeGo2RobotCfg, replaces the KeyboardDeviceProvider/GamePadDeviceProvider protocols with runtime keyboard/gamepad properties, moves command-source assembly into a task-owned prepare() hook, and drops the duplicated period_s from task specs in favor of control.period_s.
Changes:
- Task-owned
prepare()/operator_hint/command_boundscontract replaces CLI command-source branching; new Go2 preparation/damping state machine. - Typed Hydra runtime schemas (
SimRuntimeCfg,HardwareRuntimeCfg/UnitreeBackendConfig) replace untypedruntimemappings and thecommand/kindfields. - New Go2 flat deployment artifact, crouch-spawn sim recipe, and init-pose-vs-artifact-default handling across MuJoCo and native MotrixSim.
| File | Description |
|---|---|
motrix_deploy_tasks/.../go2_walk.py |
Gait-phase accumulation fix + gated preparation/damping lifecycle and prepare() command assembly |
motrix_deploy/src/.../task.py |
Adds prepare/command_bounds/operator_hint; default_duration_s gains control_period_s |
motrix_deploy/src/.../cli.py |
Switches to typed runtime, device selection, and task prepare() session assembly |
motrix_deploy/src/.../config/__init__.py |
New SimRuntimeCfg/HardwareRuntimeCfg schemas + ConfigStore install |
motrix_deploy/src/.../runtime/{config,base,hardware,factory}.py |
Mutable SensorBindings, keyboard/gamepad runtime properties |
motrix_deploy/src/.../robot/interface.py |
Removes device-provider protocols; adds get_gamepad_device |
motrix_deploy_unitree/.../config.py, interface.py, plugin.py, direct.py |
Split transport vs robot config; rename to UnitreeBackendConfig/UnitreeGo2Robot; schema plugin |
motrix_deploy_mujoco/, motrix_deploy_motrixsim/ runtime |
initial_joint_position clipping, keyboard property, default vs init pose |
motrix_deploy_tasks/.../config/task/*.yaml |
Crouch sim recipe, typed hardware recipe, removed command sections |
g1_wbt.py, manifests |
Drop period_s; add Go2 flat artifact manifest |
| docs (en/zh) + READMEs + wiki | Tutorial/runtime updates for typed runtime and unitree backend |
| Tests across packages | Extensive coverage of gating, gait parity, typed config, Unitree refactor |
Notable issue: both tutorials still list command as a top-level setting even though this PR removes it from deploy.yaml/DeployRunConfig and now rejects unknown top-level keys (EN line 47, ZH line 45); the later command.velocity=... override examples are also now invalid.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
30b53a0 to
4b7f97a
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The change spans hardware-deployment lifecycle, device APIs, Hydra schema registration, and a new safety-relevant startup state machine, which warrants final human review despite being internally consistent and well-tested.
1 open finding
2 resolved since last review
🧠 Review effort: Balanced

Summary
Validation
Scope