Skip to content

About

Code for training G1 humanoid with a foothold prediction model

Resources

Stars

70 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Watch Your Step: Anticipated Perception for Humanoid Locomotion

Project page  ·  Video  ·  arXiv  ·  Citation

Matthias Heyrman, Chenhao Li, Ioannis Dadiotis, Marco Hutter
Robotic Systems Lab and ETH AI Center, ETH Zurich

Blocks, with the two patches the policy reads Gaps Drops
Obstacle course Walled corridor in simulation The robot's onboard elevation map on stairs

Training and evaluation code for perceptive humanoid locomotion with a foothold prediction model (FPM) on the Unitree G1 in Isaac Lab. The FPM predicts the next two footholds from proprioception and the velocity command, and the policy observes the elevation map only in 7 x 7 patches around these footholds. The FPM and the policy are trained together. The policy transfers zero-shot to the real robot; see the project page for the hardware experiments and a version of the policy running in your browser.

Installation

Requires Isaac Sim 5.1, Isaac Lab 2.3.0 and rsl-rl-lib==3.3.0. In the Isaac Lab Python environment:

pip install -e .

Structure

fpm/
  foot_pred/    FPM model, foothold labels, refitting and training schedule
  mdp/          foothold-gated height scan, rewards, events, commands, symmetry augmentation
  terrains/     training, locomotion validation and corridor validation terrains
  env_cfg.py    training, play and validation environments
  agents/       PPO configuration
  assets/       Unitree G1 (29 DoF) USD
scripts/
  train.py
  play.py
  validate_locomotion.py
  validate_corridor.py
  validate_foot_pred.py
demo/           pretrained policy and FPM

Training

python scripts/train.py --headless --seed 1

For the first 500 iterations the footholds are fixed under the base. After that, the FPM is retrained from scratch every 500 iterations on 5 x 10^5 transitions of the current policy. FPM checkpoints are saved next to the policy checkpoints as foot_model_<iteration>.pt (TorchScript, input normalization included). To resume a run, pass --resume <run>/model_<iteration>.pt.

Playback and export

python scripts/play.py --show_footholds

Without --checkpoint, the latest checkpoint in logs/rsl_rl/g1_fpm/ is played, or the pretrained policy in demo/ if there are no logs. Writes policy.pt, policy.onnx and foot_model.onnx to exported/ next to the checkpoint. The FPM takes the 70-dimensional system state and returns two planar footholds in the base frame. Use --joystick for gamepad control and --video to record a clip.

Evaluation

Each script loads the policy checkpoint and the latest foot_model_*.pt from the same directory. Set PYTHONHASHSEED=0 so that the corridor terrain is identical across runs.

export PYTHONHASHSEED=0
python scripts/validate_locomotion.py --headless --checkpoint logs/rsl_rl/g1_fpm/<run>/model_40000.pt
python scripts/validate_corridor.py --headless --checkpoint logs/rsl_rl/g1_fpm/<run>/model_40000.pt
python scripts/validate_foot_pred.py --headless --checkpoint logs/rsl_rl/g1_fpm/<run>/model_40000.pt

Add --save_results to save the per-episode results in the run directory.

Citation

@misc{heyrman2026watchstepanticipatedperception,
  title         = {Watch Your Step: Anticipated Perception for Humanoid Locomotion},
  author        = {Matthias Heyrman and Chenhao Li and Ioannis Dadiotis and Marco Hutter},
  year          = {2026},
  eprint        = {2610.29612},
  archivePrefix = {arXiv},
  primaryClass  = {cs.RO},
  url           = {https://arxiv.org/abs/2610.29612}
}

License

© 2026 ETH Zurich
Created by: Matthias Heyrman, Chenhao Li, Ioannis Dadiotis, and Marco Hutter
Licensed under the MIT License (see LICENSE).

Third-party files keep their original license (see licenses/dependencies):

  • fpm/assets/data/G1/ is the Unitree G1 (29 DoF, rev 1.0) model from unitree_ros, converted to USD, BSD-3-Clause.

About

Code for training G1 humanoid with a foothold prediction model

Resources

Stars

70 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages