leggedrobotics/terrain-grounded-imagination
arXiv:2611.41771 ↗World-model training for legged locomotion with differentiable terrain queries
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Terrain-Grounded Imagination (TGI) is a locomotion trainer, not an LLM inference engine. Simulator transitions train an action- and terrain-conditioned world model to predict the robot’s next state and contact forces. Policy updates start from simulator states and backpropagate returns through 32 imagined steps (0.64 s), bootstrapping with a critic. At a poorly supported imagined touchdown, the gradient path is cut and the critic takes over earlier. A success-guided curriculum samples terrain types and difficulty levels.
The key design choice is to learn dynamics, not terrain. Differentiable queries of simulator geometry supply terrain information to the world model, rewards, terminations, critic, and perception, so gaps and edges do not depend on a learned reconstruction. This is the integration boundary: perception can vary provided it reads terrain through those lookups. The Python workspace separates G1 environments and foothold prediction (fpm/) from 2.5D G1 training (tgi/), 3D G1 training (tgi_g1_3d/), and 3D ANYmal-D training (tgi_anymal/).
Key Capabilities & Differentiators
The 2.5D G1 task tracks velocity commands over stairs, gaps, pits, and stepping stones, using pelvis and sole heightmaps and foothold-gated perception. The 3D G1 task uses goal commands and adds overhangs. Its policy sees a 32 × 32 × 40 voxel grid at 5 cm resolution from two torso LiDARs. The dynamics and task logic query a separate layered distance field at 15 support points per sole and 53 body collision spheres, allowing them to distinguish footing from overhead clearance.
In its 2,048-episode evaluation with no pushes, the 3D G1 policy recorded 99.7% success and a 0.15% fall rate; success required surviving 20 seconds and reaching the first goal in time. ANYmal-D predicts foot and body contact forces, including knee contact during climbs. It recorded 92.4% success in one 10,270-episode evaluation and 91.0 ± 2.1% over five seeds, with success defined as finishing within 0.5 m of the goal at 8 seconds. In the single-run breakdown, climb-up success was 78.1% and stepping-stone success was 82.1%. The two robots’ headline rates are not directly comparable.
Trade-offs & Limitations
Compared with direct simulator PPO, TGI adds a learned dynamics model and differentiable terrain queries in exchange for a path to optimize the policy by backpropagating through imagined dynamics. It still requires simulator transitions. Reading terrain directly avoids having to learn the geometry of gaps and overhangs, but it does not fix errors in predicted motion or forces. The short horizon and touchdown gradient cut limit reliance on those predictions; they also leave the critic responsible for more of the return when the gradient is cut early.
The 2.5D heightmap path suits terrain describable by a single height per location; overhangs require the richer 3D representation used here, with separate distance-field and LiDAR processing. Adoption is easiest when the existing robot, simulator, and task definitions match. A port needs compatible geometry queries and task logic as well as fitted dynamics, not just a new robot asset. For a decision against PPO, compare end-to-end training cost and matched evaluation protocols, and treat cross-simulator tests or hardware demonstrations as distinct from the reported simulation success rates.
Hardware & Deployment Guide
The tested stack is Linux with Isaac Lab 3.0.0, Isaac Sim 6.1, Newton 1.6.1, and PyTorch 2.11. In the Isaac Lab Python environment, install fpm with pip install -e fpm --no-deps, then install the task packages in editable mode. Run scripts/convert_g1_usd.py once from the chosen G1 task directory, then scripts/train.py --log_dir logs/<run_name>. ANYmal-D starts with its own scripts/train.py. These are local GPU jobs. The documented 2.5D G1 and ANYmal-D runs took about 7.5 and 5.6 hours respectively on an RTX PRO 6000; the 3D G1 run took 12.1 hours on a 16 GB RTX 5080. These are reference runs, not minimum requirements.
For 2.5D G1, scripts/export.py --ckpt produces an fpm-format artifact, which can be played through fpm/scripts/play.py or tested with scripts/sim2sim.py --export_dir in MuJoCo. scripts/isaac_eval.sh is a 1,100-step check with startup randomization enabled, not the full 3,300-step protocol with startup randomization zeroed. For the full test, use --save_results and compute the fraction of episodes that both avoid falling and cover at least 70% of commanded distance; the script’s printed “success” is mean distance share instead. There is no tagged release to pin, so record the commit and simulator versions used for each run.
fpm format; MuJoCo transfer and Isaac locomotion validation are separate CLI paths.Robotics teams with an Isaac Lab GPU setup that want to reproduce terrain-aware locomotion experiments or compare model-based policy gradients against PPO on G1 or ANYmal-D.
You need a ready-to-deploy robot controller, cannot run the Isaac Lab stack locally, or lack terrain queries and contact definitions for the robot you plan to port.
Quick Start & Installation
git clone https://github.com/leggedrobotics/terrain-grounded-imagination cd terrain-grounded-imagination pip install -e fpm --no-deps pip install -e tgi pip install -e tgi_g1_3d pip install -e tgi_anymal
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/leggedrobotics/terrain-grounded-imagination.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about terrain-grounded-imagination
Which interface matters when adding a sensor or porting to another robot?
How much GPU memory should I budget?
Can we self-host this for commercial research or redistribute it?
When should we choose TGI over direct simulator PPO?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy