Insights

TERRA: Terrain-Aware Reconstruction, Retargeting and Control for Musculoskeletal Locomotion

TERRA is a novel framework that reconstructs terrain from human motion capture data, retargets movements to musculoskeletal models, and trains controllers for realistic locomotion.

TERRA: Terrain-Aware Reconstruction, Retargeting and Control for Musculoskeletal Locomotion

Original paper: TERRA: Terrain-Aware Reconstruction, Retargeting and Control for Musculoskeletal Locomotion.

Highlights and Results

TERRA infers the surfaces a person moved over, then retargets the motion to a muscle-actuated body and trains a controller. It uses motion kinematics to recover task-relevant terrain rather than requiring a full scene scan. Across the paper’s known-terrain clips, terrain-family classification reaches 99.9%. The final control policy achieves 87.59% held-out tracking success under the reported protocol; this is simulation performance, not a clinical or real-robot validation. Paper.

How It Works

The pipeline accepts body-motion data, including AMASS-compatible SMPL-H and supported marker formats. It identifies stationary ankle and toe intervals as positive support evidence. The rest of the body trajectory supplies negative evidence: terrain should not occupy space through which the body traveled. Foot orientation and swing clearance help distinguish a continuous ramp from discrete stairs, even when contact heights look similar. Terrain reconstruction.

Candidate geometry comes from declared terrain families: ramps, staircases, independent supports and seats. Contact envelopes establish plausible support regions; free-space trajectories trim incompatible geometry. The goal is enough collision geometry to explain the motion, not recovery of every unseen wall or decorative object. Removing the paper’s physical cues drops terrain-family accuracy to 73.5%, illustrating why fitting contact heights alone is insufficient. Method and ablation.

Retargeting fits the MyoFullBody body shape and solves a terrain-aware trajectory. The objective combines motion correspondence with contact preservation and anatomical constraints, including tendon continuity, self-collision and foot clearance. The repository’s publication path applies a final stability gate and saves both the trajectory and analysis, with a terrain sidecar when applicable. Validation is a distinct step before these files enter policy training. Retargeting guide.

The muscle controller is trained with PPO in MJX–Warp. Observations include joint state, muscle activation, foot-contact sensors and a pelvis-centered height map; future motion targets tell the policy what to track. Rewards balance tracking with smooth, economical muscle activity. The paper combines 9.4 hours of motion from five datasets, while the released workflow explicitly separates validated motion selection, materialized caches, training and held-out evaluation. Training guide.

https://external-v2fun-data-hk-1.oss-accelerate.aliyuncs.com/temp/2026/11/26/32243324-d3a4-476a-a268-5706fb597b15_1795688344661.png Official TERRA workflow: motion, terrain reconstruction, retargeting, policy learning and biomechanical evaluation. Source: TERRA authors.

Applications, Availability, and Future Directions

TERRA is relevant to musculoskeletal simulation, terrain-aware motion imitation and research on body-dependent affordances. Code and a pretrained policy are available, with separate requirements for body models and source datasets. The authors name dynamic primitive geometry, online retargeting and moving surfaces as open challenges. Reported physiological comparisons concern normalized waveform shape and should not be read as patient-specific biomechanical prediction. Project, paper.

FAQ

Could V2Fun motion capture supply TERRA's input?

Only through a separately validated conversion. V2Fun documents video-based person-motion extraction, while TERRA expects specific body or marker representations with explicit units and timing. Joint mapping, body fitting, scale and contact quality would need verification; the sources do not document a direct adapter. [V2Fun motion detection](https://doc.v2fun.ai/api/core_functions/motion-detection), [TERRA inputs](https://github.com/amathislab/terra).

Does TERRA reconstruct the whole room from a walking motion?

No. It infers support and collision geometry constrained by observed contacts and free space. Unvisited regions and arbitrary room contents are not measured by that evidence. [Terrain guide](https://github.com/amathislab/terra/blob/main/docs/terrain-reconstruction.md).

Is a successfully retargeted trajectory already a trained controller?

No. Retargeting creates a reference trajectory. Policy training learns muscle commands that track it under simulation dynamics, and held-out evaluation measures how well that control generalizes. [Training workflow](https://github.com/amathislab/terra/blob/main/docs/policy-training.md).

Related Articles