You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhanced clarity and detail in the training workflow for reinforcement learning policy using Isaac Lab and RSL-RL. Added specific stages of the RL training pipeline and improved explanations of training parameters and evaluation.
Copy file name to clipboardExpand all lines: content/learning-paths/laptops-and-desktops/dgx_spark_isaac_robotics/4_isaac_rfl.md
+36-25Lines changed: 36 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,11 @@ layout: learningpathall
8
8
9
9
## Train a reinforcement learning policy using Isaac Lab and RSL-RL
10
10
11
-
In this section you will train a reinforcement learning (RL) policy for the [Unitree] (https://www.unitree.com/) H1 humanoid robot to walk over rough terrain. You will use Isaac Lab's RSL-RL integration, which implements the Proximal Policy Optimization (PPO) algorithm. By the end of this section you will understand the full training pipeline, including task configuration, PPO hyperparameters, and policy evaluation.
11
+
In this section you will train a reinforcement learning (RL) policy for the [Unitree] (https://www.unitree.com/) H1 humanoid robot to walk over rough terrain. The training workflow uses Isaac Lab’s integration with the RSL-RL library, which implements the Proximal Policy Optimization (PPO) algorithm. This integration connects Isaac Sim’s physics simulation with an efficient RL training pipeline. By the end of this section you will understand the key stages of the RL training pipeline, including:
12
+
* Task configuration and environment selection
13
+
* PPO training parameters and rollout collection
14
+
* Monitoring training progress
15
+
* Evaluating the trained policy in simulation
12
16
13
17
## What is RSL-RL?
14
18
@@ -19,11 +23,10 @@ RSL-RL (Robotic Systems Lab Reinforcement Learning) is a lightweight RL library
19
23
- Asymmetric actor-critic support (the critic can observe more than the actor)
20
24
- Minimal dependencies and tight integration with Isaac Lab
21
25
22
-
Isaac Lab provides ready-to-use training scripts for RSL-RL under `scripts/reinforcement_learning/rsl_rl/`.
26
+
Isaac Lab includes ready-to-use training scripts for RSL-RL under `scripts/reinforcement_learning/rsl_rl/`.
23
27
24
28
## Step 1: Understand the training task
25
-
26
-
The task you will train is **Isaac-Velocity-Rough-H1-v0**. This is a locomotion task where the [Unitree H1](https://www.unitree.com/h1/) humanoid robot must track a velocity command while navigating rough terrain.
29
+
In this section you will train the **Isaac-Velocity-Rough-H1-v0** environment. This is a locomotion task where the [Unitree H1](https://www.unitree.com/h1/) humanoid robot must track a velocity command while navigating rough terrain.
27
30
28
31
The task details are:
29
32
@@ -44,7 +47,7 @@ This setup provides a high-dimensional control problem ideal for testing locomot
44
47
45
48
## Step 2: Launch the training
46
49
47
-
Navigate to the Isaac Lab directory and start training in headless mode for maximum performance:
50
+
Navigate to the Isaac Lab directory and start the training job. Running in headless mode disables visualization so that more GPU resources can be used for physics simulation and neural network computation:
This command launches the training with default hyperparameters. The Blackwell GPU runs thousands of parallel H1 environments simultaneously while the Grace CPU handles logging and orchestration.
98
+
During training:
99
+
* The Blackwell GPU accelerates physics simulation, neural network inference, and PPO training updates.
100
+
* The Grace CPU manages environment orchestration, logging, and experiment control.
101
+
* Multiple simulation environments run in parallel, enabling efficient rollout collection for reinforcement learning.
102
+
103
+
Each PPO iteration collects experience from all parallel environments, then updates the policy network using the gathered trajectories.
97
104
98
105
{{% notice Warning %}}
99
106
**Known issue: NVRTC GPU architecture error on DGX Spark**
100
107
101
-
When running RL training on the Blackwell GPU (GB10, compute capability 12.1), you may encounter:
108
+
When running RL training on the Blackwell GPU (GB10, compute capability 12.1), you may encounter an error similar to:
102
109
103
110
```
104
111
RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)
@@ -108,11 +115,12 @@ This error occurs because the NVRTC runtime compiler inside PyTorch does not yet
108
115
109
116
**Workaround**: Make sure you are using the Isaac Sim build from source (as described in the setup section) rather than a pip-installed version. The source build includes the correct CUDA 13 runtime for Blackwell. If the error persists, try running with `--headless` mode, which avoids some NVRTC code paths used by the renderer. Also ensure your NVIDIA driver is up to date (`nvidia-smi` should show driver 580.x or later).
110
117
111
-
This issue is expected to be resolved in future Isaac Sim and PyTorch releases with full Blackwell support.
118
+
Support for Blackwell GPUs is expected to improve in upcoming PyTorch and Isaac Sim releases.
112
119
{{% /notice %}}
113
120
121
+
### Adjusting training parameters
114
122
You can also override default parameters from the command line:
@@ -121,7 +129,6 @@ You can also override default parameters from the command line:
121
129
--max_iterations=1500 \
122
130
--seed=42
123
131
```
124
-
125
132
### Command-line arguments
126
133
127
134
The following table explains the key command-line arguments:
@@ -134,8 +141,10 @@ The following table explains the key command-line arguments:
134
141
|`--max_iterations`| 1500 | Total number of PPO training iterations. Each iteration collects a batch of experience and updates the policy |
135
142
|`--seed`| 0 | Random seed for reproducibility. Set this to get deterministic results across runs |
136
143
144
+
Each environment runs an independent simulation of the robot, allowing the RL algorithm to collect experience efficiently.
145
+
137
146
{{% notice Tip %}}
138
-
On DGX Spark, 2048 to 4096 parallel environments work well for locomotion tasks. Higher values increase sample throughput but require more GPU memory. Start with 2048 if you want faster iteration cycles during development.
147
+
On DGX Spark, 2048 - 4096 parallel environments typically work well for locomotion tasks. Higher values increase sample throughput but require more GPU memory. Start with 2048 if you want faster iteration cycles during development.
139
148
{{% /notice %}}
140
149
141
150
## Step 3: Understand the PPO hyperparameters
@@ -177,14 +186,13 @@ PPO (Proximal Policy Optimization) is the RL algorithm used by RSL-RL. Understan
177
186
|`save_interval`|`50`| Save a model checkpoint every N iterations. Useful for resuming training or evaluating intermediate policies |
178
187
179
188
### How the hyperparameters interact
180
-
181
-
The total amount of experience collected per training iteration is:
182
-
189
+
During training, each iteration collects experience from all parallel environments.
190
+
The total batch size per iteration is:
183
191
```
184
192
batch_size = num_envs × num_steps_per_env
185
193
```
186
194
187
-
For example, with `num_envs=4096` and `num_steps_per_env=24`:
195
+
For example, with `num_envs=4096` and `num_steps_per_env=24`, the batch size per iteration is:
@@ -194,7 +202,7 @@ This batch is then split into `num_mini_batches` (4) mini-batches of ~24,576 ste
194
202
195
203
## Step 4: Monitor the training
196
204
197
-
During training, RSL-RL prints statistics to the terminal at regular intervals. A typical output looks like:
205
+
During training, RSL-RL periodically prints progress statistics to the terminal. A typical log output looks like:
198
206
199
207
```output
200
208
Learning iteration 100/1500
@@ -207,7 +215,7 @@ Learning iteration 100/1500
207
215
fps: 48523
208
216
```
209
217
210
-
Interpreting these values helps track convergence and diagnose training instability, such as stagnating rewards or exploding losses.
218
+
These metrics help you track learning progress and detect issues such as unstable gradients or stagnating policies.
211
219
212
220
The following table explains each metric:
213
221
@@ -241,18 +249,21 @@ For evaluation, use the inference task name `Isaac-Velocity-Rough-H1-Play-v0` in
241
249
242
250
The play script loads the most recent checkpoint and runs the policy in real time. You will observe the Unitree H1 humanoid walking over procedurally generated rough terrain, responding to live velocity commands.
243
251
244
-
You can also specify a particular checkpoint manually, which is useful for comparing intermediate policy performance.
252
+
You can also run inference with a specific checkpoint. This is useful for comparing policy performance at different stages of training.
This command loads the specified checkpoint and runs the policy using the same simulation environment.
252
261
253
262
### Understanding the evaluation
254
263
255
-
During evaluation, you can observe how the robot's behavior improves over the course of training:
264
+
During evaluation, you can observe how the robot’s behavior evolves as training progresses.
265
+
266
+
Typical training behavior follows three stages:
256
267
257
268
-**Early training (iterations 0–200)**: The robot often collapses immediately or performs erratic, uncoordinated motions.
258
269
-**Mid training (iterations 200–800)**: The robot begins to walk forward with some success, though it may still stumble or lose balance on rough terrain.
@@ -268,7 +279,7 @@ At iteration 50, the policy is still in its exploration phase. Most robots exhib
268
279
269
280

270
281
271
-
*** Iteration 1250 (Late Stage, num_envs=512) ***
282
+
*** Iteration 1350 (Late Stage, num_envs=512) ***
272
283
273
284
By iteration 1350, the policy has matured. Most robots demonstrate coordinated walking behavior, balance maintenance, and accurate velocity tracking, even on rough terrain. The improvement in foot placement and heading stability is clearly visible.
274
285
@@ -283,4 +294,4 @@ In this module, you have:
283
294
- Monitored training progress using reward curves, episode statistics, and performance metrics
284
295
- Evaluated the trained policy through interactive visualization and behavior analysis
285
296
286
-
You have now completed the end-to-end workflow of training and validating a reinforcement learning policy for humanoid locomotion on DGX Spark.
297
+
You have now completed the end-to-end workflow of training and validating a reinforcement learning policy for humanoid locomotion on DGX Spark.
0 commit comments