From 4a2f3559897408ff7d4f447b64f4de450dcb46b5 Mon Sep 17 00:00:00 2001 From: Mike Yan Michelis Date: Thu, 13 Aug 2026 18:10:18 +0200 Subject: [PATCH 1/2] Add OVPhysX support to Franka deformable lift tasks --- ...chelis-franka-deformable-ovphysx.minor.rst | 5 ++ .../franka_soft/franka_cloth_env_cfg.py | 11 ++- .../config/franka_soft/franka_soft_env_cfg.py | 32 ++++++++- .../test_franka_deformable_ovphysx_cfg.py | 70 +++++++++++++++++++ 4 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 source/isaaclab_tasks/changelog.d/mmichelis-franka-deformable-ovphysx.minor.rst create mode 100644 source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py diff --git a/source/isaaclab_tasks/changelog.d/mmichelis-franka-deformable-ovphysx.minor.rst b/source/isaaclab_tasks/changelog.d/mmichelis-franka-deformable-ovphysx.minor.rst new file mode 100644 index 000000000000..ddf360d8c2bc --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/mmichelis-franka-deformable-ovphysx.minor.rst @@ -0,0 +1,5 @@ +Added +^^^^^ + +* Added OVPhysX presets for the Franka soft-body and cloth lift tasks, including their camera + variants. diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py index 42909ae56537..58a9de3353f2 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py @@ -10,6 +10,7 @@ from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg from isaaclab_newton.sim.schemas import NewtonDeformableBodyPropertiesCfg from isaaclab_newton.sim.spawners.materials import NewtonSurfaceDeformableBodyMaterialCfg +from isaaclab_ov.physics import OvPhysxCfg from isaaclab_physx.physics import PhysxCfg from isaaclab_physx.sim.schemas import PhysxCollisionCfg, PhysxDeformableBodyPropertiesCfg from isaaclab_physx.sim.spawners.materials import PhysxSurfaceDeformableBodyMaterialCfg @@ -91,8 +92,9 @@ class PhysicsCfg(PresetCfg): ) isaacsim_physx: PhysxCfg = PhysxCfg(gpu_found_lost_pairs_capacity=2**22) + ovphysx: OvPhysxCfg = OvPhysxCfg(gpu_found_lost_pairs_capacity=2**22) - physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) + physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) default = newton_mjwarp_vbd_proxy @@ -154,6 +156,7 @@ class DeformableCfg(PresetCfg): ), ) isaacsim_physx = physx + ovphysx = physx default = newton_mjwarp_vbd_proxy @@ -184,9 +187,10 @@ class FrankaClothScenePresetCfg(PresetCfg): num_envs=2048, env_spacing=2.0, replicate_physics=True ) - # PhysX does not support replicating physics for deformable objects + # Isaac Sim PhysX does not support replicating physics for deformable objects physx: FrankaClothSceneCfg = FrankaClothSceneCfg(num_envs=2048, env_spacing=2.0, replicate_physics=False) isaacsim_physx = physx + ovphysx: FrankaClothSceneCfg = FrankaClothSceneCfg(num_envs=2048, env_spacing=2.0, replicate_physics=True) default = newton_mjwarp_vbd_proxy @@ -207,6 +211,9 @@ class FrankaClothCameraScenePresetCfg(PresetCfg): ) physx: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg(num_envs=128, env_spacing=2.5, replicate_physics=False) isaacsim_physx = physx + ovphysx: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg( + num_envs=128, env_spacing=2.5, replicate_physics=True + ) default = newton_mjwarp_vbd_proxy diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py index d463a11435c5..50386be009e9 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_soft_env_cfg.py @@ -14,6 +14,7 @@ ) from isaaclab_newton.sim.schemas import NewtonDeformableBodyPropertiesCfg from isaaclab_newton.sim.spawners.materials import NewtonDeformableBodyMaterialCfg +from isaaclab_ov.physics import OvPhysxCfg from isaaclab_physx.physics import PhysxCfg from isaaclab_physx.sim.schemas import PhysxCollisionCfg, PhysxDeformableBodyPropertiesCfg from isaaclab_physx.sim.spawners.materials import PhysxDeformableBodyMaterialCfg @@ -52,7 +53,7 @@ VBDSolverCfg, ) -from isaaclab_tasks.utils import PresetCfg +from isaaclab_tasks.utils import PresetCfg, preset from isaaclab_tasks.utils.presets import MultiBackendRendererCfg from ... import mdp @@ -137,6 +138,7 @@ class DeformableCfg(PresetCfg): ), ) isaacsim_physx = physx + ovphysx = physx default = newton_mjwarp_vbd_proxy @@ -183,8 +185,9 @@ class PhysicsCfg(PresetCfg): ) isaacsim_physx: PhysxCfg = PhysxCfg() + ovphysx: OvPhysxCfg = OvPhysxCfg() - physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) + physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) default = newton_mjwarp_vbd_proxy @@ -598,9 +601,10 @@ class FrankaSoftSceneCfg(PresetCfg): num_envs=2048, env_spacing=2.0, replicate_physics=True ) - # PhysX does not support replicating physics for deformable objects + # Isaac Sim PhysX does not support replicating physics for deformable objects physx: _FrankaSoftSceneCfg = _FrankaSoftSceneCfg(num_envs=2048, env_spacing=2.0, replicate_physics=False) isaacsim_physx = physx + ovphysx: _FrankaSoftSceneCfg = _FrankaSoftSceneCfg(num_envs=2048, env_spacing=2.0, replicate_physics=True) default = newton_mjwarp_vbd_proxy @@ -614,6 +618,9 @@ class FrankaSoftCameraSceneCfg(PresetCfg): ) physx: _FrankaSoftCameraSceneCfg = _FrankaSoftCameraSceneCfg(num_envs=128, env_spacing=2.0, replicate_physics=False) isaacsim_physx = physx + ovphysx: _FrankaSoftCameraSceneCfg = _FrankaSoftCameraSceneCfg( + num_envs=128, env_spacing=2.0, replicate_physics=True + ) default = newton_mjwarp_vbd_proxy @@ -649,6 +656,25 @@ def __post_init__(self) -> None: self.sim.render_interval = self.decimation self.sim.physics = PhysicsCfg() + # OVPhysX does not expose a runtime gravity setter. + default_events = self.events + self.events = preset( + default=default_events, + physx=default_events, + isaacsim_physx=default_events, + newton_mjwarp_vbd_proxy=default_events, + ovphysx=default_events.replace(variable_gravity=None), + ) + if self.curriculum is not None: + default_curriculum = self.curriculum + self.curriculum = preset( + default=default_curriculum, + physx=default_curriculum, + isaacsim_physx=default_curriculum, + newton_mjwarp_vbd_proxy=default_curriculum, + ovphysx=default_curriculum.replace(gravity=None), + ) + self.viewer.eye = (0.75, 0.25, 0.65) self.viewer.lookat = (0.0, 0.75, 0.4) self.sim.default_visualizer_cfg = _FrankaSoftVisualizerCfg( diff --git a/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py b/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py new file mode 100644 index 000000000000..a91739dd0ce6 --- /dev/null +++ b/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py @@ -0,0 +1,70 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Regression tests for the Franka deformable OvPhysX presets.""" + +from isaaclab_ov.physics import OvPhysxCfg +from isaaclab_physx.sim.schemas import PhysxDeformableBodyPropertiesCfg +from isaaclab_physx.sim.spawners.materials import ( + PhysxDeformableBodyMaterialCfg, + PhysxSurfaceDeformableBodyMaterialCfg, +) + +from isaaclab_tasks.core.lift.config.franka_soft.franka_cloth_env_cfg import ( + FrankaClothCameraEnvCfg, + FrankaClothCameraScenePresetCfg, + FrankaClothEnvCfg, +) +from isaaclab_tasks.core.lift.config.franka_soft.franka_soft_env_cfg import ( + FrankaSoftCameraEnvCfg, + FrankaSoftCameraSceneCfg, + FrankaSoftEnvCfg, +) +from isaaclab_tasks.utils.hydra import resolve_presets + + +def test_soft_task_ovphysx_preset(): + cfg = resolve_presets(FrankaSoftEnvCfg(), ("ovphysx",)) + + assert isinstance(cfg.sim.physics, OvPhysxCfg) + assert cfg.scene.replicate_physics is True + assert isinstance(cfg.scene.deformable.spawn.deformable_props, PhysxDeformableBodyPropertiesCfg) + assert isinstance(cfg.scene.deformable.spawn.physics_material, PhysxDeformableBodyMaterialCfg) + assert cfg.events.variable_gravity is None + assert cfg.curriculum.gravity is None + + +def test_cloth_task_ovphysx_preset(): + cfg = resolve_presets(FrankaClothEnvCfg(), ("ovphysx",)) + + assert isinstance(cfg.sim.physics, OvPhysxCfg) + assert cfg.scene.replicate_physics is True + assert isinstance(cfg.scene.deformable.spawn.deformable_props, PhysxDeformableBodyPropertiesCfg) + assert isinstance(cfg.scene.deformable.spawn.physics_material, PhysxSurfaceDeformableBodyMaterialCfg) + assert cfg.events.variable_gravity is None + assert cfg.curriculum.gravity is None + + +def test_camera_tasks_have_explicit_ovphysx_presets(): + assert "ovphysx" in FrankaSoftCameraSceneCfg.__dataclass_fields__ + assert "ovphysx" in FrankaClothCameraScenePresetCfg.__dataclass_fields__ + + soft_cfg = resolve_presets(FrankaSoftCameraEnvCfg(), ("ovphysx",)) + cloth_cfg = resolve_presets(FrankaClothCameraEnvCfg(), ("ovphysx",)) + + assert isinstance(soft_cfg.sim.physics, OvPhysxCfg) + assert soft_cfg.scene.replicate_physics is True + assert isinstance(cloth_cfg.sim.physics, OvPhysxCfg) + assert cloth_cfg.scene.replicate_physics is True + + +def test_isaacsim_physx_preserves_gravity_curriculum(): + soft_cfg = resolve_presets(FrankaSoftEnvCfg(), ("isaacsim_physx",)) + cloth_cfg = resolve_presets(FrankaClothEnvCfg(), ("isaacsim_physx",)) + + assert soft_cfg.events.variable_gravity is not None + assert soft_cfg.curriculum.gravity is not None + assert cloth_cfg.events.variable_gravity is not None + assert cloth_cfg.curriculum.gravity is not None From 4fab654058eb4d03bd84525c52634dd17f1a1404 Mon Sep 17 00:00:00 2001 From: Mike Yan Michelis Date: Thu, 13 Aug 2026 18:15:29 +0200 Subject: [PATCH 2/2] Remove Franka deformable OVPhysX config tests --- .../test_franka_deformable_ovphysx_cfg.py | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py diff --git a/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py b/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py deleted file mode 100644 index a91739dd0ce6..000000000000 --- a/source/isaaclab_tasks/test/core/test_franka_deformable_ovphysx_cfg.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Regression tests for the Franka deformable OvPhysX presets.""" - -from isaaclab_ov.physics import OvPhysxCfg -from isaaclab_physx.sim.schemas import PhysxDeformableBodyPropertiesCfg -from isaaclab_physx.sim.spawners.materials import ( - PhysxDeformableBodyMaterialCfg, - PhysxSurfaceDeformableBodyMaterialCfg, -) - -from isaaclab_tasks.core.lift.config.franka_soft.franka_cloth_env_cfg import ( - FrankaClothCameraEnvCfg, - FrankaClothCameraScenePresetCfg, - FrankaClothEnvCfg, -) -from isaaclab_tasks.core.lift.config.franka_soft.franka_soft_env_cfg import ( - FrankaSoftCameraEnvCfg, - FrankaSoftCameraSceneCfg, - FrankaSoftEnvCfg, -) -from isaaclab_tasks.utils.hydra import resolve_presets - - -def test_soft_task_ovphysx_preset(): - cfg = resolve_presets(FrankaSoftEnvCfg(), ("ovphysx",)) - - assert isinstance(cfg.sim.physics, OvPhysxCfg) - assert cfg.scene.replicate_physics is True - assert isinstance(cfg.scene.deformable.spawn.deformable_props, PhysxDeformableBodyPropertiesCfg) - assert isinstance(cfg.scene.deformable.spawn.physics_material, PhysxDeformableBodyMaterialCfg) - assert cfg.events.variable_gravity is None - assert cfg.curriculum.gravity is None - - -def test_cloth_task_ovphysx_preset(): - cfg = resolve_presets(FrankaClothEnvCfg(), ("ovphysx",)) - - assert isinstance(cfg.sim.physics, OvPhysxCfg) - assert cfg.scene.replicate_physics is True - assert isinstance(cfg.scene.deformable.spawn.deformable_props, PhysxDeformableBodyPropertiesCfg) - assert isinstance(cfg.scene.deformable.spawn.physics_material, PhysxSurfaceDeformableBodyMaterialCfg) - assert cfg.events.variable_gravity is None - assert cfg.curriculum.gravity is None - - -def test_camera_tasks_have_explicit_ovphysx_presets(): - assert "ovphysx" in FrankaSoftCameraSceneCfg.__dataclass_fields__ - assert "ovphysx" in FrankaClothCameraScenePresetCfg.__dataclass_fields__ - - soft_cfg = resolve_presets(FrankaSoftCameraEnvCfg(), ("ovphysx",)) - cloth_cfg = resolve_presets(FrankaClothCameraEnvCfg(), ("ovphysx",)) - - assert isinstance(soft_cfg.sim.physics, OvPhysxCfg) - assert soft_cfg.scene.replicate_physics is True - assert isinstance(cloth_cfg.sim.physics, OvPhysxCfg) - assert cloth_cfg.scene.replicate_physics is True - - -def test_isaacsim_physx_preserves_gravity_curriculum(): - soft_cfg = resolve_presets(FrankaSoftEnvCfg(), ("isaacsim_physx",)) - cloth_cfg = resolve_presets(FrankaClothEnvCfg(), ("isaacsim_physx",)) - - assert soft_cfg.events.variable_gravity is not None - assert soft_cfg.curriculum.gravity is not None - assert cloth_cfg.events.variable_gravity is not None - assert cloth_cfg.curriculum.gravity is not None