Humanoid motion tracking training on Isaac Lab. Trains PPO policies that track reference motions (DeepMimic-style reward). Primary robot: DR02_pro.
Note
This project has been verified on Ubuntu 22.04/24.04 + NVIDIA driver 580.173.02 + CUDA 13.0
- Install dependencies (Isaac Lab v2.3.2 + PyTorch 2.7.0 + rsl-rl-lib 5.0.1)
conda create -n deep-robotics-humanoid python=3.11 -y # same environment as the deep-robotics-retarget project
conda activate deep-robotics-humanoid
pip install --upgrade pip
# Install base tools
pip install setuptools==80.9.0 wheel packaging
pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0
pip install flatdict==4.0.1 --no-build-isolation
pip install "isaaclab[isaacsim,all]==2.3.2" --extra-index-url https://pypi.nvidia.com --no-build-isolation
pip install rsl-rl-lib==5.0.1
# Check versions
pip list | grep -E "torch|isaac|rsl|stable"Expected versions:
isaaclab 2.3.2
isaacsim 5.1.0.0
isaacsim-app 5.1.0.0
isaacsim-asset 5.1.0.0
isaacsim-benchmark 5.1.0.0
isaacsim-code-editor 5.1.0.0
isaacsim-core 5.1.0.0
isaacsim-cortex 5.1.0.0
isaacsim-example 5.1.0.0
isaacsim-extscache-kit 5.1.0.0
isaacsim-extscache-kit-sdk 5.1.0.0
isaacsim-extscache-physics 5.1.0.0
isaacsim-gui 5.1.0.0
isaacsim-kernel 5.1.0.0
isaacsim-replicator 5.1.0.0
isaacsim-rl 5.1.0.0
isaacsim-robot 5.1.0.0
isaacsim-robot-motion 5.1.0.0
isaacsim-robot-setup 5.1.0.0
isaacsim-ros1 5.1.0.0
isaacsim-ros2 5.1.0.0
isaacsim-sensor 5.1.0.0
isaacsim-storage 5.1.0.0
isaacsim-template 5.1.0.0
isaacsim-test 5.1.0.0
isaacsim-utils 5.1.0.0
rsl-rl-lib 5.0.1
stable_baselines3 2.8.0
torch 2.7.0
torchaudio 2.7.0
torchvision 0.22.0
- Clone and install:
git clone https://github.com/DeepRoboticsLab/deep-robotics-mimic.git
cd deep-robotics-mimic
python -m pip install -e source/whole_body_trackingBefore starting Isaac Sim, run this once in the shared environment from this repository root:
python scripts/setup_conda_runtime.py
conda deactivate
conda activate deep-robotics-humanoidIf the script reports a missing or outdated runtime, run conda install -c conda-forge "libstdcxx-ng>=15" and retry. It installs environment activation/deactivation hooks that load Conda's libstdc++.so.6 before Isaac Sim loads the older system copy. Existing LD_PRELOAD settings are restored on deactivation; system libraries are unchanged. The same hook is used by rl_training, so rerunning setup is safe and one installation covers all repositories sharing this environment.
This fixes CXXABI_1.3.15 not found and the resulting omni.kit.test / omni.graph.core.tests import errors. Training, playback, and conversion rely on this environment hook to select the runtime before Python starts. Restart existing Python processes after reactivating. Headless viewport, URDF inertia/joint-axis, and GPU performance warnings have separate causes and are not removed by this fix.
A startup segmentation fault in librtx.scenedb.plugin.so was reported on Ubuntu 24.04.4 with an RTX 4090 and driver 595.71.05, even after disabling IOMMU. NVIDIA support attributes the crash to driver incompatibility and recommends switching to the validated Linux driver 580.65.06. This project was tested with driver 580.173.02, as noted above. See the NVIDIA forum discussion for details.
Full pipeline: BVH/SMPLX → .pkl (retargeting) → FK .npz → Training/Deployment
Retargeting is done by the companion project deep-robotics-retarget. Its outputs are robot joint .pkl files, which can be converted directly to FK .npz in one step (see 2.2).
Single file (PKL input, one step to FK npz):
python scripts/convert_DR02_pro.py \
--input <motion>.pkl \
--output dataset/gmr/<motion>.npz \
--num_envs 10000 \
--output_fps 50 \
--retarget_format gmr \
--headlessSingle file (NPZ input):
python scripts/convert_DR02_pro.py \
--input <motion>.npz \
--output dataset/gmr/<motion>_fk.npz \
--num_envs 10000 \
--output_fps 50 \
--retarget_format gmr \
--headlessBatch folder:
python scripts/batch_convert_DR02_pro.py \
--input_dir <source_folder>/ \
--output_dir dataset/ \
--num_envs 10000 \
--output_fps 50 \
--retarget_format gmr \
--headlessSupported --retarget_format: deep_retarget, omniretarget, gmr. .pkl inputs (gmr retargeting output) are only supported with gmr; a batch folder may contain mixed .pkl and .npz files.
python scripts/replay_merged.py --folder dataset/gmr/ # folder of FK npz files
python scripts/replay_merged.py --file dataset/gmr/<motion.npz> # single-file modepip install mujoco
python scripts/replay_npz_mujoco.py # interactive file selection
python scripts/replay_npz_mujoco.py dataset/gmr/<motion>.npz
python scripts/replay_npz_mujoco.py dataset/raw/pkl/<motion>.pkl # also supports gmr retargeted PKL
python scripts/replay_npz_mujoco.py dataset/gmr/<motion>.npz --verify # FK accuracy verification (NPZ only)Playback includes a ground plane, robot-following lighting, an on-screen progress bar, and Space-key pause/resume.
We have uploaded the training logs of the boxing motion to Google Drive. They contain the training environment and agent configuration files as well as the policy checkpoints. The policies have been deployment-tested and can be used as a reference for comparison.
python scripts/rsl_rl/train.py \
--task=Tracking-Flat-DR02_PRO \
--registry_name dataset/gmr/motion.npz \
--logger tensorboard \
--log_project_name logs/ \
--run_name <run_name> \
--headless \
--device cuda:0 \
--max_iterations 100000Parameter reference:
| Flag | Description |
|---|---|
--task |
Task name; loads the environment and default PPO config from the Isaac Lab registry |
--registry_name |
Path to the reference motion file (FK npz); only needed for single-motion training — multi-motion tasks use info.yaml dataset indexing |
--logger |
Logging backend: tensorboard / wandb / neptune |
--log_project_name |
Log output directory |
--run_name |
Run name suffix used to tell experiments apart under the log directory |
--headless |
No GUI mode; disables the Isaac Sim render window (recommended for large-scale training) |
--num_envs |
Total number of parallel environments (split across GPUs) |
--max_iterations |
Maximum PPO training iterations |
--device |
Compute device (e.g. cuda:0); used for single-GPU training |
python -m torch.distributed.run --nnodes=1 --nproc_per_node=2 \
scripts/rsl_rl/train.py \
--task=Tracking-Flat-DR02_PRO \
--registry_name dataset/gmr/motion.npz \
--logger tensorboard \
--log_project_name logs/ \
--run_name <run_name> \
--headless \
--distributed \
--num_envs 4096 \
--max_iterations 200000Parameter reference:
| Flag | Description |
|---|---|
--nnodes=1 --nproc_per_node=2 |
PyTorch distributed launcher options: 1 node, 2 processes per node (i.e. data-parallel training on 2 GPUs) |
--task |
Task name; loads the environment and default PPO config from the Isaac Lab registry |
--registry_name |
Path to the reference motion file (FK npz); only needed for single-motion training — multi-motion tasks use info.yaml dataset indexing |
--logger |
Logging backend: tensorboard / wandb / neptune |
--log_project_name |
Log output directory |
--run_name |
Run name suffix used to tell experiments apart under the log directory |
--headless |
No GUI mode; disables the Isaac Sim render window (recommended for large-scale training) |
--distributed |
Marks a distributed run; only use together with torch.distributed.run |
--num_envs |
Total number of parallel environments (split across GPUs) |
--max_iterations |
Maximum PPO training iterations |
python scripts/rsl_rl/train.py \
--task=Tracking-Flat-DR02_PRO \
--registry_name dataset/gmr/motion.npz \
--logger tensorboard \
--log_project_name logs/ \
--run_name <run_name> \
--headless \
--device cuda:0 \
--max_iterations 200000 \
--resume True \
--checkpoint <model>.pt \
--load_run <YYYY-MM-DD_HH-MM-SS_run_name>--checkpoint is just the filename. --load_run is the folder name under logs/rsl_rl/{experiment_name}/.
Wraps train.py in a subprocess. On NaN loss, automatically restarts from a checkpoint ~1000 iterations earlier. Up to 10 retries.
# Single GPU
python scripts/rsl_rl/train_auto_restart.py \
--task=Tracking-Flat-DR02_PRO \
--registry_name dataset/gmr/motion.npz \
--logger tensorboard \
--log_project_name logs/ \
--run_name <run_name> \
--headless \
--max_iterations 100000
# Multi-GPU — pass --nproc_per_node directly, do NOT use torch.distributed.run
python scripts/rsl_rl/train_auto_restart.py \
--nproc_per_node 2 \
--task=Tracking-Flat-DR02_PRO \
--registry_name dataset/gmr/motion.npz \
--logger tensorboard \
--log_project_name logs/ \
--run_name <run_name> \
--headless \
--distributed \
--num_envs 4096 \
--max_iterations 200000Tracking-Flat-DR02_PRO
python scripts/rsl_rl/play.py \
--task=Tracking-Flat-DR02_PRO \
--motion_file dataset/gmr/motion.npz \
--checkpoint_path logs/rsl_rl/DR02_pro_flat/<run>/model_10000.pt \
--num_envs 2Also auto-exports exported/policy.onnx next to the checkpoint.
python scripts/rsl_rl/export_onnx_fast.py \
--checkpoint_path logs/rsl_rl/DR02_pro_flat/<run>/model_10000.pt \
--output_name <motion>.onnxBoth exports are compatible with deep-robotics-sdk2. For deployment, copy the motion NPZ to src/dr02_pro/state_machine/motion_data/ and the policy ONNX to src/dr02_pro/state_machine/policy/ in the SDK repository. See the SDK repository for deployment details.
# Compare configs between two training runs
python scripts/compare_runs.py logs/rsl_rl/DR02_pro_flat/<run1> logs/rsl_rl/DR02_pro_flat/<run2>
# Generate dataset info.yaml from a folder of NPZ files
python scripts/auto_info_yaml.py \
--npz_dir dataset/gmr/ \
--dataset_name DR02_pro_multi_motion \
--robot_name DR02_pro \
--output_dir dataset/DR02_pro_multi_motion| Task | Script |
|---|---|
| npz → FK npz (single) | scripts/convert_DR02_pro.py |
| npz → FK npz (batch) | scripts/batch_convert_DR02_pro.py |
| Export motion + policy ONNX | scripts/export_motion_and_policy.py |
| Generate dataset info.yaml | scripts/auto_info_yaml.py |
| Compare run configs | scripts/compare_runs.py |
| Replay motion (Isaac Sim) | scripts/replay_merged.py |
| Replay motion (MuJoCo) | scripts/replay_npz_mujoco.py |
| Train policy | scripts/rsl_rl/train.py |
| Train + auto NaN restart | scripts/rsl_rl/train_auto_restart.py |
| Evaluate policy | scripts/rsl_rl/play.py |
| Export ONNX (fast) | scripts/rsl_rl/export_onnx_fast.py |
Training-ready FK .npz files are under dataset/gmr/ (e.g. bow.npz, boxing.npz, wave_hand.npz).
BSD 3-Clause — See LICENSE for details.