[ODE] Values required to produce at least semi-realistic frictionusing the default constant-force-limit model?

Ed Jones ed.jones at oracle.com
Mon Mar 15 17:35:43 MST 2004


That code [ApplyLinearVelocityDrag] is for simulating aerodynamic drag 
isn't it? You can do something similar to simulate rolling friction too, 
since ODE doesn't implement either of these.

It should, though, implement sliding friction and I can't say I've had a 
problem getting decent results with my little experiments.

As noted in the docs, using the constant-force-limit approximation 
method you'll have to find values of mu that are compatible with the 
forces generated in your particular case. And this (I think) will change 
depending on the objects that are colliding. When your "light" boxes are 
in contact with the floor you'll need to use a much lower mu than for 
when your 300x heavier "bullets" are sliding along the floor, since the 
forces being generated are different.

Have you tried using the friction pyramid method?
Is it much slower?

When I'm starting trying to tweak my ODE simulations I tend to start off 
by nabbing the configuration from one of the demos!

Cheers,
Ed.


Megan Fox wrote:

>I'm sure that would work, but if I'm going to be applying the friction force
>manually, I'm unclear what the purpose of ODE's friction value is, then?
>
>... especially given how simple and generic that bit of code would be to
>apply to all bodies in the system, it seems surpising this isn't something
>ODE just handles?  I'd imagined that mu became something like the dragCoef
>in your equation below.
>
>-Megan Fox
>
>  
>
>>A simplest way to add friction, as Russ mentions in his doc, is to apply
>>some sort of drag on the body.  This should be done at every
>>frame, and code
>>sniplet looks something like what's shown below.  Forces will eventually
>>settle to 0.
>>
>>VOID SOMECLASSBODYOBJ::ApplyLinearVelocityDrag(FLOAT dragCoef)
>>{
>>    const dReal *temp;
>>    dReal fX;
>>    dReal fY;
>>    dReal fZ;
>>
>>    temp = dBodyGetLinearVel(m_BodyId);
>>    fX = temp[0]*(dReal)dragCoef*-1;
>>    fY = temp[1]*(dReal)dragCoef*-1;
>>    fZ = temp[2]*(dReal)dragCoef*-1;
>>
>>    dBodyAddForce(m_BodyId, fX, fY, fZ);
>>}
>>    
>>
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>  
>



More information about the ODE mailing list