How is negative contact (penetration) handled?

Discussion in 'Simulation' started by Wei Ding, Feb 26, 2019.

  1. My simulation contains a robot and ground.
    Most of the time I set the initial condition of the robot to be little bit higher to guarantee no penetration.

    I was wonder what will happen if there's penetration in initial condition? I haven't seen any faults and simulation continues, but I'm very concerned Mujoco does something different. What if the penetration comes from numerical errors like 1e-6, which in reality means it's tangental to ground?

    Thank you very much
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The documentation explains how contact forces are computed. There is no simple answer. The simulator has to solve an optimization problem numerically at each time step. MuJoCo contacts are soft, so penetrations will not cause big problems (at least not as big as with simulators using hard contacts).