Skip to content

[Proposal] Remove Kit / omni.physx reliance from deformable spawning, schemas, and materials #6207

Description

@mmichelis

Proposal

When spawning deformable primitives, Isaac Lab authors the USD prim — geometry generation, schema application, and physics-material binding — through omni.physx (Kit) and PhysX-specific schemas, even when the selected physics backend is Newton. This proposal is to make the deformable spawn/schema/material path backend-agnostic and Kit-free, so a Newton deformable can be created without importing omni.physx or applying PhysX-only schemas.

Motivation

The Newton backend is meant to remove the hard dependency on Kit, but the deformables demo (scripts/demos/deformables.py) — and any Newton deformable spawn — still goes through omni.physx during USD creation. The PhysX-specific authoring is hardcoded in the base isaaclab package at backend-agnostic call sites, so backend selection doesn't actually change what gets imported or applied. Concretely:

1. Deformable geometry generation pulls from omni.physx

  • source/isaaclab/isaaclab/sim/spawners/meshes/meshes.py:291spawn_mesh_rectangle() (cloth) does from omni.physx.scripts import deformableUtils and calls deformableUtils.create_triangle_mesh_square() (:293) purely to build a triangle grid. A geometry helper is sourced from Kit/PhysX.

2. Deformable schema authoring is Kit/PhysX-bound — and unconditional

  • source/isaaclab/isaaclab/sim/schemas/schemas.py:1147define_deformable_body_properties() does from omni.physx.scripts import deformableUtils and calls deformableUtils.remove_deformable_body() (:1219) on every deformable spawn, surface or volume, regardless of backend.
  • It applies PhysX/OmniPhysics schema APIs unconditionally: OmniPhysicsSurfaceDeformableSimAPI (:1241), OmniPhysicsVolumeDeformableSimAPI (:1296), OmniPhysicsDeformablePoseAPI (:1341, :1350), OmniPhysicsDeformableBodyAPI (:1359), plus omniphysics:* rest-shape attributes. Newton then has to consume prims authored with these PhysX-oriented schemas.
  • source/isaaclab/isaaclab/sim/schemas/schemas.py:343modify_articulation_root_properties() imports omni.physx.scripts.utils and calls physx_utils.createJoint().

3. Physics materials are PhysX-specific

  • source/isaaclab_physx/isaaclab_physx/sim/spawners/materials/physics_materials_cfg.py — deformable material configs apply PhysX schemas: PhysxDeformableMaterialAPI (:76), PhysxSurfaceDeformableMaterialAPI (:103), with PhysX-only fields (elasticity_damping, bend_damping).
  • source/isaaclab_physx/isaaclab_physx/sim/schemas/schemas_cfg.pyPhysXDeformableBodyPropertiesCfg (PhysxBaseDeformableBodyAPI, :53) and PhysxDeformableCollisionPropertiesCfg (PhysxCollisionAPI, :143).
  • These are applied through the base spawner spawn_deformable_body_material() (source/isaaclab/isaaclab/sim/spawners/materials/physics_materials.py).

4. Backend-agnostic call site, backend-specific implementation

  • scripts/demos/deformables.py:4762 selects Newton- vs PhysX-specific config classes, but the underlying spawn path (define_deformable_body_properties()) still imports omni.physx and writes PhysX/OmniPhysics schemas. By contrast, isaaclab_newton's deformable config applies no USD schema (NewtonDeformableBodyPropertiesCfg, schemas_cfg.py:4458), confirming the authoring is one-sided.

Alternatives

  • Replace omni.physx.scripts.deformableUtils geometry helpers (e.g. create_triangle_mesh_square, remove_deformable_body) with Kit-free equivalents (NumPy/warp/trimesh, all already dependencies).
  • Move PhysX/OmniPhysics schema application out of the base isaaclab spawn path into the isaaclab_physx backend, and add a Newton-native authoring path in isaaclab_newton, dispatched by the active backend.
  • Keep the cross-backend OmniPhysics* schema as the neutral on-disk representation but author it without going through omni.physx (apply schemas via pxr/USD directly, or via a backend hook).

Build Info

  • Isaac Lab Version: develop (3.x)
  • Isaac Sim Version: 5.x / Newton backend

Additional context

All references are on the develop branch. Note there are no literal from omni.physx import PhysxSchema calls in this path — the Kit reliance comes through omni.physx.scripts (geometry + remove_deformable_body) and the PhysX/OmniPhysics ApplyAPI schema authoring in the base package.

Checklist

  • I have checked that there is no similar issue in the repo (required)

Acceptance Criteria

  • Spawning a Newton deformable (e.g. scripts/demos/deformables.py with the Newton backend) imports no omni.physx module.
  • Deformable geometry generation uses a Kit-free helper.
  • PhysX-specific schemas/materials are applied only when the PhysX backend is active; Newton uses a native authoring path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions