Cloth penetrates trough convex meshes. #2470
-
IntroHi! I am a PhD student at IRI, Barcelona, I use MuJoCo for my research on cloth manipulation. My setupMujoco 3.2.6 My questionI am trying to manipulate 2D deformable objects (cloth meshes and such) using a mocap attached to one of the vertices of the mesh. During the interaction of cloth with 3D geoms, the vertex attached to the mocap seems to penetrate through the geom when the mocap is moved through the rigid geom. Minimal model and/or code that explain my questionHere is the minimal code for reproducing the issue, this can be reproduced by moving the mocap from one side of the wall to the other side of the wall. Model: minimal XML<mujoco model="cloth_penetration">
<compiler angle="radian" />
<option timestep="5e-05" viscosity="0.3" integrator="implicitfast">
<flag energy="enable" />
</option>
<size memory="2000M" />
<asset>
<texture type="2d" name="texplane" builtin="checker" mark="cross" rgb1="0.2 0.3 0.4" rgb2="0.1 0.15 0.2" markrgb="0.8 0.8 0.8" width="512" height="512" />
<material name="matplane" texture="texplane" texuniform="true" reflectance="0.3" />
<material name="floor_mat" specular="0" rgba="0.2 0.2 0.2 1" />
</asset>
<worldbody>
<geom name="ground" size="0 0 1" type="plane" condim="1" material="matplane" />
<light pos="0 0 5" dir="0 0 -1" directional="true" castshadow="false" diffuse="0.4 0.4 0.4" specular="0.1 0.1 0.1" />
<light pos="0 0 4" dir="0 0 -1" directional="true" diffuse="0.6 0.6 0.6" specular="0.2 0.2 0.2" />
<light pos="1 1 3" dir="-0.301511 -0.301511 -0.904534" diffuse="0.8 0.8 0.8" />
<light pos="1 -1 3" dir="-0.301511 0.301511 -0.904534" diffuse="0.8 0.8 0.8" />
<light pos="-1 0 3" dir="0.316228 0 -0.948683" diffuse="0.8 0.8 0.8" />
<body name="mocap" pos="0.325 0.325 0.4" mocap="true">
<geom name="mocap0" size="0.005 0.005 0.005" type="box" contype="0" conaffinity="0" group="1" rgba="0 0 1 1" />
</body>
<body pos=".5 0.5 .5" euler="0 0 0">
<geom name="bigwall" type="box" size="0.5 0.1 0.5" rgba="0.5 0.5 0.5 1" />
</body>
<flexcomp type="grid" count="8 8 1" spacing="0.05 0.05 0.05" pos="0.5 0.15 .4" radius=".001" mass="0.5" name="plate" dim="2">
<contact condim="6" solref="0.01 1" solimp=".95 .99 .0001" />
<edge equality="false" damping="1.0" />
<elasticity young="3e5" thickness="1e-2" />
</flexcomp>
</worldbody>
<equality>
<weld body1="mocap" body2="plate_7" name="grasp0" solref="0.001 10" solimp="0.9 0.95 0.0001 0.1 6" />
</equality>
</mujoco>
Here is a video recording when trying to move the mocap behind the "wall". The vertex to which mocap is attached penetrates into the wall. Is this an expected behavior? If so is there a work around? Confirmations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Looks expected to me. You have two constraints fighting each other (the contact and the equality), why would you expect one of them to win over the other? |
Beta Was this translation helpful? Give feedback.
Looks expected to me. You have two constraints fighting each other (the contact and the equality), why would you expect one of them to win over the other?