Dynamically Create Attachments at Runtime

Isaac Sim Version

4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Operating System

Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):

GPU Information

  • Model: RTX 3090
  • Driver Version: 535.183.01

Topic Description

Detailed Description

I am currently attempting to collect data on deformable object manipulations. However, grasping deformable objects does not seem robust enough yet for this type of data collection (How to grasp deformable object?). Instead of grasping I would like to create an attachment between the robot and deformable body at runtime so random manipulation points can be used. When I attempt to create the attachment though, the points do not seem to populate, and I receive the error message shown below. Is there a way to dynamically create these attachments at runtime or must they be predefined before starting the simulation? Here is the code I am currently using to generate the attachments:

def create_attachment(self):
        world = World.instance()
        current_stage = world.scene.stage
        attachment_path = self.cube.cube_mesh.GetPath().AppendElementString("attachment")
        attachment = PhysxSchema.PhysxPhysicsAttachment.Define(current_stage, attachment_path)
        attachment.GetActor0Rel().SetTargets([self.cube.cube_mesh.GetPath()])
        gripper_mesh_path = self.robot_path + "/psm_tool_gripper2_link/collisions"
        attachment.GetActor1Rel().SetTargets([gripper_mesh_path])
        PhysxSchema.PhysxAutoAttachmentAPI.Apply(attachment.GetPrim())

Error Messages

[Error] [omni.physx.plugin] PhysX error: PxDeformableElementFilter: No support for deformable group element count of 0 when filtering against a rigid body, FILE /builds/omniverse/physics/physx/source/physx/src/NpDeformableElementFilter.cpp, LINE 137

Screenshots or Videos

This is what the attachment looks like after being created by the function above.

Additional Information

Related Issues

I believe this may be related to an earlier post I made for Isaac Sim 4.2 in which the meshes of deformable objects do not appear to update correctly in python standalone applications: Discrepancy Between Deformable and Visual Meshes in Python Standalone Application