Skip to content

[feat] Standalone G1 locomotion (loco.onnx) walking demo recorder#43

Open
Everloom-129 wants to merge 1 commit into
LightwheelAI:mainfrom
Everloom-129:feat/g1-loco-walk-demo
Open

[feat] Standalone G1 locomotion (loco.onnx) walking demo recorder#43
Everloom-129 wants to merge 1 commit into
LightwheelAI:mainfrom
Everloom-129:feat/g1-loco-walk-demo

Conversation

@Everloom-129

@Everloom-129 Everloom-129 commented May 30, 2026

Copy link
Copy Markdown

Summary

Adds a headless, teleop-free way to visually demo the bundled Unitree G1 locomotion policy (loco.onnx). Previously the loco/WBC policy could only be driven via a VR teleop device (KEYCONTROLLER_MAP only maps keyboard-pandaomron), so there was no one-command way to see G1 walk.

What's included

  • lw_benchhub/scripts/demo/g1_loco_walk.py — builds a minimal scene (ground + light + G1_Loco_CFG + follow camera) and reuses the exact Controller_loco / Controller_squat classes that LegPositionAction uses. It feeds a scripted [vx, vy, vyaw, squat] command (settle in squat, then walk forward in loco mode), renders headless, and exports an mp4 to results/.
    • Verified the leg-joint ordering matches LegPositionAction.loco_joint_ids at runtime.
    • Always closes the Isaac Sim app in a finally so a crash never leaks GPU memory.
  • README.md — new Locomotion Policy Demo (G1) section with the run command and flags.
  • configs/rl/skrl/g1_liftobj_state_play.yaml — G1 RL eval/play config (mirrors the existing lerobot_liftobj_state_play.yaml).
  • .gitignore — ignore generated lw_benchhub_logs/, .claude/, and uv.lock.

Usage

python ./lw_benchhub/scripts/demo/g1_loco_walk.py --out results/g1_loco_walk.mp4

Flags: --vx (forward speed m/s, default 0.3), --settle_steps, --walk_steps.

Testing

Ran end-to-end on an RTX 4060 (8 GB): the G1 walks ~1.3 m forward and stays upright; a valid 100-frame mp4 is written to results/g1_loco_walk.mp4.

g1_loco_walk.mp4

Add `lw_benchhub/scripts/demo/g1_loco_walk.py`, a headless, teleop-free demo
that drives the bundled G1 whole-body controllers (`loco.onnx` / `squat.onnx`,
the same `Controller_loco` / `Controller_squat` used by `LegPositionAction`)
with a scripted forward-walk command and exports an mp4.

- Reuses `G1_Loco_CFG` and the real low-level controllers; verified the leg
  joint ordering matches `LegPositionAction.loco_joint_ids`.
- README: add a "Locomotion Policy Demo (G1)" section with the run command
  and flags (`--vx`, `--settle_steps`, `--walk_steps`).
- configs: add `g1_liftobj_state_play.yaml` (G1 RL eval/play config).
- .gitignore: ignore generated `lw_benchhub_logs/`, `.claude/`, and `uv.lock`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant