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
Copy file name to clipboardExpand all lines: content/learning-paths/laptops-and-desktops/dgx_spark_isaac_robotics/3_isaac_small_project.md
+25-16Lines changed: 25 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ layout: learningpathall
8
8
9
9
## Deploy a basic robot simulation
10
10
11
-
With Isaac Sim and Isaac Lab installed, you can now run your first robot simulation. In this section you will launch a pre-built simulation scene, interact with it programmatically, and understand the key concepts behind Isaac Sim's simulation loop.
11
+
With Isaac Sim and Isaac Lab installed, you can now run your first robot simulation. In this section you will launch a pre-built simulation scene, interact with it programmatically, and explore the key concepts behind Isaac Sim's simulation loop.
12
12
13
-
You will work with the Cartpole environment, a classic control benchmark where a cart must balance a pole by applying horizontal forces. This environment is simple enough to understand quickly but demonstrates all the core simulation concepts required for more complex robotics tasks.
13
+
The example environment used here is Cartpole, a classic control benchmark in which a cart must balance an upright pole by applying horizontal forces. Although simple, this environment demonstrates the core mechanics of simulation environments used in robotics and reinforcement learning.
This script creates an empty simulation world with a ground plane and default lighting. It validates that the Isaac Sim rendering and physics engines are working on your DGX Spark system.
26
26
27
-
If a display is connected, a viewer window should open; otherwise, log messages will confirm that the simulation initialized successfully in headless mode.
27
+
If a display is available, a viewer window opens showing the simulation scene. On systems without a graphical display, the simulation runs in headless mode, and initialization messages appear in the terminal.
28
28
29
29
Press `Ctrl+C` to exit the simulation.
30
30
31
31
## Step 2: Spawn and simulate a robot
32
32
33
-
Next, run a more complete example that spawns articulated robots into the scene. This tutorial demonstrates how Isaac Sim handles multi-body physics:
34
-
33
+
Next, run a tutorial that loads an articulated robot into the simulation and advances the physics engine.
34
+
This example demonstrates how Isaac Sim handles multi-body dynamics, including loading robot assets, configuring actuators, and stepping the physics simulation.
@@ -46,7 +47,10 @@ This script loads a robot model, advances the physics simulation, and prints joi
46
47
47
48
## Step 3: Run the Cartpole environment
48
49
49
-
Now run a complete environment that combines scene, action, observation, and event managers. The `create_cartpole_base_env.py` tutorial creates a Cartpole base environment and applies random actions:
50
+
Next, run a complete Isaac Lab environment that combines a simulation scene with environment management components such as action, observation, and event managers.
51
+
52
+
The `create_cartpole_base_env.py` tutorial creates a Cartpole environment and applies random actions to the cart. Running multiple environments in parallel allows reinforcement learning algorithms to collect experience more efficiently.
@@ -62,15 +66,16 @@ This tutorial script uses a hardcoded `CartpoleEnvCfg` configuration. It does no
62
66
63
67
## Step 4: Run the Cartpole RL environment
64
68
65
-
The previous script creates a base environment without rewards or terminations. To see the full RL environment (with reward computation and episode resets), run:
69
+
The previous tutorial created a base simulation environment that advances physics and applies actions but does not include reinforcement learning components such as rewards or episode termination.
70
+
To run the full reinforcement learning version of the environment, execute the following command:
This script wraps the Cartpole scene in a `ManagerBasedRLEnv`, which includes reward computation, termination conditions, and the standard Gymnasium `step()` interface that returns `(obs, reward, terminated, truncated, info)`.
72
77
73
-
The key difference between the two scripts:
78
+
Key differences between the base and RL environments:
74
79
75
80
|**Script**|**Environment type**|**Returns from step()**|
@@ -79,11 +84,11 @@ The key difference between the two scripts:
79
84
80
85
## Step 5: Understand the simulation code
81
86
82
-
To understand what happens inside an Isaac Lab environment, examine the Cartpole environment source code. The key elements are:
87
+
To better understand how Isaac Lab environments operate, examine the Cartpole environment source code. Isaac Lab environments are typically defined through configuration classes that specify the scene layout, action interfaces, observation space, and environment events.
83
88
84
89
### Environment configuration
85
90
86
-
Every Isaac Lab environment starts with a configuration class that defines the simulation parameters. The `CartpoleEnvCfg`in the tutorial specifies:
91
+
Every Isaac Lab environment starts with a configuration class that defines the simulation parameters. In the Cartpole tutorial, the `CartpoleEnvCfg`configuration specifies the scene layout and simulation timing:
87
92
88
93
```python
89
94
@configclass
@@ -103,7 +108,7 @@ class CartpoleEnvCfg(ManagerBasedEnvCfg):
103
108
self.sim.dt =0.005# sim step every 5ms: 200Hz
104
109
```
105
110
106
-
The table below explains each parameter:
111
+
The table below summarizes the key parameters:
107
112
108
113
|**Parameter**|**Value**|**Description**|
109
114
|---------------|-----------|-----------------|
@@ -114,7 +119,7 @@ The table below explains each parameter:
114
119
115
120
### Actions, observations, and events
116
121
117
-
The configuration defines three manager groups:
122
+
Isaac Lab environments organize functionality into manager groups that define how the agent interacts with the simulation.
Events introduce variability that improves training robustness. Randomizing the pole mass on startup means the agent must learn to balance poles of different weights. Randomizing joint positions on reset ensures each episode starts from a different state.
166
+
Events introduce controlled randomness into the environment.
167
+
For example:
168
+
* The pole mass is randomized during initialization
169
+
* Cart and pole positions are randomized on reset
170
+
This variability helps the trained policy generalize to slightly different system dynamics.
163
171
164
172
### The simulation loop
165
173
166
-
The core simulation loop in Isaac Lab follows a standard Gymnasium-style interface. From`run_cartpole_rl_env.py`:
174
+
The core simulation loop in Isaac Lab follows a standard Gymnasium-style interface. The example below is taken from`run_cartpole_rl_env.py`:
167
175
168
176
```python
169
177
# Create the RL environment
@@ -200,8 +208,9 @@ All computations happen in parallel across all environments using PyTorch tensor
200
208
201
209
## Step 6: Run with headless mode
202
210
203
-
For reinforcement learning tasks, headless mode is preferred to maximize GPU throughput. You can test it now using the Cartpole RL environment.
211
+
For reinforcement learning workflows, it is common to run Isaac Sim without rendering. Disabling the viewer allows more GPU resources to be used for physics simulation and neural network computation.
204
212
213
+
You can test headless execution using the Cartpole RL environment:
0 commit comments