Skip to content

Commit 9283749

Browse files
committed
Merge branch 'develop' into mh/new_defaults_core
# Conflicts: # source/isaaclab_tasks/test/core/test_environment_determinism.py
2 parents a075872 + 688cdd8 commit 9283749

53 files changed

Lines changed: 864 additions & 255 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ Table of Contents
9494
source/refs/reference_architecture/index
9595

9696

97+
.. toctree::
98+
:maxdepth: 1
99+
:caption: Concepts
100+
101+
source/concepts/backends_and_presets
102+
103+
97104
.. toctree::
98105
:maxdepth: 2
99106
:caption: Getting Started
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
.. _backends-and-presets:
2+
3+
Backends and Presets
4+
====================
5+
6+
An Isaac Lab environment describes the robot, scene, sensors, and task. A
7+
**backend** supplies the physics or rendering implementation that brings that
8+
description to life. A **preset** is a named, tested configuration choice that
9+
lets you switch implementations or task modes without editing Python.
10+
11+
In practice, the same environment can run with a different physics engine,
12+
renderer, or observation mode by adding a short selector:
13+
14+
.. code-block:: bash
15+
16+
uv run isaaclab train --rl_library rsl_rl \
17+
--task Isaac-Cartpole-Direct physics=newton_mjwarp
18+
19+
The task stays ``Isaac-Cartpole-Direct``. The preset changes the configuration
20+
used to launch it.
21+
22+
23+
The mental model
24+
----------------
25+
26+
Think of an environment as the experiment and presets as the knobs that select
27+
tested versions of its larger building blocks:
28+
29+
.. code-block:: text
30+
31+
Environment
32+
├── physics=... Which physics configuration runs the simulation?
33+
├── renderer=... Which renderer produces camera data?
34+
└── presets=... Which task-specific mode or config bundle is used?
35+
36+
After configuration is resolved, Isaac Lab's common asset, sensor, and scene
37+
APIs dispatch to the selected backend implementation. Environment code can use
38+
the same public API across PhysX, Newton, and OvPhysX instead of branching on
39+
the active engine throughout the task.
40+
41+
Physics, rendering, and visualization are separate choices. For example, a
42+
camera environment can use Newton physics with the Newton Warp renderer, while
43+
the visualizer is selected independently with ``--viz``.
44+
45+
46+
Find what a task supports
47+
-------------------------
48+
49+
Preset support is task-specific. Before choosing a name, ask the task what it
50+
offers:
51+
52+
.. code-block:: bash
53+
54+
uv run isaaclab train --rl_library rsl_rl \
55+
--task Isaac-Cartpole-Camera-Direct --help
56+
57+
The help output groups names by ``physics=``, ``renderer=``, and ``presets=``.
58+
To browse all registered environments and their presets at once, run:
59+
60+
.. code-block:: bash
61+
62+
uv run python scripts/environments/list_envs.py --show_presets
63+
64+
An empty preset list is not an error. It means that the environment uses its
65+
registered default configuration and does not expose alternatives. Passing a
66+
name that a task does not list is unsupported and fails during configuration
67+
validation.
68+
69+
70+
Choose a selector
71+
-----------------
72+
73+
.. list-table::
74+
:widths: 23 32 45
75+
:header-rows: 1
76+
77+
* - Selector
78+
- Example
79+
- What it changes
80+
* - ``physics=NAME``
81+
- ``physics=newton_mjwarp``
82+
- Selects a physics configuration, including its backend and solver.
83+
* - ``renderer=NAME``
84+
- ``renderer=newton_renderer``
85+
- Selects a renderer configuration for tasks that produce camera data.
86+
* - ``presets=NAME[,NAME,...]``
87+
- ``presets=rgb``
88+
- Applies task-specific choices such as observation modes, camera layouts,
89+
or compatible configuration bundles.
90+
91+
These are Hydra tokens, so append them without leading dashes. They work with
92+
training, playback, and environment scripts that use Isaac Lab's task
93+
configuration launcher.
94+
95+
Selectors can be combined. This command chooses Newton with the MuJoCo-Warp
96+
solver, the Newton Warp renderer, and RGB observations:
97+
98+
.. code-block:: bash
99+
100+
uv run isaaclab train --rl_library rsl_rl \
101+
--task Isaac-Cartpole-Camera-Direct \
102+
physics=newton_mjwarp renderer=newton_renderer presets=rgb
103+
104+
Only combine values listed for the task. Some physics, renderer, sensor, and
105+
observation configurations are incompatible, and the task may reject an
106+
invalid combination with a focused error message.
107+
108+
109+
Common backend choices
110+
----------------------
111+
112+
The exact list depends on the environment, but these names follow shared
113+
conventions:
114+
115+
.. list-table:: Physics presets
116+
:widths: 30 70
117+
:header-rows: 1
118+
119+
* - Name
120+
- Meaning
121+
* - ``isaacsim_physx``
122+
- Concrete Isaac Sim PhysX configuration. This is the default for tasks
123+
whose established default is Isaac Sim PhysX.
124+
* - ``physx``
125+
- Automatic PhysX-family selection. Isaac Sim PhysX is used when the
126+
runtime needs Kit; a configured OvPhysX alternative can be used for
127+
fully kit-less runs.
128+
* - ``newton_mjwarp``
129+
- Newton physics with the MuJoCo-Warp solver.
130+
* - ``newton_kamino``
131+
- Newton physics with the Kamino solver. Support is beta and currently
132+
limited to selected tasks and compatible assets.
133+
* - ``ovphysx``
134+
- Concrete OvPhysX configuration for supported kit-less tasks.
135+
136+
.. list-table:: Renderer presets
137+
:widths: 30 70
138+
:header-rows: 1
139+
140+
* - Name
141+
- Meaning
142+
* - ``isaacsim_rtx``
143+
- Concrete Isaac Sim RTX renderer and the established default for
144+
multi-backend camera tasks.
145+
* - ``rtx``
146+
- Automatic RTX-family selection based on the resolved runtime.
147+
* - ``newton_renderer``
148+
- Newton Warp renderer.
149+
* - ``ovrtx``
150+
- Concrete OVRTX renderer.
151+
152+
Automatic selectors such as ``physics=physx`` and ``renderer=rtx`` are opt-in.
153+
Defaults are concrete so that running a task without selectors is predictable.
154+
A solver is not a separate backend: ``newton_mjwarp`` and ``newton_kamino``
155+
both use Newton but configure different solvers.
156+
157+
158+
Defaults, presets, and fine-tuning
159+
----------------------------------
160+
161+
A preset replaces the complete configuration section at its location; it does
162+
not merge fields from two alternatives. Isaac Lab resolves configuration in
163+
this order:
164+
165+
1. Apply each preset config's ``default`` choice.
166+
2. Apply global choices from ``presets=...``.
167+
3. Apply a preset targeted at a specific path, such as
168+
``env.sim.physics=newton_mjwarp``.
169+
4. Apply scalar Hydra overrides, such as ``env.sim.dt=0.002``.
170+
171+
The last step makes it easy to start from a maintained preset and tune one
172+
value:
173+
174+
.. code-block:: bash
175+
176+
uv run isaaclab train --rl_library rsl_rl \
177+
--task Isaac-Cartpole-Direct \
178+
physics=newton_mjwarp env.sim.dt=0.002
179+
180+
Prefer ``physics=`` and ``renderer=`` for backend choices because they state
181+
intent clearly. Use ``presets=`` for task-specific modes or when one name must
182+
update several matching sections together. Use a path selector only when you
183+
intend to replace one particular section.
184+
185+
.. important::
186+
187+
Keep behavior-changing presets the same when loading a checkpoint. An
188+
observation preset can change tensor shapes, and a policy trained with one
189+
observation mode may not load with another.
190+
191+
192+
How task authors expose choices
193+
-------------------------------
194+
195+
Task authors define alternatives with
196+
:class:`~isaaclab_tasks.utils.hydra.PresetCfg` and choose one as the default.
197+
For a multi-backend task, the preset wrapper belongs in
198+
:class:`~isaaclab.sim.SimulationCfg`:
199+
200+
.. code-block:: python
201+
202+
from isaaclab.physics import PhysxAutoCfg
203+
from isaaclab.sim import SimulationCfg
204+
from isaaclab.utils.configclass import configclass
205+
from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg
206+
from isaaclab_ovphysx.physics import OvPhysxCfg
207+
from isaaclab_physx.physics import PhysxCfg
208+
from isaaclab_tasks.utils import PresetCfg
209+
210+
211+
@configclass
212+
class PhysicsCfg(PresetCfg):
213+
isaacsim_physx = PhysxCfg()
214+
ovphysx = OvPhysxCfg()
215+
physx = PhysxAutoCfg(
216+
isaacsim_physx=isaacsim_physx,
217+
ovphysx=ovphysx,
218+
)
219+
default = isaacsim_physx
220+
newton_mjwarp = NewtonCfg(solver_cfg=MJWarpSolverCfg())
221+
222+
223+
@configclass
224+
class MyEnvCfg:
225+
sim: SimulationCfg = SimulationCfg(physics=PhysicsCfg())
226+
227+
Keep backend-specific values inside named configurations whenever possible.
228+
This keeps task logic shared and makes every supported choice visible from the
229+
command line.
230+
231+
232+
Where to go next
233+
----------------
234+
235+
- :doc:`/source/overview/environments` lists environments and their supported
236+
presets.
237+
- :doc:`/source/features/hydra` covers scalar overrides, preset authoring,
238+
conflict handling, and advanced configuration behavior.
239+
- :doc:`/source/overview/core-concepts/multi_backend_architecture` explains how
240+
factories, the physics manager, assets, and sensors dispatch across backends.
241+
- :doc:`/source/overview/core-concepts/physical-backends/index` compares physics
242+
backend capabilities and links to backend-specific setup guides.
243+
- :doc:`/source/overview/core-concepts/renderers` explains renderer selection and
244+
implementation details.

docs/source/features/hydra.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ combinations early with clear error messages.
214214
Preset System
215215
-------------
216216

217+
For a user-focused introduction to choosing physics, rendering, and task
218+
variants, start with :doc:`/source/concepts/backends_and_presets`. This section
219+
covers the complete preset definition and resolution behavior.
220+
217221
The preset system lets you swap out entire config sections -- or individual scalar
218222
values -- with a single command line argument. Instead of overriding individual
219223
fields, you select a named preset that **completely replaces** the config section

docs/source/features/reproducibility.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ Pass ``--deterministic`` to enable reproducible rendering from the app launcher.
5555
./isaaclab.sh train --rl_library rl_games \
5656
--task Isaac-Cartpole-Camera --deterministic
5757
58+
Newton physics determinism
59+
^^^^^^^^^^^^^^^^^^^^^^^^^^
60+
61+
Set :attr:`isaaclab_newton.physics.NewtonCfg.deterministic_mode` to
62+
``"gpu_to_gpu"`` to request reproducibility across GPU architectures, or to
63+
``"run_to_run"`` to request reproducibility on one GPU. Newton applies the
64+
selected mode to supported solver kernels and enables deterministic contact
65+
ordering in its collision pipeline. Deterministic execution can increase
66+
memory use and reduce simulation performance. MJWarp on the GPU with
67+
:attr:`isaaclab_newton.physics.MJWarpSolverCfg.disable_sensors` set to ``True``,
68+
XPBD, and Featherstone are supported; selecting an unsupported solver raises
69+
an error.
70+
71+
.. warning::
72+
73+
Deterministic contact ordering adds sorting work and allocates buffers sized
74+
for the configured maximum contact count. Runtime and memory overhead
75+
therefore grow with contact capacity. Enable this mode only when its
76+
reproducibility guarantee is required.
77+
5878
For results on our determinacy testing for RL training, please check the GitHub Pull Request `#940`_.
5979

6080
.. tip::

docs/source/overview/core-concepts/multi_backend_architecture.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ instantiations automatically use the selected backend.
169169
Multi-Backend Environments with Presets
170170
---------------------------------------
171171

172-
Environments can support multiple backends simultaneously using the :doc:`preset system
173-
</source/features/hydra>`. Each backend gets its own configuration variant. The example
174-
below shows only the physics-related fields:
172+
Environments can support multiple backends simultaneously using :doc:`backend and preset
173+
selectors </source/concepts/backends_and_presets>`. Each backend gets its own configuration
174+
variant. The example below shows only the physics-related fields:
175175

176176
.. code-block:: python
177177
@@ -470,7 +470,8 @@ See Also
470470

471471
- :doc:`/source/migration/migrating_to_isaaclab_3-0` — migration guide from Isaac Lab 2.x to the
472472
multi-backend architecture
473-
- :doc:`/source/features/hydra` — preset system for multi-backend environment configurations
473+
- :doc:`/source/concepts/backends_and_presets` — user guide to backend and preset selection
474+
- :doc:`/source/features/hydra` — advanced configuration and preset authoring
474475
- :doc:`physical-backends/index` — feature matrix and per-backend guides (PhysX, Newton, OvPhysX)
475476
- :doc:`physical-backends/newton/index` — Newton backend guide
476477
- :doc:`physical-backends/newton/newton-manager-abstraction` — adding Newton solver managers and

docs/source/overview/environments.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ preset names grouped by selector type at the command line, or run
116116
``uv run python scripts/environments/list_envs.py --show_presets``
117117
to list presets for every registered environment.
118118

119-
See the :doc:`Hydra preset system documentation </source/features/hydra>`
120-
for all available backend names and how the typed selectors work.
119+
See :doc:`/source/concepts/backends_and_presets` for a guided introduction to
120+
backend names, preset discovery, and typed selectors.
121121

122122
.. note::
123123

docs/source/overview/reinforcement-learning/rl_existing_scripts.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Preset Selectors
99

1010
All training and play commands accept ``physics=NAME``, ``renderer=NAME``, and
1111
``presets=NAME[,NAME,...]`` tokens appended directly to the command (no leading dashes).
12-
See :doc:`/source/features/hydra` for all available names and how the selectors work.
12+
See :doc:`/source/concepts/backends_and_presets` for preset discovery, common backend
13+
names, and how the selectors work.
1314

1415
.. tab-set::
1516

docs/source/setup/quickstart.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ Add task-specific options with ``presets=<name>``; for example:
176176
--task Isaac-Cartpole-Camera-Direct \
177177
physics=newton_mjwarp renderer=newton_renderer presets=rgb
178178
179-
See :doc:`/source/features/hydra` for configuration overrides and
180-
``presets=`` in more detail.
179+
See :doc:`/source/concepts/backends_and_presets` for backend and preset selection,
180+
and :doc:`/source/features/hydra` for arbitrary configuration overrides.
181181

182182

183183
Visualize a task
@@ -259,6 +259,7 @@ Next steps
259259
----------
260260

261261
- Browse all registered environments: :doc:`/source/overview/environments`
262-
- Learn how task configuration works: :doc:`/source/features/hydra`
262+
- Learn how backends and presets fit together: :doc:`/source/concepts/backends_and_presets`
263+
- Learn how to override task configuration: :doc:`/source/features/hydra`
263264
- Follow a guided environment-building tutorial: :doc:`/source/tutorials/index`
264265
- Read the installation options and troubleshooting guide: :ref:`isaaclab-installation-root`

source/isaaclab/changelog.d/address-ovphysx-lifecycle-review.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

source/isaaclab/changelog.d/jichuanh-kitless-docker-fixes.minor.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)