Skip to content

Commit 1730053

Browse files
Merge branch 'develop' into antoine/document-kamino-tutorial
2 parents 274dbe6 + 530fa8b commit 1730053

90 files changed

Lines changed: 2047 additions & 941 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/source/api/lab/isaaclab.sensors.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
Imu
3838
ImuCfg
3939
JointWrenchSensor
40+
JointWrenchSensorData
4041
JointWrenchSensorCfg
4142

4243
Sensor Base
@@ -200,6 +201,11 @@ Joint Wrench Sensor
200201
:inherited-members:
201202
:show-inheritance:
202203

204+
.. autoclass:: JointWrenchSensorData
205+
:members:
206+
:inherited-members:
207+
:exclude-members: __init__
208+
203209
.. autoclass:: JointWrenchSensorCfg
204210
:members:
205211
:inherited-members:

docs/source/experimental-features/newton-physics-integration/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ To verify that the installation was successful, run the following command from t
7575

7676
.. code-block:: bash
7777
78-
./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Cartpole-Direct-v0 --num_envs 128 --viz newton presets=newton
78+
./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Cartpole-Direct-v0 --num_envs 128 --viz newton presets=newton_mjwarp

docs/source/features/hydra.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ Override Order
188188
Overrides are applied in sequence:
189189

190190
1. **Auto-default**: Configs with a ``"default"`` field auto-apply without CLI args
191-
2. **Global presets**: ``presets=newton,inference`` applies to ALL matching configs
192-
3. **Path presets**: ``env.backend=newton`` replaces a specific section
191+
2. **Global presets**: ``presets=newton_mjwarp,inference`` applies to ALL matching configs
192+
3. **Path presets**: ``env.backend=newton_mjwarp`` replaces a specific section
193193
4. **Scalar overrides**: ``env.sim.dt=0.001`` modifies individual fields
194194

195195

@@ -207,7 +207,7 @@ override is given:
207207
@configclass
208208
class PhysicsCfg(PresetCfg):
209209
default: PhysxCfg = PhysxCfg()
210-
newton: NewtonCfg = NewtonCfg()
210+
newton_mjwarp: NewtonCfg = NewtonCfg()
211211
212212
@configclass
213213
class MyEnvCfg:
@@ -216,7 +216,7 @@ override is given:
216216
.. code-block:: bash
217217
218218
# Use Newton physics backend
219-
python train.py --task=Isaac-Reach-Franka-v0 env.physics=newton
219+
python train.py --task=Isaac-Reach-Franka-v0 env.physics=newton_mjwarp
220220
221221
The ``default`` field can be set to ``None`` to make an optional feature that is
222222
disabled unless explicitly selected:
@@ -261,11 +261,11 @@ Physics backend selection uses the same preset system. A task can define a
261261
class CartpolePhysicsCfg(PresetCfg):
262262
default: PhysxCfg = PhysxCfg()
263263
physx: PhysxCfg = PhysxCfg()
264-
newton: NewtonCfg = NewtonCfg(
264+
newton_mjwarp: NewtonCfg = NewtonCfg(
265265
solver_cfg=MJWarpSolverCfg(njmax=5, nconmax=3),
266266
num_substeps=1,
267267
)
268-
kamino: NewtonCfg = NewtonCfg(
268+
newton_kamino: NewtonCfg = NewtonCfg(
269269
solver_cfg=KaminoSolverCfg(
270270
integrator="moreau",
271271
use_collision_detector=True,
@@ -277,10 +277,10 @@ Physics backend selection uses the same preset system. A task can define a
277277
use_cuda_graph=True,
278278
)
279279
280-
The ``newton`` and ``kamino`` entries both select the Newton physics backend because
280+
The ``newton_mjwarp`` and ``newton_kamino`` entries both select the Newton physics backend because
281281
both entries are :class:`~isaaclab_newton.physics.NewtonCfg` objects. The difference
282-
is the solver configuration: ``newton`` uses
283-
:class:`~isaaclab_newton.physics.MJWarpSolverCfg`, while ``kamino`` uses
282+
is the solver configuration: ``newton_mjwarp`` uses
283+
:class:`~isaaclab_newton.physics.MJWarpSolverCfg`, while ``newton_kamino`` uses
284284
:class:`~isaaclab_newton.physics.KaminoSolverCfg`.
285285

286286
Kamino is therefore a solver preset, not a separate Isaac Lab backend. The same
@@ -294,19 +294,19 @@ is currently beta.
294294
Kamino support is experimental and currently depends on the asset being
295295
structured in a way that Kamino can consume. Assets that work with the
296296
MuJoCo-Warp or PhysX presets may still require model-structure updates before
297-
they work with ``presets=kamino``.
297+
they work with ``presets=newton_kamino``.
298298

299299
.. code-block:: bash
300300
301301
# Select the Kamino solver preset everywhere it is defined
302-
python train.py --task=Isaac-Cartpole-v0 presets=kamino
302+
python train.py --task=Isaac-Cartpole-v0 presets=newton_kamino
303303
304304
# Select the Kamino solver preset for a specific physics config path
305-
python train.py --task=Isaac-Cartpole-v0 env.sim.physics=kamino
305+
python train.py --task=Isaac-Cartpole-v0 env.sim.physics=newton_kamino
306306
307-
The ``kamino`` preset is currently defined for ``Isaac-Cartpole-Direct-v0``,
307+
The ``newton_kamino`` preset is currently defined for ``Isaac-Cartpole-Direct-v0``,
308308
``Isaac-Ant-Direct-v0``, ``Isaac-Cartpole-v0``, and ``Isaac-Ant-v0``. Passing
309-
``presets=kamino`` to a task without a ``kamino`` preset does not enable Kamino;
309+
``presets=newton_kamino`` to a task without a ``newton_kamino`` preset does not enable Kamino;
310310
add and validate a task-specific preset first.
311311

312312

@@ -322,7 +322,7 @@ For simple values (scalars, lists) that don't warrant a full subclass, use the
322322
from isaaclab_tasks.utils.hydra import preset
323323
324324
# Scalar preset -- one line, no boilerplate class
325-
self.scene.robot.actuators["legs"].armature = preset(default=0.0, newton=0.01, physx=0.0)
325+
self.scene.robot.actuators["legs"].armature = preset(default=0.0, newton_mjwarp=0.01, physx=0.0)
326326
327327
This is equivalent to defining a ``PresetCfg`` subclass with three ``float``
328328
fields, but without the ceremony. The ``default`` keyword is required.
@@ -351,8 +351,8 @@ including inside dict-valued fields such as ``actuators``:
351351

352352
.. code-block:: bash
353353
354-
# Select newton preset globally -- sets armature to 0.01
355-
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 presets=newton
354+
# Select MJWarp preset globally -- sets armature to 0.01
355+
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 presets=newton_mjwarp
356356
357357
358358
Using Presets
@@ -363,29 +363,29 @@ Using Presets
363363
.. code-block:: bash
364364
365365
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 \
366-
env.events=newton
366+
env.events=newton_mjwarp
367367
368368
**Global presets** -- apply the same preset name everywhere it exists:
369369

370370
.. code-block:: bash
371371
372-
# Apply "newton" preset to all configs that define it
372+
# Apply "newton_mjwarp" preset to all configs that define it
373373
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 \
374-
presets=newton
374+
presets=newton_mjwarp
375375
376376
**Multiple global presets** -- apply several non-conflicting presets:
377377

378378
.. code-block:: bash
379379
380380
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 \
381-
presets=newton,inference
381+
presets=newton_mjwarp,inference
382382
383383
**Combined** -- global presets + scalar overrides:
384384

385385
.. code-block:: bash
386386
387387
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 \
388-
presets=newton \
388+
presets=newton_mjwarp \
389389
env.sim.dt=0.002
390390
391391
@@ -411,8 +411,8 @@ working together:
411411
:language: python
412412
:lines: 21-42
413413

414-
A single ``presets=newton`` on the command line resolves every ``PresetCfg``
415-
and ``preset()`` that defines a ``newton`` field: the physics engine is swapped
414+
A single ``presets=newton_mjwarp`` on the command line resolves every ``PresetCfg``
415+
and ``preset()`` that defines a ``newton_mjwarp`` field: the physics engine is swapped
416416
to Newton, ``AnymalCEventsCfg`` selects Newton-compatible events, and the
417417
actuator armature is set to ``0.01``.
418418

@@ -421,8 +421,8 @@ actuator armature is set to ``0.01``.
421421
# Default (PhysX events, armature=0.0)
422422
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0
423423
424-
# Newton (Newton events, armature=0.01)
425-
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 presets=newton
424+
# MJWarp (Newton events, armature=0.01)
425+
python train.py --task=Isaac-Velocity-Rough-Anymal-C-v0 presets=newton_mjwarp
426426
427427
428428
Summary
@@ -439,11 +439,11 @@ Summary
439439
- ``env.sim.dt=0.001``
440440
- Modify single field
441441
* - Path preset
442-
- ``env.events=newton``
442+
- ``env.events=newton_mjwarp``
443443
- Replace entire section
444444
* - Global preset
445-
- ``presets=newton``
445+
- ``presets=newton_mjwarp``
446446
- Apply everywhere matching
447447
* - Combined
448-
- ``presets=newton env.sim.dt=0.001``
448+
- ``presets=newton_mjwarp env.sim.dt=0.001``
449449
- Global + scalar overrides

docs/source/features/visualization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ set ``VideoRecorderCfg.backend_source = "renderer"`` in the task configuration.
240240
--max_iterations=5 \
241241
--num_envs=1024 \
242242
--benchmark_backend=summary \
243-
"presets=newton,ovrtx_renderer,rgb"
243+
"presets=newton_mjwarp,ovrtx_renderer,rgb"
244244
245245
**Record video with the Isaac RTX renderer preset using the Newton video backend**
246246

docs/source/how-to/record_video.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ the Rerun visualizer rather than producing ``--video`` clips, and Viser does not
8282

8383
Set ``VideoRecorderCfg.backend_source = "renderer"`` to ignore active visualizers and choose from the
8484
physics/renderer stack instead. In that mode, PhysX physics (``presets=physx,...``) or Isaac RTX
85-
(``presets=isaac_rtx_renderer,...``) selects the Kit path. Newton physics (``presets=newton,...``) or
85+
(``presets=isaac_rtx_renderer,...``) selects the Kit path. Newton physics (``presets=newton_mjwarp,...``) or
8686
the Newton Warp renderer (``presets=newton_renderer,...``) selects the Newton GL path when no Kit
8787
signal is present. OVRTX (``presets=ovrtx_renderer,...`` from ``isaaclab_ov``) can pair with IsaacSim
8888
or Newton physics; in that case the video backend is selected via the physics preset. If both Kit and
@@ -149,10 +149,10 @@ Summary
149149
* - ``physx,...`` or ``isaac_rtx_renderer,...``
150150
- Kit (``"kit"``)
151151
- ``/OmniverseKit_Persp`` + Replicator RGB
152-
* - ``newton,...`` or ``newton_renderer,...`` (no Kit signals)
152+
* - ``newton_mjwarp,...`` or ``newton_renderer,...`` (no Kit signals)
153153
- Newton GL (``"newton_gl"``)
154154
- ``newton.viewer.ViewerGL`` on the SDP Newton model
155-
* - ``newton,...,ovrtx_renderer,...`` (OVRTX + Newton physics)
155+
* - ``newton_mjwarp,...,ovrtx_renderer,...`` (OVRTX + Newton physics)
156156
- Newton GL (``"newton_gl"``)
157157
- ``newton.viewer.ViewerGL`` on the SDP Newton model
158158
* - ``--visualizer kit`` with default ``backend_source``

docs/source/migration/migrating_to_isaaclab_3-0.rst

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ The following sensor classes also remain in the ``isaaclab`` package with unchan
158158
- :class:`~isaaclab.sensors.Imu`, :class:`~isaaclab.sensors.ImuCfg`, :class:`~isaaclab.sensors.ImuData`
159159
- :class:`~isaaclab.sensors.Pva`, :class:`~isaaclab.sensors.PvaCfg`, :class:`~isaaclab.sensors.PvaData`
160160
- :class:`~isaaclab.sensors.FrameTransformer`, :class:`~isaaclab.sensors.FrameTransformerCfg`, :class:`~isaaclab.sensors.FrameTransformerData`
161+
- :class:`~isaaclab.sensors.JointWrenchSensor`, :class:`~isaaclab.sensors.JointWrenchSensorCfg`,
162+
:class:`~isaaclab.sensors.JointWrenchSensorData`
161163

162164
These sensor classes now use factory patterns that automatically instantiate the appropriate backend
163165
implementation (PhysX by default), maintaining full backward compatibility.
@@ -179,6 +181,7 @@ you can import from ``isaaclab_physx.sensors``:
179181
from isaaclab_physx.sensors import Imu, ImuData
180182
from isaaclab_physx.sensors import Pva, PvaData
181183
from isaaclab_physx.sensors import FrameTransformer, FrameTransformerData
184+
from isaaclab_physx.sensors import JointWrenchSensor, JointWrenchSensorData
182185
183186
184187
New ``isaaclab_newton`` Extension
@@ -188,6 +191,8 @@ A new extension ``isaaclab_newton`` provides Newton physics backend implementati
188191

189192
- :class:`~isaaclab_newton.assets.Articulation` and :class:`~isaaclab_newton.assets.ArticulationData`
190193
- :class:`~isaaclab_newton.assets.RigidObject` and :class:`~isaaclab_newton.assets.RigidObjectData`
194+
- :class:`~isaaclab_newton.sensors.JointWrenchSensor` and
195+
:class:`~isaaclab_newton.sensors.JointWrenchSensorData`
191196

192197
These classes implement the same base interfaces as their PhysX counterparts
193198
(:class:`~isaaclab.assets.BaseArticulation`, :class:`~isaaclab.assets.BaseRigidObject`),
@@ -331,6 +336,75 @@ If you need to track sensor poses in world frame, please use a dedicated sensor
331336
sensor_quat = frame_transformer.data.target_quat_w
332337
333338
339+
Articulation Joint Wrench Data Moved to ``JointWrenchSensor``
340+
-------------------------------------------------------------
341+
342+
The ``ArticulationData.body_incoming_joint_wrench_b`` property has been removed. In
343+
Isaac Lab 3.0, incoming joint reaction wrenches are exposed through
344+
:class:`~isaaclab.sensors.JointWrenchSensor`, which has PhysX and Newton backend
345+
implementations and returns separate force [N] and torque [N·m] buffers.
346+
The sensor reports wrenches in the child-side incoming joint frame, with torque
347+
referenced at the child-side joint anchor.
348+
349+
**Before (Isaac Lab 2.x):**
350+
351+
.. code-block:: python
352+
353+
wrench_b = robot.data.body_incoming_joint_wrench_b.torch[:, body_ids]
354+
355+
**After (Isaac Lab 3.x):**
356+
357+
.. code-block:: python
358+
359+
import torch
360+
from isaaclab.scene import InteractiveSceneCfg
361+
from isaaclab.sensors import JointWrenchSensorCfg
362+
363+
class MySceneCfg(InteractiveSceneCfg):
364+
robot = ROBOT_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")
365+
joint_wrench = JointWrenchSensorCfg(prim_path="{ENV_REGEX_NS}/Robot")
366+
367+
sensor = env.scene.sensors["joint_wrench"]
368+
data = sensor.data
369+
wrench_j = torch.cat(
370+
(
371+
data.force.torch[:, body_ids],
372+
data.torque.torch[:, body_ids],
373+
),
374+
dim=-1,
375+
)
376+
377+
Use :attr:`~isaaclab.sensors.BaseJointWrenchSensor.body_names` or
378+
:meth:`~isaaclab.sensors.BaseJointWrenchSensor.find_bodies` to map sensor entries to
379+
articulation body names. PhysX reports one entry for every link, including the articulation
380+
root link. Newton reports the child bodies of reportable incoming joints.
381+
382+
For manager-based environments, update observations that used the articulation data property to
383+
depend on the joint-wrench sensor instead:
384+
385+
.. code-block:: python
386+
387+
import isaaclab.envs.mdp as mdp
388+
from isaaclab.managers import SceneEntityCfg
389+
from isaaclab.managers import ObservationTermCfg as ObsTerm
390+
from isaaclab.scene import InteractiveSceneCfg
391+
from isaaclab.sensors import JointWrenchSensorCfg
392+
393+
class MySceneCfg(InteractiveSceneCfg):
394+
robot = ROBOT_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")
395+
joint_wrench = JointWrenchSensorCfg(prim_path="{ENV_REGEX_NS}/Robot")
396+
397+
feet_body_forces = ObsTerm(
398+
func=mdp.body_incoming_wrench,
399+
params={
400+
"sensor_cfg": SceneEntityCfg(
401+
"joint_wrench",
402+
body_names=["left_foot", "right_foot"],
403+
)
404+
},
405+
)
406+
407+
334408
Multi-Backend Support: PresetCfg Pattern
335409
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336410

@@ -356,17 +430,17 @@ when no CLI override is given. Other fields are named presets selectable with
356430
class MyPhysicsCfg(PresetCfg):
357431
default: PhysxCfg = PhysxCfg(...) # used when no override is given
358432
physx: PhysxCfg = PhysxCfg(...) # selected by presets=physx
359-
newton: NewtonCfg = NewtonCfg(...) # selected by presets=newton
433+
newton_mjwarp: NewtonCfg = NewtonCfg(...) # selected by presets=newton_mjwarp
360434
361435
Selecting a preset at launch
362436
-----------------------------
363437

364-
Pass ``presets=newton`` (or ``presets=physx``) on the CLI to swap the entire config section:
438+
Pass ``presets=newton_mjwarp`` (or ``presets=physx``) on the CLI to swap the entire config section:
365439

366440
.. code-block:: bash
367441
368442
# Run with Newton backend
369-
python train.py task=Isaac-Franka-Cabinet-v0 presets=newton
443+
python train.py task=Isaac-Franka-Cabinet-v0 presets=newton_mjwarp
370444
371445
# Run with default (PhysX) backend
372446
python train.py task=Isaac-Franka-Cabinet-v0
@@ -399,7 +473,7 @@ subclass that carries both a PhysX and a Newton variant.
399473
class ReachPhysicsCfg(PresetCfg):
400474
default: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2)
401475
physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2)
402-
newton: NewtonCfg = NewtonCfg(
476+
newton_mjwarp: NewtonCfg = NewtonCfg(
403477
solver_cfg=MJWarpSolverCfg(
404478
njmax=20, nconmax=20, ls_iterations=20,
405479
cone="pyramidal", ls_parallel=True,
@@ -471,7 +545,7 @@ We can provide a Newton-specific config such as:
471545
class EnvEventCfg(PresetCfg):
472546
default: EventCfg = EventCfg()
473547
physx: EventCfg = EventCfg()
474-
newton: _EnvNewtonEventCfg = _EnvNewtonEventCfg()
548+
newton_mjwarp: _EnvNewtonEventCfg = _EnvNewtonEventCfg()
475549
476550
Then change the ``events`` field in your env cfg from ``EventCfg`` to ``EnvEventCfg``:
477551

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,23 @@ Environments can support multiple backends simultaneously using the :doc:`preset
148148
class CartpolePhysicsCfg(PresetCfg):
149149
default: PhysxCfg = PhysxCfg()
150150
physx: PhysxCfg = PhysxCfg()
151-
newton: NewtonCfg = NewtonCfg(
151+
newton_mjwarp: NewtonCfg = NewtonCfg(
152152
solver_cfg=MJWarpSolverCfg(njmax=5, nconmax=3)
153153
)
154154
155155
@configclass
156156
class CartpoleEnvCfg(ManagerBasedRLEnvCfg):
157157
sim: SimulationCfg = SimulationCfg(physics=CartpolePhysicsCfg())
158158
159-
Users then select a backend at the command line:
159+
Users then select the MJWarp Newton preset at the command line:
160160

161161
.. code-block:: bash
162162
163163
# Default (PhysX)
164164
python train.py --task Isaac-Cartpole-v0
165165
166-
# Newton
167-
python train.py --task Isaac-Cartpole-v0 presets=newton
166+
# MJWarp (Newton backend)
167+
python train.py --task Isaac-Cartpole-v0 presets=newton_mjwarp
168168
169169
The Physics Manager
170170
-------------------

0 commit comments

Comments
 (0)