p_WC vs p_WCa and p_WCb

Viewed 42

It makes sense that we have two contact points p_WCa and p_WCb, that come from PenetrationAsPointPair. The bottom right corner of the green body is p_WCb, and the top left of the blue body is p_WCa.

enter image description here

But what is p_WC, which comes from contact_results.point_pair_contact_info(cidx).contact_point()?

Which contact point is most appropriate for calculating the torque (using the body center of mass as the torque reference point), for purposes of static equilibrium calculation? I'm inclined to say F_AB_W should be associated with p_WCa.

2 Answers

Ultimately, to satisfy newton's laws, equal and opposite forces must be applied to both bodies, at the same point. Neither p_WCa and p_WCb is necessarily that point. They are what we call "witness" points. They are intimately related to the penetration depth and contact normal, but they aren't the contact point, per se. The displacement vector of the two points, in the contact normal direction is the penetration depth. However, we do use them to compute the contact point.

The contact point is essentially a linear interpolation of those points. Remember that the point contact model is a compliant model. It allows for small deformations of the body (relative to its volume and mass). But the two bodies don't necessarily deform the same amount. If one object, let's say object A, is much stiffer than object B, it deforms less and the effective contact point will be close to the stiff body's surface -- close to p_WCa. The interpolation factor is, in fact, a function of the two bodies' elasticity values. If they are equally compliant, it is the mid-point, etc.

So, at the end of the day, the geometric contact characterization produces contact normal, depth, and witness points. The contact solver produces forces and the point to apply the force, and that's what you see in the contact result's contact_point.

You can read more about it in Drake's documentation

As a foot-note: the effective (combined) elasticity is also what defines the magnitude of the normal force.

Following on Sean's excellent answer which may have been more than sufficient to answer the original question. The set of forces exerted on a body A by contact with a body B can be summed (added together) to create a net/resultant force. That resultant force is applied to a certain point Ap of (fixed to) body A. There is an equal/opposite force applied to a point Bp of (fixed to) body B. Although points Ap and Bp are at the same location (as Sean describes above), points Ap and Bp are not the same point. So there are two contact points, namely Ap (fixed to body A) and Bp (fixed to body B). They share a common location, but may have different velocities and/or accelerations.

Related