Drake
Contact Modeling in Drake

Detailed Description

Drake is concerned with the simulation of physical phenomena, including contact between simulated objects.

Drake approximates real-world physical contact phenomena with a combination of geometric techniques and response models. Here we discuss the parameterization and idiosyncracies of a particular contact response model, based on point contact, non-penetration imposed with a penalty force, and a continuous model of friction approximating Coulomb stiction and sliding friction effects. This document gives an overview of the state of the implementation of contact in Drake (as of Q2 2019) with particular emphasis on how to account for its particular quirks in a well-principled manner. What works in one simulation scenario, may not work equally well in another scenario. This discussion will encompass:

Mechanics of Solids

All objects in real life are compliant and deform under the action of external loads. Deformations, as well as motion, of real life solids are well described by the theory of continuum mechanics, which provides a complete description of the full three-dimensional state of stress and deformation given a set of external loads and boundary conditions. Broadly, how compliant a solid is depends on the material (or materials) it is made of. Factors such as microstructure, imperfections, anisotropy, etc. affect the behavior of a material. Ultimately, in continuum mechanics, the behavior of a particular material can be boiled down to its stress-strain curve, or constitutive law describing the stress/strain relationship at each point within a solid composed of that material. The simplest constitutive law is that of Hooke's law, describing the behaviour of materials which exhibit a linear-elastic region in the stress-strain curve. Materials such as steel and aluminum can be modeled as Hookean, as long as strain is within the elastic range (< 1% strain for steel for example). Other materials such as rubber are hyperelastic and are best described by a Neo-Hookean law. The stiffness of a material essentially refers to how steep this stress-strain curve is. The steeper the slope of the stress-strain curve, the stiffer a material is. For Hookean materials, this translates to a larger Young's modulus (the slope of the stress-strain curve in the linear regime).

Contact Mechanics

Contact mechanics refers to the study of the deformations that solids undergo as the result of contact loads. The study of contact mechanics dates back to the pioneering work of Heinrich Hertz in 1882. The Hertzian theory of contact describes the loads and deformations when strains are small, the contacting surfaces are much smaller than the overall dimensions of the contacting bodies and the materials are linear (i.e. are described by the Hookean law).

In general, when two solids come into contact, they inevitably must undergo deformation in order to avoid the physical impossibility of interpenetration. This constraint is described by the Signorini boundary condition, which at each point in the contact surface imposes a complementarit constraint between normal stress and penetration (described by a gap function). Stresses on the contact surface are the result of these deformations.

Ultimately, contact forces are the result of integrating these contact stresses on the contact surface between the solids.

Rigid Approximation to Contact

A rigid body is an approximation to the general mechanics of solids in the mathematical limit to infinite stiffness. This mathematical approximation has been used extensively in the past for the simulation of multibody systems with contact. As an approximation to the real physical system, it leads to known problems such as indeterminate systems. Consider for instance a rigid beam supported by its two end points and by a third point of support right in the middle, through its center of gravity. Under the action of its own weight, infinite solutions to the static problem exist.

Rigid contact with Coulomb friction is a common approximation used in simulation as well. It has its own limitations, most notable the possible non-existence of a solution. An example of this is the well known Painlevé paradox, a one degree of freedom system with contact that, depending on the state, has an infinite number of solutions or even no solution.

It should be noted that these artifacts are a consequence of the mathematical approximations adopted and not a flaw of the original continuum mechanics theory and even much less, a flaw in the physics itself.

Point Contact

In the limit to rigid contact, often the region of contact, or contact surface, shrinks to a single point. Notable exceptions are planar boundaries coming into contact (box on a plane for instance) and rigid bodies with conforming boundaries. Even in those cases it is common to model the surface contact by selecting a few points on the surface and generating contact forces only at those points.

Numerical Approximation of Point Contact

Contact determination in the limit to rigid is not feasible with floating point arithmetic given that rigid bodies either lie exactly on top of each other or are not in contact. In order for a practical implementation to detect contact the bodies must be in an overlapping configuration, even if by a negligible small amount, see Figure 1.

In a point contact model two bodies A and B are considered to be in contact if the geometrical intersection of their original rigid geometries is non-empty. That is, there exists a non-empty overlap volume. In a point contact model, this overlap region is simply characterized by a pair of witness points Aw and Bw on bodies A and B, respectively, such that Aw is a point on the surface of A that lies the farthest from the surface of B. Similarly for point Bw. In the limit to rigid, bodies do not interpenetrate, the intersection volume shrinks to zero and in this limit witness points Aw and Bw coincide with each other.

Enforcing Non-Penetration with Penalty Forces

In Drake we enforce the non-penetration constraint for rigid contact using a penalty force. This penalty force introduces a "numerical" compliance such that, within this approximation, rigid bodies are allowed to overlap with a non-empty intersection. The strength of the penalty can be adjusted so that, in the limit to a very stiff penalty force we recover rigid contact. In this limit, for which Aw ≡ Bw, a contact point Co is defined as Co ≜ Aw (≡ Bw). In practice, with a finite numerical stiffness of the penalty force, we define Co = 1/2⋅(Aw + Bw). Notice that the 1/2 factor is arbitrary and it's chosen for symmetry. We define the normal as pointing outward from the surface of B towards the interior of A. That is, if we denote with d the (positive) penetration depth, we have that Bw = d⋅n̂ + Aw. We define a contact frame C with origin at Co. The C frame's z-axis is aligned along the normal n̂ (with arbitrary x- and y-axes). Because the two forces are equal and opposite, we limit our discussion to the force f acting on A at Co (such that -f acts on B at Co).

simple_contact.png
Figure 1: Illustration of contact between two spheres.

The computation of the contact force is most naturally discussed in the contact frame C (shown in Figure 1). The contact force, f, can be decomposed into two components: normal, fₙ, and tangential, fₜ such that f=fₙ+fₜ. The normal force lies in the direction of the contact frame's z-axis. The tangential component lies parallel to the contact frame's x-y plane. In Drake's contact model, the tangential force is a function of the normal force. The detailed discussion of the contact force computation is decomposed into two parts: a high-level engineering discussion addressed to end users who care most about working with the model and a further detailed discussion of the mathematical underpinnings of the implemented model. The practical guide should be sufficient for most users.

Next topic: Detecting Contact

Modules

 Detecting Contact
 Given two posed geometric shapes in a common frame, the collision detection system is responsible for determining if those shapes are penetrating and characterizing that penetration.
 
 Working with Contacts in Drake
 The behavior of a simulation with contact will depend on three factors:
 
 Continuous Approximation of Coulomb
 FrictionStatic friction (or stiction) arises due to surface characteristics at the microscopic level (e.g., mechanical interference of surface imperfections, electrostatic, and/or Van der Waals forces).