ICRA 2026
Official code release for the ICRA 2026 paper Learning Quadruped Walking from Seconds of Demonstration.
Project Page: https://latent-variation-regularization.github.io/
Paper: https://arxiv.org/abs/2603.06961
This repository contains code and datasets for learning locomotion skills for Unitree Go2 from a few seconds of demonstration. We provide:
- IsaacLab simulation tasks (forward / backward / sideways velocity tracking)
- Real-world Go2 demonstration datasets (≈10 seconds per task)
- Training scripts built on Tianshou v0.5.0, adapted for IsaacLab vectorized environments
- A minimal training example for quick testing
git clone https://github.com/ruipengZ/Latent-Variation-Regularization.git
cd Latent-Variation-Regularization
conda create -n LVR python=3.11
conda activate LVRFollow the official installation guide: https://isaac-sim.github.io/IsaacLab/v2.2.1/source/setup/installation/pip_installation.html
pip install -r requirements.txt
pip install torch_cluster -f https://data.pyg.org/whl/torch-2.7.0+cu128.htmlWe provide 3 velocity-tracking tasks for Unitree Go2:
- Forward
- Backward
- Sideways
For each task, we include short demonstration datasets collected using policies trained with rsl-rl:
- Simulation: one full trajectory (1000 steps, ≈20s at default sim settings) per task in IsaacLab.
- Real-world: two short trajectories per task on Unitree Go2 (collected on flat ground using the same control policy), 250 steps each, concatenated to ~10s total.
Download imitation_data/ (simulation + real-world demonstrations) from Google Drive:
After downloading, place the folder at:
<repo-root>/imitation_data/# -------------------------
# Simulation demonstrations
# -------------------------
--task "Isaac-Velocity-Flat-Forward-Unitree-Go2-v0" \
--dataset-path "imitation_data/isaac_go2_forward/traj-1.hdf5" \
--task "Isaac-Velocity-Flat-Sideway-Unitree-Go2-v0" \
--dataset-path "imitation_data/isaac_go2_sideway/traj-1.hdf5" \
--task "Isaac-Velocity-Flat-Backward-Unitree-Go2-v0" \
--dataset-path "imitation_data/isaac_go2_backward/traj-1.hdf5" \
# -------------------------
# Real-world demonstrations
# -------------------------
--task "Unitree-Go2-Velocity-Forward" \
--dataset-path "imitation_data/unitree_go2_forward/step-250+250.hdf5" \
--task "Unitree-Go2-Velocity-Sideway" \
--dataset-path "imitation_data/unitree_go2_sideway/step-250+250.hdf5" \
--task "Unitree-Go2-Velocity-Backward" \
--dataset-path "imitation_data/unitree_go2_backward/step-250+250.hdf5" \Sim/real note: policies trained on real-world data may appear less performant in simulator due to the world-to-sim gap.
We use Tianshou v0.5.0 as the base code structure and modify it to support IsaacLab vectorized environments.
A minimal offline supervised-learning training script:
python examples/train_LVR_minimal.pyThis script supports a simple test run in simulator. Use --testing 1 to enable evaluation (see script args / help).
The main LVR policy is implemented here:
policy/imitation/lvr.py
We provide two convenience scripts:
sh train_isaac_go2.sh # training on simulation demonstrations
sh train_realworld_go2.sh # training on real-world demonstrationspython examples/imitation/go2_imitation_render.py \
--task "<your task>" \
--resume-path "<path to trained checkpoint>"To enable real-time rendering in Isaac Sim:
# set headless off
--headless 0If you find this repository useful, please cite our paper:
@article{zhang2026learning,
title={Learning Quadruped Walking from Seconds of Demonstration},
author={Zhang, Ruipeng and Yu, Hongzhan and Chang, Ya-Chien and Li, Chenghao and Christensen, Henrik I and Gao, Sicun},
journal={arXiv preprint arXiv:2603.06961},
year={2026}
}This project builds on:
- Tianshou: https://github.com/thu-ml/tianshou/tree/v0.5.0
- IsaacLab: https://github.com/isaac-sim/IsaacLab
- Unitree_rl_lab: https://github.com/unitreerobotics/unitree_rl_lab