Skip to content

feat(deploy): add Go2 flat walking policy and gated sim lifecycle - #116

Merged
wlgys8 merged 1 commit into
mainfrom
feat/go2-walk-flat-sim-lifecycle
Oct 12, 2026
Merged

wlgys8 merged 1 commit into
mainfrom
feat/go2-walk-flat-sim-lifecycle

Conversation

@wlgys8

@wlgys8 wlgys8 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the RSLRL PPO Go2 flat walking deployment artifact and use it in the default simulation recipe.
  • Fix gait-phase accumulation and reset behavior, with training parity regression coverage.
  • Start Go2 flat simulation crouched: R requests stand-up, measured readiness gates P policy takeover, and O requests 10 seconds of damping before shutdown.
  • Keep task-specific execution options and operator bindings in the task plugin rather than Go2-specific CLI branches.
  • Initialize from the scene robot init_key_pose while preserving the artifact default joint reference across MuJoCo and native MotrixSim.

Validation

  • Deployment regression suite: 561 tests passed.
  • Repository pre-commit hooks passed.
  • MuJoCo and native MotrixSim headless simulation smoke tests passed.

Scope

  • Hardware startup and remote-button behavior are unchanged.
  • Headless simulation automatically triggers preparation and policy takeover for testing.

@wlgys8
wlgys8 force-pushed the feat/go2-walk-flat-sim-lifecycle branch 2 times, most recently from 2fc3729 to 30b53a0 Compare October 12, 2026 15:18
@wlgys8
wlgys8 requested a balanced review from Copilot October 12, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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_bounds contract replaces CLI command-source branching; new Go2 preparation/damping state machine.
  • Typed Hydra runtime schemas (SimRuntimeCfg, HardwareRuntimeCfg/UnitreeBackendConfig) replace untyped runtime mappings and the command/kind fields.
  • 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.

Comment thread docs/source/en/user_guide/tutorial/advanced/motrix_deploy.md Outdated
Comment thread docs/source/zh_CN/user_guide/tutorial/advanced/motrix_deploy.md Outdated
@wlgys8
wlgys8 force-pushed the feat/go2-walk-flat-sim-lifecycle branch from 30b53a0 to 4b7f97a Compare October 12, 2026 16:18
@wlgys8
wlgys8 requested a balanced review from Copilot October 12, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

Comment thread motrix_deploy_unitree/src/motrix_deploy_unitree/interface.py
@wlgys8
wlgys8 merged commit 14309d3 into main Oct 12, 2026
7 checks passed
@wlgys8
wlgys8 deleted the feat/go2-walk-flat-sim-lifecycle branch October 17, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants