Modeling contact in robotics can be challenging because it involves modelling the interactions between two or more objects that are in contact with each other.
There are several approaches that can be used to model contact in robotics, including the following:
- Contact models: These models simulate the continuous interaction between two objects that are in contact with each other. Contact models can be used to calculate the forces and moments exerted on the objects as a function of time and can be used to predict the dynamic behavior of the objects during contact.
- Impact models: These models simulate the collision between two objects as a single, instantaneous event. Impact models are useful for simulating high-speed collisions and can be used to calculate the forces and impulses exerted on the objects during the collision.
- Friction models: These models simulate the forces that arise due to the relative motion between two objects that are in contact with each other. Friction models can be used to predict the forces and moments exerted on the objects due to sliding or rolling friction.
- Deformation models: These models simulate the deformation of one or more objects due to contact forces. Deformation models can be used to predict the shape and behavior of the objects during contact and can be used to simulate soft materials such as rubber or foam.
- Hybrid models: These models combine elements of different types of contact models to simulate the complex interactions that can occur during contact. Hybrid models can be used to simulate a wide range of contact scenarios and can be tailored to the specific needs of a given application.
Contact Models
There exist two fundamentally different methods for contact models. The soft contact method models the interaction by force elements (i.e. spring-damper) where the force is only a function of the location and velocity of the point in contact. The hard contact method treats the contact as a kinematic constraint.
Soft Contact Model
For soft contact model we can identify the point when first making contact with the ground as . The ground to object interaction can the be modeled as a linear spring-damper where the contact force is calculated as follows:
While modeling the environment like this seems logic and physically correct from a first point of view, it turns out that finding physically correct spring and damping parameters to simulate the system dynamics is almost impossible (according to Zurich notes).
Hard Contact Model
Instead of modelling the contact forces as force elements (spring/damper), contacts can be modeled as kinematic constraints. If a point is in contact, it is assumed that is unable to move:
where is the geometric Jacobian.
From the constraint and the Lagrangian free floating equations of motion we can identify the contact force:
This is quite useful, as an estimate of the ground reaction force can be obtained without any contact force sensor.
Contact Consistent Dynamics
We can define the dynamically consistent support null-space matrix as:
defines the generalized space of motion where there are no acceleration or force coupling effects on the supporting links.
Substituting the solution for the contact force into the equations of motion results in:
Substituting the support constraint () yields the constraint consistent equations of motion can be compactly formulated as:
Impact Models
An impact model requires subdividing the analysis of the system dynamics into two intervals, before and after a change in the contact situation. There exists many methods to model the effect of the rapid dissipation in energy and large accelerations. Various coefficients can be used such as the coefficient of restitution and the impulse ratio, however, idealizing the contact event allows a derivation of an equation that computes an instantaneous change in velocity.
Method 1: Integration
To resolve the contact impulse, we integrate equation of motion over the infinitesimal time before and after impact, denoted and :
Lagrangian Form
Assuming a perfect inelastic collision with a Newtonian collision law, all contact points that are considered part of the collision instantaneously come to rest (. Combining this constraint with the integrated equation of motion, we can solve for the impulsive force as:
Looking closer, this equation is of the form impulse = mass x speed, thus we can label as the so called end-effector inertia.
Substituting this expression the impulse force back into the integral result yields the instantaneous change in generalized velocities:
Rearranging for yields an expression which includes the null-space projector :
This result that is obtained by satisfying the post impact contact constraint. This is intuitively clear, by using the support null-space projector , the pre-impact velocity is projected onto the support consistent manifold.
Hamiltonian Form
The constraint equation in Hamiltonian form is the following:
We now integrate the momentum dynamics over the infinitesimal interval and :
The magnitude of over the interval and can be neglected, leading to the following:
If we substitute back into the constraint equation we obtain:
Rearranging for :
If we substitute back into the integral result we obtain the momentum projection operator:
Method 2: Conservation of angular momentum
If an external force is applied at a point of interest, angular momentum about that point must be conserved. Conservation of angular momentum is a physical property of a spinning system such that its spin remains constant unless it is acted upon by an external torque. If a contact scenario only considers external forces, the angular momentum conservation approach to deriving the impact reset can be used.
Angular momentum can be calculated as follows:
where r is the position of the mass relative to a given reference point, m is the mass and v is the velocity of the particle. Since rigid bodies consist of point masses, the following equation can be used to calculate the angular momentum about the impact point, and solving for allows the computation of the post impact velocity.
Method 3: Momentum Transformation
A nonholonomic constraint is a constraint that is not holonomic . An important form of nonholonomic constraints are those that are expressed as a non-integrable, linear combination of generalized velocities of the form:
Mechanical systems with holonomic/nonholonomic constraints can be modeled as pH systems where the constraints appear as Lagrange multipliers, which are of the form:
In order to reduce the model to remove the Lagrange multiplier, we can perform a momentum transformation given by:
where and is chosen such that is invertible which implies is invertible.
Under this momentum transformation the system dynamics can be equivalently expressed as
where
Note, since is invertible the canonical momentum can be back-calculated from directly as follows:
Considering a situation where an impact is occurring, leading to a switch from constraint scenario A to constraint scenario B, such as a biped switching stance feet during a walking gait. To model both contact scenarios a reduced system with reduced momentum can be derived for the A and B contact scenarios. At the time the impact occurs, we compute the canonical momentum (momentum of the full floating base system) from using equation as follows:
where , is the mass matrix of the full floating model, is the A scenario contact jacobian and is the pre-impact reduced momentum for the A scenario contact consistent dynamics.
We now apply the momentum transformation to map into the B contact consistent dynamics as follows:
where , , the B scenario contact jacobian, and is the post-impact momentum for the B contact consistent dynamics.
Ultimately, the post impact momentum can be calculated as follows:
where ,, is the floating systems mass matrix and is the pre-impact momentum.
Energy loss
This instantaneous velocity change is always associated with a kinetic energy loss: