# Contact Constraints

When a robot interacts with its environment, it does so through contacts. These contacts can be **unilateral contacts**, or **bilateral contacts**. Simply put, unilateral contacts are those the robot can only push, e.g. foot contact with the floor, and bilateral contacts are those which allow the robot to push or pull, e.g. gripping the rung of a ladder.

Todo

add citations: Following the formulations in citep{Salini2011} and citep{Saab2013}

For unilateral contact constraints, a linearized approximation of the Coulomb friction cone is employed. A friction contact constraint in the controller must ensure that the linear velocity at the contact point is zero,

(1)

and that the wrench remains within a linearized approximation of a friction cone,

(2)

In (1), and contain the linear components of the contact Jacobian. In (2), is a matrix which linearly approximates the second-order norm cone,

(3)

where is are the force components of the contact wrench, is the normal vector of the contact, and is the friction coefficient. Finally, expressing these two constraints in terms of , and defining , gives the following coupled equality and inequality constraints,

(4)

(5)

where selects the contact force vector. Equations (4) and (5) are valid for a single contact point. For surface contacts, e.g. a foot sole, multiple points on the surface can be used for friction contact constraints — usually the four corners of the foot. Equation (4) introduces 3 equality constraints for the linear velocity of the contact point. The number of inequality constraints introduced by (5) depends on the number of polygon edges used to approximate the friction cone. Here, 6 edges are used, and because of symmetry, this introduces 3 inequality constraints per contact to the controller.

Important

To put these constraints into ORCA standard form we have,

For bilateral contacts, it is sufficient to ensure no relative motion between the two links, and in contact. It should be noted that here a link can be some part of the environment for which a kinematic model exists. To ensure no motion between the links, the following relationship must be true,

(6)

where , , , and , are the Jacobians and their derivatives for the textsuperscript{th} and textsuperscript{th} links respectively. Putting (6) in terms of produces,

(7)

Important

To put this constraint into ORCA standard form we have,