Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Added
^^^^^

* Added OVPhysX presets for the Franka soft-body and cloth lift tasks, including their camera
variants.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -163,6 +165,7 @@ class DeformableCfg(PresetCfg):
),
)
isaacsim_physx = physx
ovphysx = physx

default = newton_mjwarp_vbd_proxy

Expand Down Expand Up @@ -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

Expand All @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -135,6 +136,7 @@ class DeformableCfg(PresetCfg):
),
)
isaacsim_physx = physx
ovphysx = physx

default = newton_mjwarp_vbd_proxy

Expand Down Expand Up @@ -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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Design Architecture — Auto physx preset keeps unsupported gravity terms

PhysxAutoCfg now also carries ovphysx (and likewise at line 97 in the cloth config), so selecting the generic physx preset can resolve to OVPhysX. The new events/curriculum presets map physx to the unmodified configs (lines 663, 672), leaving variable_gravity and the gravity curriculum active on a backend that this PR states has no runtime gravity setter. Map physx to the gravity-free variants, or key the workaround on the resolved backend.


default = newton_mjwarp_vbd_proxy

Expand Down Expand Up @@ -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

Expand All @@ -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


Expand Down Expand Up @@ -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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 PhysX auto-selection retains gravity

When a Kit-less training run selects the broad physx preset, PhysxAutoCfg chooses OVPhysX but this variant retains variable_gravity and the gravity curriculum, causing resets to invoke a runtime gravity setter that OVPhysX does not provide and abort training.

Knowledge Base Used: isaaclab_tasks: Task Registration and Organization

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(
Expand Down
Loading