Drake

The behavior of a simulation with contact will depend on three factors:
The three factors are interdependent; specific choices for one factor may require supporting changes in the other factors.
The determination of contact forces is a combination of perobject contact material parameters and global model parameters. See The Details of Computing Contact Forces for elaboration on the parameters.
Perobject Contact Material Parameters
E
, (with units of pascals, i.e., N/m²) is the tensile elasticity of the material. It may also be referred to generally as "elasticity" or colloquially as "stiffness".d
, (with units of 1/velocity) is a material property that correctly reproduces the empirically observed velocity dependence of the coefficient of restitution, where e = (1d⋅v)
for small impact velocity v
.d
can be measured right off the coefficient of restitutionvs.impact velocity curves; it is the negated slope at low impact velocities. In practice, the curve is difficult to produce and very little data exists to provide physical values.d
between 0.080.32 sec/m for steel, bronze or ivory. From this, we advocate relatively small values.μ_s
, (unitless) is the standard Coulomb coefficient of friction for a body with zero relative motion.μ_d
, (unitless) is the standard Coulomb coefficient of friction for a body with nonzero relative motion.Global Model Parameters
vₛ
, (with units of m/s) determines the behavior of contact bodies during stiction. Essentially, stiction is approximated. When bodies should be in stiction, the model allows the contacting points a relative slip velocity up to this value. See tangent_force for details.R
, (with units of m) defines a characteristic contact patch scale. See Drake Contact Implementation for details. This defines a circular contact patch with area πR²
.Contact Material Parameters
With the exception of the dissipation parameter, the values for material parameters should be predicated on realistic values. The majority of these values can and should be looked up in tables. The goal is for these physical quantities to remain meaningful and constant while the underlying contact model implementation improves and makes better use of them.
As for the dissipation parameter, we generally recommend leaving it at the default value unless there's particular insight and principle in changing it.
Picking a good value for vₛ
In selecting a value for vₛ
, you must ask yourself the question, "When two objects are ostensibly in stiction, how much slip am I willing to allow?" There are two opposing design issues in picking a value for vₛ
. On the one hand, small values of vₛ
make the problem numerically stiff during stiction, potentially increasing the integration cost. On the other hand, it should be picked to be appropriate for the scale of the problem. For example, a car simulation could allow a "large" value for vₛ
of 1 cm/s (1×10⁻² m/s), but reasonable stiction for grasping a 10 cm box might require limiting residual slip to 1×10⁻³ m/s or less. Ultimately, picking the largest viable value will allow your simulation to run faster.
Picking a good value for R
One of the quirks of the implemented contact model, is that is largely unaware of the size of the contact surface between bodies. However, the contact force depends on that area. This global setting allows you to hint to the model the size of the contact patches; larger contact patches produce larger contact forces. For example, a small toy tire on a table has a much smaller contact patch than fullsize tires on a road. Even if we assume the same rubber, the fullsize tires would experience a larger contact force (all other factors being equal). Rather than increasing the Young's modulus for the car's tires (as compared to the rubber ball), we recommend increasing the characteristic radius in the contact model. As a word of warning, don't think of this characteristic radius as corresponding to a literal measure of the real world. The default size corresponds closely with a point contact (where the contact is roughly the area of the head of a pin). This small contact area is sufficient for manipulation even though it does not reasonably represent the physical world. If the forces seem weak, increase the characteristic size, but only increase it to the smallest value that gives sufficient forces; making it larger will make the forces stiffer which will lead to a more computationally expensive simulation.
Empirical evidence suggests that any integrator except ExplicitEulerIntegrator can work with this contact model. Generally, the RungeKutta2Integrator and SemiExplicitEulerIntegrator require similar time steps to produce equivalent behavior. Generally, for a vₛ
value of 1e2 m/s, a timestep on the order of 1e4 is required for both of these. The errorcontrolled RungeKutta3Integrator will choose very small steps and accuracy must be set tight enough to ensure stability. There is also a firstorder, fullyimplicit integrator: ImplicitEulerIntegrator that can be considered for handling stiff systems.
The compliant point contact model only reports a single contact between bodies. More particularly, the contact is characterized by a single point. The point is associated with a characteristic area in the model (see above). This has two implications:
Sampled contact area
Increasing the area associated with the point will increase the magnitude of the contact force. An alternative solution is to increase the number of collision geometries associated with a body such that each point corresponds to a smaller portion of the body's surface area. This essentially changes the interpretation of the point to be closer in line with a smaller characteristic area.
This would have particular value if your simulation scenario has contacts of disparate scales. A single, global characteristic radius may be insufficient. By increasing the samples on large contact patches, those contact points will be compatible with the smaller characteristic area which works for the small contact patches.
Surfaceonsurface contacts
If the contact between bodies is better characterized as a surface instead of a point (such as one box lying on another), the contact point will
Both of these issues can be addressed by changing the geometry that represent the body's contact surface. For some shapes (e.g., boxes), we can introduce two sets of collision elements: discrete "points" at the corners, and a box capturing the volume (see block_for_pick_and_place.urdf
as an example). With this strategy, the contact "points" are actually smallradius spheres. The volumecapturing box should actually be inset from those spheres such that when the box is lying on a plane (such that the logical contact manifold would be a face), only the contact points make contact, providing reliable points of contact. However, for arbitrary configurations contact with the box will provide more general contact.
Next topic: The Details of Computing Contact Forces