Contact forces of a deformable object #2641
-
IntroHi! I am a robotics researcher. I use MuJoCo for my research on deformable object manipulation. My setupMuJoCo version 3.3.0 My questionI want to calculate the contact forces between a rigid ball and a deformable object, created with Minimal model and/or code that explain my questionThis is the model: <mujoco>
<option gravity="0 0 -9.81"/>
<worldbody>
<!-- light -->
<light name="the_cam" pos="0 0 2" mode="fixed"/>
<!-- Plane -->
<geom name="plane" type="plane" pos="0 0 0" size="2 2 0.1" rgba="0.5 0.5 0.5 1"/>
<!-- deformable object -->
<body name="box" pos="0 0 0.1">
<inertial pos="0 0 0.1" mass="0.5" diaginertia="0.01 0.01 0.01"/>
<flexcomp name="box" type="box" dim="3" count="5 5 2" spacing="0.1 0.1 0.05" radius="0.001" rgba="1 0 1 0.5">
<elasticity young="3e3" poisson="0.2" damping="1e-3"/>
<contact condim="6" solref="0.02 1" solimp="0.9 0.95 0.001 0.5 2" selfcollide="none" activelayers="1"/>
</flexcomp>
</body>
<!-- rigid object -->
<body name= "ball" pos="0 0 0.3" >
<freejoint/>
<geom name="ball" type="sphere" size="0.1" mass="0.1" rgba="0 1 0 0.5"/>
</body>
</worldbody>
</mujoco> Confirmations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, mjContact has a |
Beta Was this translation helpful? Give feedback.
Hi, mjContact has a
flex
attribute, see https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjdata.h#L120 is this what you are looking for?