Phantom contact points using STL model

Discussion in 'Bug Reports' started by Alexander, Aug 24, 2017.

  1. I'm currently using the Modular Prosthetic Limb in conjugation with an STL model that can be seen in the image attached, and for some reason I'm getting "phantom" contact points that should not occur, as can also be seen in the image by the orange cylindrical caps. The hand cannot be forced down the gap of the model, MuJoCo appears to think there is something blocking the hand.

    Do you have any idea why this is occurring for the model?

    The XML file simply looks like this:

    <mujoco>
    <include file="MPL.xml"/>
    <include file="assets.xml"/>
    <asset>
    <mesh name="target" file="model.stl"/>
    </asset>

    <worldbody>
    <geom type="plane" material="MatPlane" pos=".6 0 0.1" zaxis="-1 0 1" size=".1 .5 .025"/>
    <geom type="plane" material="MatPlane" pos="-.6 0 0.1" zaxis="1 0 1" size=".1 .5 .025"/>
    <geom type="plane" material="MatPlane" pos="0 .6 0.1" zaxis="0 -1 1" size=".5 .1 .025"/>
    <geom type="plane" material="MatPlane" pos="0 -.6 0.1" zaxis="0 1 1" size=".5 .1 .025"/>
    <body name="target" pos="0.0 0.0 0.0" quat = "1 1 0 0">
    <geom type="mesh" mass="0.1" mesh="target"/>
    </body>
    </worldbody>
    </mujoco>

    bug_3.png
     

    Attached Files:

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Meshes are replaced with their convex hulls for collision detection. The contacts you are seeing are on the convex hull. If you want to do collisions with a non-convex mesh, you have to decompose it into a union of convex meshes (at least approximately) and then make each component mesh a separate geom, all attached to the same body.

    The HACD library can be used to decompose an arbitrary mesh into a union of convex meshes.