How to interprete urdf file to deformable object in Isaac Lab
I’m trying to use my own urdf file to create a deformable object in Isaac Lab.
My URDF file is defined as:
<?xml version="1.0" encoding="utf-8"?>
<robot name="box_0">
<link name="box_0">
<fem>
<origin rpy="0.0 0.0 0.0" xyz="0 0 0" />
<density value="100" />
<youngs value="1005"/>
<poissons value="0.3"/>
<damping value="0.0" />
<attachDistance value="0.0"/>
<tetmesh filename="../../meshes/multi_box_1kPa/box_0.tet"/>
<scale value="1.0"/>
</fem>
</link>
</robot>
I used convert_urdf.py --make-instanceable
to convert the urdf file to USD file.
I also tried convert_mesh.py --make-instanceable --collision-approximation convexDecomposition --mass 1.0
.
Then I initialize the deformable object by
deformable = DeformableObjectCfg(
prim_path="{ENV_REGEX_NS}/Deformable",
spawn=sim_utils.UsdFileCfg(
usd_path=box_usd,
),
init_state=DeformableObjectCfg.InitialStateCfg(pos=(0.0, 0.5, 1.0)),
)
The tutorial and demo provided in the documentation are all use MeshCfg
to generate deformable object, which can specify the deformable parameters inside
deformable_props=sim_utils.DeformableBodyPropertiesCfg(rest_offset=0.0, contact_offset=0.0),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.5, 0.1, 0.0)),
physics_material=sim_utils.DeformableBodyMaterialCfg(density=100, poissons_ratio=0.3, youngs_modulus=1005),
Thus I can not successfully create the deformable object
RuntimeError: Failed to find a deformable body when resolving '/World/envs/env_.*/Deformable'. Please ensure that the prim has 'PhysxSchema.PhysxDeformableBodyAPI' applied.
So what is the correct way to generate deformable objects using urdf/mesh file? Is my urdf file wrong?