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 df3c65ae3423..78c26be7bc7b 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 @@ -16,6 +16,7 @@ ) 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 @@ -100,8 +101,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 @@ -163,6 +165,7 @@ class DeformableCfg(PresetCfg): ), ) isaacsim_physx = physx + ovphysx = physx default = newton_mjwarp_vbd_proxy @@ -201,9 +204,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 @@ -224,6 +228,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 6d9cb02ad7bf..e4c46dcdb701 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 @@ -16,6 +16,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 @@ -50,7 +51,7 @@ CouplerProxyMappingCfg, ) -from isaaclab_tasks.utils import PresetCfg +from isaaclab_tasks.utils import PresetCfg, preset from isaaclab_tasks.utils.presets import MultiBackendRendererCfg from ... import mdp @@ -135,6 +136,7 @@ class DeformableCfg(PresetCfg): ), ) isaacsim_physx = physx + ovphysx = physx default = newton_mjwarp_vbd_proxy @@ -185,8 +187,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 @@ -609,9 +612,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 @@ -625,6 +629,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 @@ -660,6 +667,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(