Glossary · Physics simulation

Soft contact

Also called compliance, contact model, penetration, solref, solimp

Modelling contacts as slightly springy, so surfaces can sink into each other a little. Used both for stability and to model soft things like skin and foam.

When two objects touch, the simulator must stop them passing through each other. A hard contact forbids any overlap. That’s realistic for steel, but numerically harsh: forces spike in a single step, and objects can chatter.

A soft contact lets the surfaces overlap a little, a penetration depth dd, and pushes back like a spring with a damper:

F=k d+b d˙F = k\,d + b\,\dot{d}

The stiffness kk sets how far it sinks under a load; the damping bb stops it bouncing. Compliance is the opposite of stiffness: a compliant surface gives more.

In MuJoCo

MuJoCo treats every contact as a soft constraint. Two parameters per material set its behaviour:

  • solref sets how fast a penetration is pushed out (a time constant) and how much it’s damped.
  • solimp sets how strongly the constraint resists, which can grow with depth.

Tuning these makes a surface feel like rubber, foam, flesh or bone.

Why softness helps

Softer contacts spread forces over several steps, which avoids spikes and chatter. For a standing body this matters. On a rigid floor, feet may rapidly touch and lose contact, and a learning policy chases that noise. A slightly compliant floor settles the feet.

In this project

  • The gym mat. The coach’s idea: a floor with foam-like compliance, where the feet sink about 9 mm. The unchanged stance policy dropped from 1.7 to 0.15 direction reversals per joint per second, 11× less jitter, because the feet stopped chattering.
  • Three body materials on the muscular body: soft muscle (about 8 mm of sink at 50 N and 14 mm at 400 N under a palm-sized probe), hard bone (under 1 mm), and grippy hands.

Related terms

Used in

← All terms