Skip to content
2 changes: 1 addition & 1 deletion source/isaaclab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.47.11"
version = "0.49.0"

# Description
title = "Isaac Lab framework for Robot Learning"
Expand Down
14 changes: 14 additions & 0 deletions source/isaaclab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Changelog
---------

0.49.0 (2025-11-07)
~~~~~~~~~~~~~~~~~~~

Added
^^^^^

* Added new PhysX configuration parameter to :class:`~isaaclab.sim.PhysxCfg`:

- :attr:`~isaaclab.sim.PhysxCfg.disable_sleeping`: Disables sleeping for all objects in the physics scene on a global level.
This flag is set to ``True`` by default and overrides any sleeping settings on individual bodies. If sleeping is required
on any individual body, this flag must be set to ``False``. Note that if ``disable_sleeping`` is set to ``False`` and the
directGPU pipeline is enabled, PhysX will issue an error and fail scene creation.


0.47.11 (2025-11-03)
~~~~~~~~~~~~~~~~~~~~

Expand Down
12 changes: 12 additions & 0 deletions source/isaaclab/isaaclab/sim/simulation_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,18 @@ class PhysxCfg:

"""

disable_sleeping: bool = True
"""Disable sleeping for all objects in the physics scene on a global level. Default is True.

This flag disables sleeping for all objects in the scene, overriding any sleeping settings on individual bodies.
If sleeping is required on any individual body, this flag must be set to False.

.. warning::

If :attr:`disable_sleeping` is set to False and the GPU pipeline is enabled, PhysX will issue an error
message and fail scene creation as this is not supported.
"""


@configclass
class RenderCfg:
Expand Down
10 changes: 10 additions & 0 deletions source/isaaclab/isaaclab/sim/simulation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,16 @@ def _set_additional_physx_params(self):
physx_prim.CreateAttribute("physxScene:solveArticulationContactLast", Sdf.ValueTypeNames.Bool).Set(
self.cfg.physx.solve_articulation_contact_last
)
# Check if disable_sleeping is False with GPU pipeline enabled
if not self.cfg.physx.disable_sleeping:
# Check if GPU pipeline is enabled via the suppressReadback flag
suppress_readback = self.carb_settings.get_as_bool("/physics/suppressReadback")
if suppress_readback:
raise RuntimeError(
"PhysX configuration error: 'disable_sleeping' is set to False while GPU pipeline is enabled "
"(/physics/suppressReadback=True). This combination will cause PhysX to fail scene creation. "
"Please set 'cfg.physx.disable_sleeping = True' or disable GPU pipeline."
)

# -- Gravity
# note: Isaac sim only takes the "up-axis" as the gravity direction. But physics allows any direction so we
Expand Down
54 changes: 54 additions & 0 deletions source/isaaclab/test/sim/test_simulation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,57 @@ def test_zero_gravity():
gravity_dir, gravity_mag = sim.get_physics_context().get_gravity()
gravity = np.array(gravity_dir) * gravity_mag
np.testing.assert_almost_equal(gravity, cfg.gravity)


@pytest.mark.isaacsim_ci
def test_disable_sleeping_setting():
"""Test that the disable_sleeping PhysX setting is applied correctly."""

# Test with disable_sleeping set to True (default)
cfg = SimulationCfg()
assert cfg.physx.disable_sleeping is True

sim = SimulationContext(cfg)

# Get the physics scene prim and check the attribute
stage = sim.stage
physics_scene_prim = stage.GetPrimAtPath(cfg.physics_prim_path)
assert physics_scene_prim.IsValid()

# Check that the attribute exists and is set to True
disable_sleeping_attr = physics_scene_prim.GetAttribute("physxSceneAPI:disableSleeping")
assert disable_sleeping_attr.IsValid()
assert disable_sleeping_attr.Get() is True


@pytest.mark.isaacsim_ci
def test_disable_sleeping_false_with_cpu():
"""Test that disable_sleeping can be set to False when using CPU simulation."""

# Test with disable_sleeping set to False and CPU device
cfg = SimulationCfg(device="cpu")
cfg.physx.disable_sleeping = False

sim = SimulationContext(cfg)

# Get the physics scene prim and check the attribute
stage = sim.stage
physics_scene_prim = stage.GetPrimAtPath(cfg.physics_prim_path)
assert physics_scene_prim.IsValid()

# Check that the attribute exists and is set to False
disable_sleeping_attr = physics_scene_prim.GetAttribute("physxSceneAPI:disableSleeping")
assert disable_sleeping_attr.IsValid()
assert disable_sleeping_attr.Get() is False


@pytest.mark.isaacsim_ci
def test_disable_sleeping_false_with_gpu_raises_error():
"""Test that disable_sleeping=False with GPU simulation raises an error."""
# Test with disable_sleeping set to False and GPU device
cfg = SimulationCfg(device="cuda:0")
cfg.physx.disable_sleeping = False

# This should raise a RuntimeError because GPU pipeline + disable_sleeping=False is not supported
with pytest.raises(RuntimeError, match="disable_sleeping.*GPU pipeline"):
SimulationContext(cfg)