Replies: 1 comment
-
Hi @Donatell4, for a cantilever beam I would use the cable plugin together with a composite body. If you look at the test https://github.com/google-deepmind/mujoco/blob/main/test/plugin/elasticity/elasticity_test.cc#L297, you can see that we compare the solution of a cantilever beam (taken from a paper as specified in the comment) vs our model and they are in good agreement. The cable model is essentially an Euler-Bernoulli beam for large deformations. Concerning why the results are bad with flex, coarse simulations in elasticity with p1 elements are notoriously poor, particularly for a slender body where there is a significant bending mode. |
Beta Was this translation helpful? Give feedback.
-
I have started using Mujoco recently. I am trying to simulate a cantilever beam deflection under a certain force.
I simulate a beam with a fixed end using a flexcomp object with pin elements at one side. Then, I provide the Young modulus using the elasticity plugin.
When I try to compare the real deflection of cantilever beam with the deflection recorded in Mujoco, they do not match. There is quite some difference.
I have a beam of 0.45m length, 0.05m height and width, with a Young modulus E=1e6. I apply gravity (9.81) and I would expect a deformation of 2.15 m. However, after 1.5s simulation the deformation settled around 0.26m.
<mujoco> <compiler angle="degree" /> <option gravity="0 0 -9.81" timestep="0.0001" solver="Newton" tolerance="1e-6"> <flag sensor="enable" contact="enable" multiccd ="enable"/> </option> <extension> <plugin plugin="mujoco.elasticity.solid"/> </extension> <visual> <map force = "0.5"/> <rgba contactforce="0.5 0.5 0 1" contactpoint="0 .6 .2 1" force=".1 .1 .1 1" /> </visual> <worldbody> <light pos="1 0 .3" dir="-1 0 -.3"/> <light pos="-1 0 .3" dir="1 0 -.3"/> <body name="flexy" pos="0 0 0"> <flexcomp name="beamFlex" pos="0 0 0" type="grid" count="10 2 2" spacing=".05 .05 .05" radius=".0" dim="3" mass="10" rgba="0 1 0 1" rigid="false" > <contact condim="3" selfcollide="none" activelayers="1"/> <pin id="0 1 2 3"/> <edge damping="3000" equality="true"/> <plugin plugin="mujoco.elasticity.solid"> <config key="young" value="5e9"/> </plugin> </flexcomp> </body> </worldbody> </mujoco>
My questions are the following:
• Did I do anything wrong while setting the Mujoco model?
• To which extent can I use the elasticity plugin to simulate realistic (i.e. when the cantilever beam deformation matches the reference value) object?
• Can I improve the speed of the simulation time somehow? The stiffer the flexcomp is (the higher the young modulus) the slower my simulation is. It takes 4 minutes to run 1.5s simulation using a Newton solver with a 0.0001 timestep and 1e-6 tolerance.
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions