Skip to content

About

RL_Training Repo Based on Isaaclab

Resources

Stars

300 stars

Watchers

1 watching

Forks

rl_training

IsaacSim Isaac Lab RSL-RL Discord Python Linux platform License

Training tasks

rl_training provides Isaac Lab locomotion tasks for Deep Robotics robots. Use the environment ID from the table when launching training.

Robot Model Environment Name (ID) Screenshot Tutorial Videos
Deeprobotics Lite3 Rough-Deeprobotics-Lite3-v0 Lite3 Bilibili / YouTube
Deeprobotics M20 Rough-Deeprobotics-M20-v0 deeprobotics_m20 Bilibili / YouTube
Deeprobotics M20S Rough-Deeprobotics-M20S-v0 deeprobotics_m20s —
Deeprobotics DR02 Amp-Flat-Deeprobotics-DR02-v0 deeprobotics_dr02 Training Bilibili / YouTube
DR02 Pro deployment Bilibili / YouTube
Deeprobotics DR02 Depth-Rough-Deeprobotics-DR02-v0 deeprobotics_dr02 —
Deeprobotics S10 Rough-Deeprobotics-S10-v0 deeprobotics_s10 —

Installation

  1. Install Isaac Sim 5.1.0, Isaac Lab 2.3.2, and Python 3.11 on Linux using the Isaac Lab installation guide. Activate the Python environment you used for Isaac Lab. Run the following commands in Bash.

  2. Clone this repository outside the Isaac Lab checkout and install its training package.

    git clone --recurse-submodules https://github.com/DeepRoboticsLab/rl_training.git
    cd rl_training
    python -m pip install -e source/rl_training

    For an existing clone, run git submodule update --init --recursive from the repository root to fetch the robot assets.

  3. List the registered tasks to verify the installation.

    python scripts/tools/list_envs.py

    If Isaac Sim fails during startup, see Conda runtime troubleshooting.

Train and play

Run the scripts from the repository root. For the rough-terrain velocity tasks, select a task ID from the table. For DR02, use the task-specific commands.

TASK=Rough-Deeprobotics-Lite3-v0
python scripts/reinforcement_learning/rsl_rl/train.py --task="$TASK" --headless
python scripts/reinforcement_learning/rsl_rl/play.py --task="$TASK" --num_envs=10
Action Arguments
Set the number of simulated environments --num_envs=32
Record 200 steps of video (requires FFmpeg) --video --video_length 200
Play a specific checkpoint --checkpoint /path/to/model.pt
Select a run for playback --load_run run_folder_name
Resume training from a checkpoint in a run --resume --load_run run_folder_name --checkpoint model.pt

Distributed training

Set TASK as above. Launch one worker per GPU. Each worker creates --num_envs environments, so this example uses 2,048 environments across two GPUs.

CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.run --standalone --nnodes=1 --nproc_per_node=2 \
  scripts/reinforcement_learning/rsl_rl/train.py --task="$TASK" --headless --distributed --num_envs=1024

For two machines with two GPUs each, run the following on both machines. Use the same task ID, rendezvous ID, and reachable address of the first machine on both.

RDZV_ENDPOINT=trainer-0:5555  # Replace with the first machine's hostname and an available port.
python -m torch.distributed.run --nnodes=2 --nproc_per_node=2 \
  --rdzv_backend=c10d --rdzv_id=123 --rdzv_endpoint="$RDZV_ENDPOINT" \
  scripts/reinforcement_learning/rsl_rl/train.py --task="$TASK" --headless --distributed

Monitor and compare runs

Start TensorBoard from the repository root with tensorboard --logdir=logs. Each RSL-RL run stores its configuration in params/agent.yaml and params/env.yaml. Compare two run directories with:

python scripts/tools/compare_runs.py /path/to/first/run /path/to/second/run

Task-specific instructions

DR02 locomotion

AMP on flat terrain. To check the robot assets and AMP setup, run one learning iteration. A successful run writes model_0.pt under logs/rsl_rl/dr02_amp/<run>/. For full training, omit the environment and iteration limits.

TASK=Amp-Flat-Deeprobotics-DR02-v0
python scripts/reinforcement_learning/rsl_rl/train.py --task="$TASK" --headless --num_envs=16 --max_iterations=1
python scripts/reinforcement_learning/rsl_rl/play.py --task="$TASK" --num_envs=10

Depth images on rough terrain. Enable cameras and disable Fabric for training. To inspect the depth images during playback, select the dedicated play environment.

python scripts/reinforcement_learning/rsl_rl/train.py --task=Depth-Rough-Deeprobotics-DR02-v0 \
  --headless --enable_cameras env.sim.use_fabric=false
python scripts/reinforcement_learning/rsl_rl/play.py --task=Depth-Rough-Deeprobotics-DR02-Play-v0 \
  --num_envs=1 --show_depth --rendering_mode performance env.sim.use_fabric=true env.sim.render_interval=4

For distributed training, use the depth training ID and add the same camera and Fabric options. Training was verified with 1,024 environments per GPU on two RTX 4090s.

DR02 startup issues

  • If the importer cannot find DR02-pro.urdf or DR02-pro_fix_joints.urdf, run git submodule update --init --recursive from the repository root.
  • If AMP reports a missing pybullet_utils or incompatible RSL-RL, rerun python -m pip install -e source/rl_training in the training environment. The package specifies PyBullet 3.2.7 and RSL-RL 5.0.1.
  • The URDF importer may report that it assigned inertias to fixed sensor links or adjusted joint axes. These warnings occurred in successful DR02 training runs.

Velocity-task keyboard controls

Add --keyboard to the velocity-task playback command to control one robot.

Motion Positive direction Negative direction
Forward / backward Numpad 8 or Up Numpad 2 or Down
Lateral Numpad 4 or Right Numpad 6 or Left
Yaw Numpad 7 or Z Numpad 9 or X

Lite3 and M20 checkpoint export

The standalone ONNX exporter supports Lite3 and M20 checkpoints and runs without Isaac Sim. Set --robot to lite3 or m20 to match the checkpoint.

python scripts/tools/export_onnx_fast.py --robot lite3 \
  --checkpoint_path /path/to/model.pt --output_path exported/lite3_policy.onnx

The exporter embeds joint names, stiffness, damping, default positions, and action scales as ONNX model properties. Add --no_metadata to skip them. For MuJoCo or hardware deployment, see the deployment repositories in the Deep Robotics GitHub organization.

Development and troubleshooting

Conda runtime

If Isaac Sim reports CXXABI_1.3.15 not found, it may be loading the system C++ runtime ahead of Conda's copy. Follow-on errors can mention omni.kit or failed test-module imports. From the affected Linux Conda environment, install the activation hooks and reactivate that same environment before restarting Isaac Sim.

isaac_env_prefix="$CONDA_PREFIX"
python scripts/tools/setup_conda_runtime.py
conda deactivate
conda activate "$isaac_env_prefix"

If the script reports an outdated runtime, run conda install -c conda-forge "libstdcxx-ng>=15", then repeat the setup. The hooks preserve the previous LD_PRELOAD and restore it on deactivation.

Enable the Omniverse extension

In Isaac Sim, open Window → Extensions → Settings. Under Extension Search Paths, add the absolute paths to this repository's source directory and Isaac Lab's source directory. Refresh the extension list and enable rl_training under Third Party. The example UI extension loads when enabled.

VS Code indexing

If Pylance cannot resolve extension imports, add the extension search paths to .vscode/settings.json. Replace /path/to/IsaacLab with your checkout.

{
    "python.languageServer": "Pylance",
    "python.analysis.extraPaths": [
        "${workspaceFolder}/source/rl_training",
        "/path/to/IsaacLab/source/isaaclab",
        "/path/to/IsaacLab/source/isaaclab_assets",
        "/path/to/IsaacLab/source/isaaclab_mimic",
        "/path/to/IsaacLab/source/isaaclab_rl",
        "/path/to/IsaacLab/source/isaaclab_tasks"
    ]
}

Clean USD caches

Simulation runs generate temporary USD files under /tmp/IsaacLab/usd_*. After simulation jobs have stopped, remove stale caches to reclaim disk space.

rm -rf /tmp/IsaacLab/usd_*

Contributing

Pull requests with bug fixes and training configuration improvements are welcome.

Acknowledgements

The project uses some code from the following open-source code repositories:

About

RL_Training Repo Based on Isaaclab

Resources

Stars

300 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages