|
Download README.md from kenpeter123/twoleg: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/kenpeter123/twoleg/resolve/main/README.md
- Command line
-
hf download hf://kenpeter123/twoleg/README.md
-
curl -L -o README.md https://huggingface.co/kenpeter123/twoleg/resolve/main/README.md
2.42 kB
| tags: | |
| - mujoco | |
| - reinforcement-learning | |
| - robotics | |
| - humanoid | |
| - bipedal-locomotion | |
| # TwoLeg: a biped learning to walk in MuJoCo | |
| Work in progress. The robot does not walk yet. This repo holds the training code, the eval gate, and the audit trail of every attempt. | |
| ## Latest rollout | |
| <video width="480" height="360" controls> | |
| <source src="https://huggingface.co/kenpeter123/twoleg/resolve/main/walk_latest.mp4" type="video/mp4"> | |
| Your browser does not support the video tag. | |
| </video> | |
| 8 s rollout from run `2026-10-18_21-53-55`, training step 94,208,000 (checkpoint `step_94208000.pt`), held command 0.3 m/s forward. The clip stays upright (torso 0.263-0.286 m) but advances only about 0.03 m, so it still does not walk. | |
|  | |
| Leg assembly this policy drives: hip, knee, and ankle servos per leg, generated from the reference CAD by `training/scripts/generate_twoleg_model.py`. | |
| ## What counts as walking | |
| `training/scripts/verify_metrics.py` returns WALKS only when one rollout satisfies all six, per environment: | |
| - torso upright across the final 50-step window | |
| - each foot loaded more than half the steps | |
| - signed forward speed above 0.05 m/s | |
| - stance transfers above 0.4 Hz | |
| - knee bends more than 0.35 rad peak-to-peak | |
| - hip swings more than 0.20 rad peak-to-peak | |
| Speed is signed travel along each environment's own heading, so walking backwards fails. A missing or stale measurement file fails the loop instead of reading defaults. | |
| ## What is here | |
| - `training/src/twoleg_training/` — the mjlab velocity task, rewards, curriculum, and robot constants | |
| - `training/scripts/` — `verify_metrics.py` (the gate), `eval_walk.py` (long-horizon signed travel), `walk_loop.py` (train-and-gate loop) | |
| - `training/tests/` — gate unit tests, including three failure shapes the old gate accepted | |
| - `training/assets/twoleg.xml` — the generated model | |
| - `robot_item/`, `twoleg_mjcf/` — reference CAD, renders, and assembly clips | |
| - `.audit/` — the decision trail | |
| ## Reproduce the gate | |
| ```bash | |
| uv run python training/scripts/verify_metrics.py \ | |
| --checkpoint <path/to/model.pt> --command 0.1 \ | |
| --steps 250 --envs 4 --device cuda:0 | |
| ``` | |
| Exit 0 is WALKS, 1 is NO-WALK. The sidecar lands next to the checkpoint as `verify_metrics_cmd0.10.json`. | |
| ## Source | |
| Development happens at [kenpeter/twoleg](https://github.com/kenpeter/twoleg) on GitHub. This repo is a snapshot. | |