[ODE] rolling contact force

Jon Watte hplus-ode at mindcontrol.org
Fri Oct 8 13:24:25 MST 2004


You don't need to turn off gravity, and you don't need to apply 
the force tangentially to the surface. If you apply a force of 
some degree just in the ground plane, it will still make the 
spheres roll along an up-hill, assuming the force is big enough. 
Similarly, this force will also counteract gravity, again if it 
is big enough.

The problem with large forces is that they may make the spheres 
roll VERY quickly when they're not impeded. The best solution I 
know if is to implement a forward-looking control loop, where 
you attempt to match a desired velocity, and the further you are 
from the desired velocity, the more force you apply, using some 
steepness scale. Clamp the force you actually apply to the 
maximum force they can exert, and you're done.

This will also naturally make the spheres unable to climb up 
hills that are steeper than surface-projected force compared to 
gravity, which is usually desirable. If you want the aliens to 
climb straight up, then you need to apply the force tangentially 
to your contact, and the force needs to be bigger than gravity, 
but you still probably shouldn't turn off gravity.

Cheers,

			/ h+

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Shamyl Zakariya
Sent: Friday, October 08, 2004 11:23 AM
To: ODE mailing list
Subject: Re: [ODE] rolling contact force


All this talk about rolling friction... I have to ask a question.

I'm writing a simple game where the opponents are quasi autonomous 
flocks of little spheres which you have to prevent from gathering 
around your "home base". From a rolling friction standpoint I just 
dampen their motion if they're not actively moving.

Anyway, I was thinking that since they're "aliens" wouldn't it be neato 
if they could roll *up* the steep sides of buildings and terrain. It 
would make them more formidable and creepy-like.

My thoughts on this had been that I'd have to have the spheres apply 
forces along the tangent of the surface they're touching, so if they 
hit a wall they might simply apply an "up" force to crawl up. The 
spheres would have dBodySetGravityMode set to zero, and I'd just apply 
a force pointing torwards the surface they're touching to hold them 
fast.

Does this sound like a reasonable approach? I haven't done anything yet 
as regards "sticky" friction, mainly I'm still working on the player 
driving, camera and gun physics and whatnot.


Shamyl Zakariya
   "this is, after all, one of those movies where people spend a great
   deal of time looking at things and pointing."
	From a review of _Fantastic Voyage_

On Oct 8, 2004, at 1:31 PM, Michael Rauh wrote:

>> Presumably because the total velocity of the contact point is zero.
>>
> That's right.
>
>> But the friction force is Ff = mu * Fn
>>
> That's wrong. The *maximum* static friction force is mu * Fn. Only in
> the case of kinetic friction, Ff is mu * Fn. Further info in the docs,
> 3.11.1, Friction Approximation.
>
> Real rolling friction is completely different from (and can occur
> additional to) Coulomb friction. It depends (among others) on the
> deformation of the rolling body and the ground it's rolling on. See
> for example http://hyperphysics.phy-astr.gsu.edu/hbase/frict2.html
> (there are better sources certainly, but it was the first google hit)
> for that.
>
>>
>> In any case having to approximate rolling friction as damping, not 
>> because
>> you're not wiling to pay the computational price for it but because 
>> the
>> library design won't let you, is not very good, not even acceptable 
>> in some
>> cases (I assume it won't be enough for accurate pool physics 
>> simulation for
>> example).
>>
>
> ODE is a rigid body simulation, so there is no way to simulate rolling
> friction other than approximating it somehow. There are other
> libraries that will let you simulate this accurately, but I don't know
> any that won't have large demands on your purse.
>
> Greets
> Michael
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list