Friction Cone

Started by
11 comments, last by cristi-t 19 years, 8 months ago
Hi, I am trying to include static friction in my rigid body simulator, but I don't understand the friction cone approximation, I was hoping somebody could clear this up for me. I've seen that simulating static friciton implies considering a pyramid at each contact point. This pyramid has n facets, the more, the better the aproximation of the friction force. Then you would have n versors in the contact plane that make up the static friction force. What I don't understand is: why is this necessary? I already have a 3-axis system defined for each contact - a normal direction, and two ortogonal directions in the contact plane. Isn't this sufficient to determine the tangent friction force? Why do I need to express it in n versors when I can express it in 2? Is it because I don't know which directions to choose if I stick with 2 vectors? I know I'm missing something, here... Also, does this method work for static friction impulses? I use velocity constraints and I would hate to switch to acceleration constraints just to be able to use static friction. Thank you in advance, Cristian
Advertisement
the thing with the n-facets is to create a LINEAR approximation of the friction cone. the friction cone describes basicly nothing more than the ratio between normal force and tangential force. if this ratio is below a certain treshold, static friction holds. another way to say this is if the force vector falls within a certain cone, static friction holds. however, this isnt a linear problem, so it cant be solved using a matrix and all. hence the linear appoximation with a bunch of planes, which oobviously are linear.
I'm working on the same problem as you are but i'm trying to use the acceleration approach you mention. I'm still in the research
phase thus my answer may not be totally correct.

the cone is approximated as a polygon to formulate the problem as a linear programming problem. In this LP or is it linear complementary problem there is the constraint that the x's are larger than zero. when you use 2 vectors, this larger than zero constraint forces you to cover only one quadrant of the cone. therefore more points are needed.

if i recall correctly the work done by Brian Mirtich covers static and dynamic friction using an impulse based method. This method can handle stacking of particles. I still must find time to look into this method but the lcp method is sucking my time like a vacuum chamber gone bad.
Thanks for replying.

Eelco: The static friciton condition is norm(Ft) <= u*norm(Fn). Does this linearization have the purpose of avoiding the norm function, which contains squared coefficients?

Airo: yes, choosing more than 2 vectors makes sense now, thinking that the x-es must be positive. But what I still don't get is, why would you need more than 4 vectors? In this paper - [Sauer, Schomer, "A Constraint Based Apporach to Rigid Body Dynamics for Virtual Reality Applications"] they use a 12 vector system in the tangent plane for each contact point.

(1) Any vector in the tangent plane could be expressed completely by 4 orthonormal vectors and by coefficients >= 0. So what you would need is a 4-sided pyramid, meaning 4 vectors in the tangent plane, period. Why use more than 4?

(2) Le't say I have 4 vectors in the tangent plane and a normal. What are the unknowns for the contact force with static friction? Would I have 5 unknowns for each static contact (1 unknown for the normal component and 4 unknowns for the tangential component)?

Cristian
interesting paper, but way over my head.

i found the part where they talk about discretizing the cone. section 2.2.

There they say that the minimum direction vectors needed is 4 which makes sense.

edit: on reading it again after eelco's comment. the minimum the authors use is 4. it's not necessarily needed.

i think you use as much direction vectors as possible because of the nature of the solution you obtain from a lcp. The optimal solution is an unique extreme point or it is a weighted combination of extreme points.

when using only 4 direction vectors you could find a solution that is not the physically correct solution but is for instance one extreme point. while the phys. correct solution would require a linear cobination. By introducing more constraints you force the lcp to give the correct physical solution or a better approximation.

Do you understand this matrix formulation? I've only read baraffs papers. I can look up the references in this paper. Do you know good papers/books that explain this?

[Edited by - Airo on August 17, 2004 5:34:05 AM]
Quote:Original post by cristi-t
Thanks for replying.

Eelco: The static friciton condition is norm(Ft) <= u*norm(Fn). Does this linearization have the purpose of avoiding the norm function, which contains squared coefficients?

yes, thats one way to phrase it, but whatever way you write it, its not a linear function.

Quote:
Airo: yes, choosing more than 2 vectors makes sense now, thinking that the x-es must be positive. But what I still don't get is, why would you need more than 4 vectors? In this paper - [Sauer, Schomer, "A Constraint Based Apporach to Rigid Body Dynamics for Virtual Reality Applications"] they use a 12 vector system in the tangent plane for each contact point.

(1) Any vector in the tangent plane could be expressed completely by 4 orthonormal vectors and by coefficients >= 0. So what you would need is a 4-sided pyramid, meaning 4 vectors in the tangent plane, period. Why use more than 4?

(2) Le't say I have 4 vectors in the tangent plane and a normal. What are the unknowns for the contact force with static friction? Would I have 5 unknowns for each static contact (1 unknown for the normal component and 4 unknowns for the tangential component)?

Cristian

well 4 or 12 or 3 or 100: its just an arbitrary number.

the vectors define a plane by being the normal to this plane. this set of planes forms a linear approximation of the friction cone. the more planes, the better the approximation. 3 is the minimum, and id say 6 is a good balance between accuracy and speed.

so mathematicly the check to see if the forcevector lies within the friction cone is:

for all planes:
side = plane.normal * force;
if (side<0) for any plane, static friction violated (or>0 depending on your normals orientation)

or in matrix formulation it would be CONE * force < 0, with each row of the matrix force being a plane normal.
Correct me if I'm wrong, but you can test for the existence of friction fairly easily without advanced linear algebra.

Friction appears when N / T > a, where N and T are the lengths of N (normal force) and T (tangent force) and a is a coefficient of your choice.

If you have the coordinates of the N+T vector in the (normal,tangent1,tangent2) base of the plane, you can easily compute T2 and N2 from these coordinates.

The above equation then becomes:

T2 / N2 > a2

This check is a fairly easy one, so assuming you have the coordinates in the correct base, all it takes is a couple of multiplies and you can check if there is friction or not.
ToohrVyk: when you know the tangential and normal force in advance it's easy to calculate if there's sliding or not with the method you mention.

the purpose of the lcp is to actually determine the forces with the appropriate constraints on the forces built in.
Quote:Original post by AiroDo you understand this matrix formulation? I've only read baraffs papers. I can look up the references in this paper. Do you know good papers/books that explain this?


Airo: I haven't really spent time on that paper, but the A matrix seems easy to compute, since all the matrices that get multiplied are defined in the paper. I looked at each matrix they introduced at the beginning and all of them are easy to construct. Th only thing that confused me were the 12 tangent vectors... I still don't get the static friction formulation. Are you having trouble computing A?

I'd like to ask you all something about LCP:
If I have a correct formulation for Aij and Bi (including static friction) all I need is a classic LCP solver, right? I have implemented the LCP algorithm described by Baraff in "Baraff - Fast Contact Force Computation", but only the fricitonless part. Why does he need to modify the algorithm to include friction? The algorithm for solving the LCP shouldn't care about this, it only cares to output the unknowns under the LCP conditions. Shouldn't the algorithm be exactly the same with and without friciton (and only Aij, Bi change)?

Cristian
cristi-t: yeah i have trouble with calculating the Alk, for example what do the i and j subscripts mean? This double subscripting confuses me. Also I've got trouble implementing the lcp. I know some algebra but i know very little about implementing it on a computer. Do you know good referencs for that?

In free flight the inertia matrix gets transformed by R Ibody RT
IBody is i think defined when the rotation axis goes to through the center of mass. Do you have to change the Ibody when dealing with contact? There's definately a difference if you spin a rod through the center of mass or by one of it's ends (this happens in a contact i think).

This topic is closed to new replies.

Advertisement