Concave mesh loading

Hi there, I have an open-lid box .obj file that I’d like to move around in Isaac gym. However the hollow part collision is incorrect, the hollow part is not showing. Is there a way to fix this?

Like…I can’t find a built-in urdf loading method that does convex-decomposition… so does it mean I have to do the decomposition somewhere else and then use the convex mesh?

Hi hghg,

We should have automated convex decomposition in an upcoming release relatively soon (using the V-HACD library), but for now, yes, you will need to handle this yourself.

Sorry,
-Gav

I used V-HACD and created a new .obj file. I used PHYSX backend and the collision concavity of the box is still not showing…Is this supposed to be like this? Also FLEX backend works ok for my original .obj file but there are some problems in rendering.

Hi @hghg,

Can you share your assets and/or any source code with us?

Take care,
-Gav

drawer_vhacd.obj (3.0 KB)
ball_drop_on_drawer.py (4.1 KB)

I did vhacd on the drawer.obj. I run ball_drop_on_drawer.py with PHYSX backend, and the ball did not sink into the concave part of the drawer.

Hi @hghg,

Like Gav mentioned, we will support convex decomposition directly in Gym for the upcoming release. We also plan to support loading convex decompositions from a single OBJ, where the convexes are stored as submeshes. This should cover your use case.

In the meantime, the workaround is to split the submeshes in the single OBJ file into multiple OBJ files - one file per convex shape. You can then add multiple collision elements in the URDF. Take a look at assets/urdf/sektion_cabinet_model/urdf/sektion_cabinet_2.urdf as an example.

  <link name="drawer_top">
    <visual name="drawer_top_visual">
      <origin rpy="0  0  0" xyz="0  0  0"/>
      <geometry>
        <mesh filename="package://sektion_cabinet_model/meshes/drawer.obj" scale="1.0 1.0 1.0"/>
      </geometry>
      <material name="Front" />
    </visual>
    <collision name="drawer_top_collision0">
      <origin rpy="0  0  0" xyz="0  0  0"/>
      <geometry>
        <mesh filename="package://sektion_cabinet_model/meshes/drawer_convexdecomposition0.obj" scale="1.0 1.0 1.0"/>
      </geometry>
    </collision>
    <collision name="drawer_top_collision1">
      <origin rpy="0  0  0" xyz="0  0  0"/>
      <geometry>
        <mesh filename="package://sektion_cabinet_model/meshes/drawer_convexdecomposition1.obj" scale="1.0 1.0 1.0"/>
      </geometry>
    </collision>
    <collision name="drawer_top_collision2">
      <origin rpy="0  0  0" xyz="0  0  0"/>
      <geometry>
        <mesh filename="package://sektion_cabinet_model/meshes/drawer_convexdecomposition2.obj" scale="1.0 1.0 1.0"/>
      </geometry>
    </collision>
    ...
  </link>

Hi @lwawrzyniak Thanks for the idea. However, how would we do this for a general mesh obj which is built using the pointcloud? Such objects have 1000s of convexes. In this case adding each individual convex as a sub-collision mesh would be very time consuming. Is there a scalable approach?
Thanks.

Hi @ajayunagar, our Preview 2 release does support loading multiple convex shapes from OBJs. If you have an OBJ with multiple submeshes that you want to load as individual convexes, you’ll need to set this flag when loading the asset:

asset_options.convex_decomposition_from_submeshes = True

There’s a bit more info in the docs!