Add surface deformable support and migrate deformable API to isaaclab_physx#5049
Open
mmichelis wants to merge 73 commits intoisaac-sim:developfrom
Open
Add surface deformable support and migrate deformable API to isaaclab_physx#5049mmichelis wants to merge 73 commits intoisaac-sim:developfrom
mmichelis wants to merge 73 commits intoisaac-sim:developfrom
Conversation
Contributor
Greptile SummaryThis PR migrates the deformable body subsystem to the updated Omni Physics v110 API, moving all PhysX-specific schemas, materials, and spawner configs from Key changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SpawnFn as spawn_mesh / spawn_from_usd
participant Schemas as isaaclab_physx.sim.schemas
participant deformableUtils as omni.physx.deformableUtils
participant MatSpawn as spawn_deformable_body_material
participant USD as USD Stage
participant InitImpl as DeformableObject._initialize_impl
participant PhysX as PhysX (DeformableBodyView)
User->>SpawnFn: spawn with DeformableBodyPropertiesCfg + DeformableBodyMaterialCfg
SpawnFn->>deformableUtils: create_auto_surface/volume_deformable_hierarchy(prim_path)
deformableUtils-->>USD: add OmniPhysicsDeformableBodyAPI + sim_mesh/tetmesh
SpawnFn->>Schemas: modify_deformable_body_properties(prim_path, cfg)
Schemas-->>USD: set omniphysics:*, physxDeformableBody:*, physxCollision:* attrs
SpawnFn->>MatSpawn: spawn_deformable_body_material(material_path, cfg)
MatSpawn-->>USD: apply PhysxDeformableMaterialAPI (+ PhysxSurfaceDeformableMaterialAPI if surface)
SpawnFn-->>USD: bind_physics_material(prim_path, material_path)
Note over InitImpl: sim.reset() triggers initialization
InitImpl->>USD: find prim with OmniPhysicsDeformableBodyAPI
InitImpl->>USD: get bound material → check PhysxSurfaceDeformableMaterialAPI
alt surface deformable
InitImpl->>PhysX: create_surface_deformable_body_view(expr)
else volume deformable
InitImpl->>PhysX: create_volume_deformable_body_view(expr)
InitImpl->>InitImpl: allocate nodal_kinematic_target buffer
end
InitImpl->>PhysX: create_deformable_material_view(material_expr)
Last reviewed commit: a270443 |
Author
|
@greptile |
5753430 to
fcc5678
Compare
Author
|
@greptile |
4 similar comments
Author
|
@greptile |
Author
|
@greptile |
Author
|
@greptile |
Author
|
@greptile |
…eg, change timestepping
… Schemata updated for DeformableBody and DeformableMaterial, but only for volume deformable. Surface deformable WIP.
… cannot be instantiated without physics material
56aefa7 to
9d22d62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update the deformable body implementation in the PhysX backend according to the new Omni Physics migration guide (v110.0). Main changes are:
isaaclabtoisaaclab_physx, since deformables are PhysX-specific.DeformableObjectto support both surface (cloth/triangle mesh) and volume (soft body/tetrahedral mesh) deformables via the new PhysXDeformableBodyViewAPI, replacing the deprecatedSoftBodyView.MeshSquareCfg/spawn_mesh_squarefor spawning 2D triangle mesh grids used as cloth.OmniPhysicsPropertiesCfg,PhysXDeformableBodyPropertiesCfg,PhysXCollisionPropertiesCfg) that route properties to the correct USD attribute prefixes (omniphysics:,physxDeformableBody:,physxCollision:).Fixes #4469 and addresses #2004.
Type of change
Migration guide
DeformableBodyPropertiesCfg→from isaaclab_physx.sim.schemas import DeformableBodyPropertiesCfgdefine_deformable_body_properties/modify_deformable_body_properties→from isaaclab_physx.sim.schemas import define_deformable_body_properties, modify_deformable_body_propertiesDeformableBodyMaterialCfg→from isaaclab_physx.sim.spawners.materials import DeformableBodyMaterialCfgDeformableObjectSpawnerCfg→from isaaclab_physx.sim.spawners.spawner_cfg import DeformableObjectSpawnerCfgDemos
./isaaclab.sh -p scripts/demos/deformables.py— verify mixed surface and volume deformables simulate correctly./isaaclab.sh -p scripts/tutorials/01_assets/run_deformable_object.py --visualizer kit— verify tutorial works for kinematically constrained volume deformables./isaaclab.sh -p -m pytest source/isaaclab_physx/test/assets/test_deformable_object.pyChecklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there