Skip to content
 
 

Repository files navigation

Isaac Lab Tutorial — JetBot Reinforcement Learning

English | 简体中文

A JetBot reinforcement learning tutorial project based on isaac-sim/IsaacLabTutorial, adapted to Isaac Lab 3.0 with uv managing the Python environment.

Trains an NVIDIA JetBot (differential-drive, two wheel joints) — the reward is the robot's forward speed, so it simply learns to drive as fast as it can.

Requirements

  • Windows or Linux with an NVIDIA RTX GPU (8GB+ VRAM recommended)
  • uv (Python 3.12 is installed automatically by uv — no manual setup)
  • Network access on first run: the Isaac Sim kernel and the JetBot USD asset (Nucleus) are downloaded on demand
Component Version
isaaclab (single wheel incl. isaaclab_tasks, isaaclab_rl, ...) 3.0.0b2.post1
isaacsim 6.0.1.0
skrl 2.1.0
torch 2.11.0+cu128
Python 3.12

Installation

uv sync

pyproject.toml pins dependency overrides following the official Isaac Lab 3.0 uv-overrides and configures the PyTorch cu128 and NVIDIA package indexes — no extra setup needed.

Project Layout

├── scripts/
│   ├── list_envs.py            # list registered tasks
│   ├── random_agent.py         # random-action smoke test
│   ├── zero_agent.py           # zero-action smoke test
│   └── skrl/
│       ├── train.py            # skrl PPO training entry point
│       └── play.py             # load a checkpoint and replay
├── source/isaac_lab_tutorial/  # custom extension package (editable install)
│   └── isaac_lab_tutorial/
│       ├── robots/jetbot.py    # JetBot asset config (Nucleus USD + actuators)
│       └── tasks/direct/isaac_lab_tutorial/
│           ├── __init__.py                       # gym.register: task registration
│           ├── isaac_lab_tutorial_env.py         # DirectRLEnv implementation
│           ├── isaac_lab_tutorial_env_cfg.py     # environment config
│           └── agents/skrl_ppo_cfg.yaml          # PPO hyperparameters (skrl Runner format)
└── logs/skrl/                  # training outputs (generated)

Task

Gym task ID: Template-Isaac-Lab-Tutorial-Direct-v0 (direct workflow, DirectRLEnv)

Item Content
Action space 2-dim continuous → left/right wheel joint velocity targets (set_joint_velocity_target)
Observation space 3-dim → base linear velocity in body frame (root_com_lin_vel_b)
Reward Norm of the linear velocity (faster is better)
Termination Timeout only (5 s per episode)
Simulation dt=1/120, decimation=2, 100 parallel envs by default

Usage

# list tasks
uv run scripts/list_envs.py

# train (default 4800 steps; headless is the 3.0 default)
uv run scripts/skrl/train.py --task Template-Isaac-Lab-Tutorial-Direct-v0 --num_envs 16

# train with an Isaac Sim window (new --viz flag in 3.0; the first rendered frame
# compiles RTX shaders and can take several minutes)
uv run scripts/skrl/train.py --task Template-Isaac-Lab-Tutorial-Direct-v0 --num_envs 16 --viz kit

# replay with the latest checkpoint (resolved automatically under logs/skrl/)
uv run scripts/skrl/play.py --task Template-Isaac-Lab-Tutorial-Direct-v0 --num_envs 8 --viz kit

# training curves
uv run tensorboard --logdir logs/skrl

Training outputs live in logs/skrl/cartpole_direct/<timestamp>_ppo_torch/: params/ (env/agent config snapshots), checkpoints/ (agent_N.pt) and TensorBoard event files.

Common training arguments: --num_envs (parallel envs), --max_iterations (total steps = iterations × rollouts(32)), --seed, --checkpoint (resume), --video (record mp4 clips).

Isaac Lab 3.0 Adaptation Notes

Main fixes applied on this branch relative to the 2.x-era tutorial (script skeletons aligned with the upstream main branch):

Issue Fix
dump_pickle removed from isaaclab.utils.io keep only dump_yaml config snapshots
skrl 2.1 removed agent.set_running_mode() / changed act() signature use enable_training_mode(False) and act(obs, states, ...)
pretrained_checkpoint module relocated import from isaaclab_rl.utils instead
Model input key change in skrl 2.1 input: STATESinput: OBSERVATIONS in the yaml
3.0 asset data returns warp ProxyArray convert with .torch when building observations
3.0 runs windowless by default open a window with --viz kit (replaces the old --headless toggle)

Syncing with Upstream

This repository is a fork; upstream points to isaac-sim/IsaacLabTutorial. When syncing official scripts, do not merge the whole branch — check out files by path and review the diff first:

git fetch upstream
git diff HEAD upstream/main -- scripts/        # review first
git checkout upstream/main -- scripts/skrl/train.py   # then check out as needed

About

Tutorial project for the accompanying doc

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages