mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

How to Preserve Initial Shape of a Flexible Body in MuJoCo Simulation?

Open gleitn96 opened this issue 1 year ago • 4 comments

Hi,

I'm a phd student and I'm trying to use MuJoCo for simulating a consignment with flexible packaging and rigid content.

I'm looking for some help with preserving the initial shape of a flexible body in my simulation.

My problem is that the flexible Packaging will not preserve its initial state and instead blows up like a balloon as shown in the attached picture. Is there a possibility to preserve the shape of the body until there is an outer force acting upon it, similar to how it's done in FEM?

image

Here is the XML for my issue:

<mesh name="Content" file="Content.stl" />
<material name="Content_material" rgba="0.8 0.6 0.4 1" />
<!-- Packaging -->
<flexcomp name="Packaging" type="mesh" radius="0.0002" dim="2" pos="0 0 0.2"
  file="Packaging.obj" scale="0.001 0.001 0.001" mass="0.01">
  <contact selfcollide="none" internal="false"/>
  <edge equality="false" damping="0.01" />
  <plugin plugin="mujoco.elasticity.shell">
    <config key="poisson" value="0.1" />
    <config key="thickness" value="0.001" />
    <config key="young" value="100e6" />       
  </plugin>
</flexcomp>

<!-- Content -->
<body name="Content" pos="0 0.01 0.138" >
  <geom type="mesh" mesh="Content" material="Content_material" condim="3" mass="0.2" />
  <joint type="free" damping="1" />
</body>

<!-- Lights -->
<light directional="true" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"
  castshadow="false" />
<light directional="false" diffuse=".8 .8 .8" specular="0.3 0.3 0.3" pos="0 0 4" dir="0 0 -1" />

The full XML, the Packaging.obj, and Content.stl are in the attached .zip file.

Thank you for your help!

Consignment.zip

gleitn96 avatar Jun 21 '24 07:06 gleitn96

may you can try to chage the radius="0.0001"

tina0425 avatar Jul 18 '24 03:07 tina0425

@gleitn96 is this solved?

quagla avatar Jul 31 '24 11:07 quagla

@quagla No, changing the radius hasn't resolved the issue. Despite this adjustment, the flexible packaging still fails to preserve its initial shape and expands like a balloon.

gleitn96 avatar Jul 31 '24 11:07 gleitn96

@quagla could you please give us your opinion on this? I am having the same issue. thanks.

mxhrnxz avatar Jun 17 '25 11:06 mxhrnxz