← Back to Leaderboard
Tleggedrobotics

leggedrobotics/terrain-grounded-imagination

arXiv:2611.41771 ↗

World-model training for legged locomotion with differentiable terrain queries

View on GitHub ↗
LLM TrainerQuickstart ↓
Engineering Health (Methodology)
A · 76/100
Maintenance Activity
● Updated today
Latest Release
Rolling commits (main)
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption10/25
Release Cadence11/20
License Clarity20/20
GPUCLI
Total Stars
★ 258
24h Growth
+9
7d Growth
+110
Forks
14

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

leggedrobotics/terrain-grounded-imagination Star History (2026-11-03 - 2026-12-01) DAILY STAR HISTORY (29-DAY D1 TELEMETRY) +257 in 28d · avg +9/day 272 136 0 2026-11-03: ★ 12026-11-05: ★ 742026-11-07: ★ 852026-11-09: ★ 892026-11-11: ★ 952026-11-13: ★ 1062026-11-15: ★ 1112026-11-17: ★ 1202026-11-19: ★ 1272026-11-21: ★ 1322026-11-23: ★ 1472026-11-25: ★ 1492026-11-27: ★ 2242026-11-29: ★ 2422026-12-01: ★ 258 ★ 258 11-03 11-17 12-01

Evidence-Backed Technical Brief

AI Deep Review

Architecture & 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.

Dynamics and geometry: Learned next-state and force predictions are coupled to differentiable queries of simulator terrain.
Policy update: Backpropagation spans up to 32 steps (0.64 s); the critic takes over at the horizon or at a poorly supported imagined touchdown.
2.5D perception: G1 uses pelvis and sole heightmaps and foothold-gated observations; the impact penalty activates above 450 N.
3D perception: G1 uses a 32 × 32 × 40 LiDAR voxel grid at 5 cm resolution, while support and collision checks use a layered distance field.
Body contacts: The ANYmal-D model predicts foot and body contact forces, including knee contact during climbs; foot forces above 600 N are penalized.
Evaluation: The G1 export uses the fpm format; MuJoCo transfer and Isaac locomotion validation are separate CLI paths.
Best For

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.

Skip If

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.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodologyReport inaccuracy

Quick Start & Installation

GPUCLI
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.

Raw .md ↗
curl -sL https://repoforai.com/repo/leggedrobotics/terrain-grounded-imagination.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

leggedrobotics/terrain-grounded-imagination Star History on RepoForAI

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?

The shared interface is the state-dependent terrain lookup. Perception that reads through this interface can use the same terrain-query logic in simulation and in imagined rollouts. The G1 examples use foothold-local observations or egocentric LiDAR voxels. A new robot still needs compatible state, action, contact, reward, and termination definitions, as well as simulator transitions for fitting its world model.

How much GPU memory should I budget?

The 3D G1 default ran 4,096 environments for 40k iterations in 12.1 hours on an RTX 5080 with 16 GB. That is one tested configuration, not a minimum VRAM requirement or a peak-memory measurement. Size the job around the chosen task, environment count, and perception workload, then measure peak memory in the Isaac Lab environment before committing to a full run.

Can we self-host this for commercial research or redistribute it?

The repository is MIT-licensed, which permits commercial use and redistribution subject to retaining the required notices. The workflow runs locally through CLI scripts rather than a hosted API. Review the terms of Isaac Sim, robot assets, dependencies, and any redistributed model artifacts separately; do not assume the root MIT license covers them.

When should we choose TGI over direct simulator PPO?

Start with PPO in the same simulator if you need a baseline that does not require a learned dynamics model or differentiable terrain queries. Choose TGI when you specifically want to test gradients through terrain-conditioned dynamics and contact predictions. Hold the terrain splits and success metrics fixed, and account for simulator data collection and model fitting as well as policy training.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining leggedrobotics/terrain-grounded-imagination? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature leggedrobotics/terrain-grounded-imagination on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

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

Saved in your browser · Export Markdown RFC tables or jump into /vs compare