ODE's Friction model: Static friction ?

337 views
Skip to first unread message

Wracky

unread,
Feb 5, 2009, 9:39:18 AM2/5/09
to ode-users
Hi everyone!

And thanks for reading ;-)
I was wondering. I would like to implement static friction using ODE.
With this, I mean the static friction type that is described on
wikipedia

See:
http://en.wikipedia.org/wiki/Friction#Static_friction

So a certain force that is needed to put a certain subject into
motion, but is non existent,
(and switches to dynamic friction) as soon as the object is moving.
A rolling wheel for instance, would use static friction not to slip,
since the relative velocity between the
two surfaces is still 0.

I've read the wiki and manual about slip, but I cannot see how to use
this for a generic 3D engine
solution. The wiki states that it is possible to model a car's wheel
with it, but (other then the interface
feeling rather cumbersome) I have no proper way of telling if the
bodies I'm simulating are wheels or not.
So setting a friction direction, or slip, depending on the body, is
not easy to do.

Sure I can manage with extra flags, user info, and a bunch of extra if
statements.
But I would like to find a more generic solution instead of filling
the code with "This is a wheel" and "this is a cow's bottom" kind of
structures. :-)

I believe Havok and Newton both have options for setting static
friction.
They DO have a lot of vehicle specific stuff in their API, so
apparently it's a big deal ;-)

Any ideas?

Kind regards,
Roel Binnendijk,
www.kalydo.com


P.S. Thanks Krystian Ligenza and Daniël K.O. for the Kinematic Body
patch!! That really worked like a charm and solved many problems :-)

Daniel K. O.

unread,
Feb 5, 2009, 11:00:41 PM2/5/09
to ode-...@googlegroups.com
Wracky escreveu:

> I was wondering. I would like to implement static friction using ODE.
> With this, I mean the static friction type that is described on
> wikipedia
>
> See:
> http://en.wikipedia.org/wiki/Friction#Static_friction

Just a note: solving contacts with friction is in general a hard
problem. Interactive simulations usually are happy to just use some
"good enough" approximation that is stable, fast and looks reasonable.


> So a certain force that is needed to put a certain subject into
> motion, but is non existent,
> (and switches to dynamic friction) as soon as the object is moving.

That's more or less what happens in ODE. Does it produce unsatisfactory
results?


> I've read the wiki and manual about slip, but I cannot see how to use
> this for a generic 3D engine
> solution.

The slip param is more of a tweak to get some effects in certain cases.


--
Daniel K. O.
"The only way to succeed is to build success yourself"

Wracky

unread,
Feb 6, 2009, 4:44:05 AM2/6/09
to ode-users
Thanks for the quick reply!

On Feb 6, 5:00 am, "Daniel K. O." <danielko.lis...@gmail.com> wrote:

> Just a note: solving contacts with friction is in general a hard
> problem. Interactive simulations usually are happy to just use some
> "good enough" approximation that is stable, fast and looks reasonable.

I figured as much ;-) Since all physics libraries have these kind of
tweaks
at some point in their API :-) And a "good enough" approximation would
be fine in my case aswell. But.... :

> > So a certain force that is needed to put a certain subject into
> > motion, but is non existent,
> > (and switches to dynamic friction) as soon as the object is moving.
"
> That's more or less what happens in ODE. Does it produce unsatisfactory
> results?

It would be nice to be able to set the static friction separately from
the dynamic friction.
Now I can imagine that this is very hard to implement (if even
possible in real-time)
The main problem I'm having is that we're trying to make an as generic
as possible interface
for our game developers. Static and dynamic friction would be rather
clear concepts when the
gamedeveloper would like to model a wheel.

We also have an implementation of the Newton and Havok API's, and they
provide such a setting.
They also provide special vehicle and wheel type joints so perhaps
we'll just have to go with a special
case for wheels anyway...

I was thinking that perhaps I could fake static friction using motors
or joints perhaps?
So that I can provide a similar interface for ODE, Havok, and Newton?
(Yes we have already experienced that it's close to attempting the
impossible :P)

We could also just take static friction out our interface, and just
see how far we can go
with this ;-)

Thanks!

Kind regards,
Roel Binnendijk.
www.kalydo.com

Reply all
Reply to author
Forward
0 new messages