Hyoungseo Son

Part 5 · Contact & Constraints

The Friction Cone and Convex Contact Optimization

8 min read

Contact forces come in two parts: a normal force fn0f_n \ge 0 that pushes bodies apart, and a friction force ftf_t that resists sliding. Coulomb's law caps the second by the first. That cap has a geometry, and that geometry decides how hard the contact problem is to solve.

Friction is a cone

Coulomb's law says the tangential force cannot exceed the normal force scaled by the friction coefficient,

ftμfn.\lVert f_t \rVert \le \mu\, f_n .

In 3D the admissible force (ft,fn)(f_t, f_n) traces out a circular second-order (or quadratic) cone: a normal axis, and at each height fnf_n a disk of allowed tangential force with radius μfn\mu f_n.1 Normalize fn=1f_n = 1 and look straight down that axis: the limit is a circle of radius μ\mu. Inside the circle the contact sticks, and static friction supplies whatever force is needed. On the boundary it slides, and the force points against the motion at magnitude μfn\mu f_n.

A check with numbers. Take μ=0.5\mu = 0.5 and fn=10f_n = 10, so the admissible set is

ftμfn=0.5×10=5.\lVert f_t \rVert \le \mu f_n = 0.5 \times 10 = 5 .

Two applied tangential forces:

ft=(3,4):ft=32+42=25=5.0,f_t = (3, 4): \quad \lVert f_t \rVert = \sqrt{3^2 + 4^2} = \sqrt{25} = 5.0 ,

exactly on the boundary, the onset of sliding; and

ft=(2,1):ft=22+12=52.245,f_t = (2, 1): \quad \lVert f_t \rVert = \sqrt{2^2 + 1^2} = \sqrt{5} \approx 2.24 \le 5 ,

well inside, so the contact sticks.

The friction cone, seen down the normal axisinteractive

tangential-force plane (drag f_t)

μ
0.50
|f_t|
0.39
true cone
inside
N-gon
inside

Inside the cone: contact sticks (static friction holds).

With f_n = 1 the Coulomb limit is a circle of radius μ. Drag the tangential force f_t: green sticks, red slides. The inscribed polygon is the linearized cone a solver actually uses; near the edges it disagrees with the true circle.

Why the cone is inconvenient

The circle is nonlinear, so a contact model built on it is not a linear complementarity problem (LCP), and the fast pivoting machinery from the previous chapter no longer applies directly. There are two ways out.

Linearize the cone. Replace the circle with a regular polygon of NN facets, a pyramidal cone.1 Pick outward unit normals dk=(cosθk,sinθk)d_k = (\cos\theta_k, \sin\theta_k) with θk=2πk/N\theta_k = 2\pi k / N, and require one linear inequality per facet,

dkftμfn,k=1,,N,d_k \cdot f_t \le \mu f_n , \qquad k = 1, \dots, N ,

which folds the contact problem back into an LCP. Keep μ=0.5\mu = 0.5, fn=10f_n = 10 (so μfn=5\mu f_n = 5), and take the facet normal d=(0.6,0.8)d = (0.6, 0.8) aligned with ft=(3,4)f_t = (3, 4):

dft=0.6×3+0.8×4=1.8+3.2=5.0=μfn,d \cdot f_t = 0.6 \times 3 + 0.8 \times 4 = 1.8 + 3.2 = 5.0 = \mu f_n ,

exactly on that facet. Rotate the same ft=5\lVert f_t \rVert = 5 between two facet normals and it scores strictly below 55, so those directions are handed extra slack: friction now depends on direction, the anisotropy every linearization carries. (The demo inscribes the polygon instead, vertices on the circle, which errs the other way and denies some legal forces; either way the gap closes as NN grows.)

Keep the cone, make it convex. The exact limit is nonlinear but still convex, the second-order cone

K={(ft,fn):ftμfn},\mathcal{K} = \{\, (f_t, f_n) : \lVert f_t \rVert \le \mu f_n \,\} ,

so instead of forcing an LCP you can pose contact as a convex optimization over K\mathcal{K}. MuJoCo relaxes the strict LCP complementarity to obtain a convex model that is fast and always solvable.2 Drake's SAP solver goes further and eliminates the cone constraints analytically, turning the step into an unconstrained convex minimization.3

The trade

Linearization keeps the clean complementarity structure but bakes in a direction bias; convex cone formulations give up strict complementarity for a smooth problem with reliable convergence. That second bargain is why convex and cone-based contact dominate robotics-grade engines, where a step that always returns a sensible answer beats one that is exact but occasionally stalls.

How each of these is actually solved, from LCP pivoting to projected Gauss-Seidel to the convex programs above, is the subject of the solvers chapter.

Footnotes

  1. Bender, Erleben, Trinkle & Coumans, Interactive Simulation of Rigid Body Dynamics in Computer Graphics (Computer Graphics Forum 2014). 2

  2. MuJoCo docs, Computation.

  3. Castro, Permenter & Han, An Unconstrained Convex Formulation of Compliant Contact (2022).