I have an impulse-based position constraint for contacts along the lines of this paper by Bender & Schmitt.
I'm reaching a case where the loop doesn't converge for the tangent (after being stable for about 20 seconds or 700 frames). The normal reaches target after about 4 iterations, but the tangent will only get so close before getting pushed further away. Continuing to run the loop, the normal will begin to oscillate over a negative and positive range, centered on zero, and the tangent will oscillate in some positive range but never reach the target.
In the paper, the tangent unit vector `t` is calculated by dropping the distance vector `d` between the contact points at the end of the timestep, onto the plane of the contact normal unit vector `n` at the end of the timestep: `t = normalize (d - n*dot(d,n))`. I noticed in Catto that he uses 2 tangent unit vectors, though that paper he is calculating a velocity constraint, not a position constraint. But with the tangent calculated above, the 2nd tangent given by `cross (n,t)` is going to have a distance of 0.0 so no impulse will be applied in that direction.
Possibilities:
1) calculate tangents based on relative velocities instead of distances
2) switch to a velocity constraints
3) add more points to the contact and solve pairs iteratively (currently it's only one pair of contact points)