[ODE] Car stability with lowered centre of mass leads to problemswhen rolling

Jon Watte hplus-ode at mindcontrol.org
Thu Sep 30 18:55:13 MST 2004


What happens in reality when you roll the car? As far as I can tell, 
one of two things:

a) They shut off the freeway, land a helicopter on it, get out 
   the Jaws of Life, and send you to a hospital.
b) Your family cashes out your life insurance policy.

(I guess "both" is a possibility, too)

So, if realism is what you want, rolling should just end the game. 
I believe Interstate 76 did this, to great effect. (And, as we all 
know, you should NEVER GET OUT OF THE CAR!)

That being said, why aren't freeways always blocked by landed 
helicopters and firetruck rescue teams? I believe the reason is 
not so much that real, mechanical cars use more sophisticated 
construction than we can simulate in ODE (although that's certainly 
true), but also that people won't make maximum-excursion turns while 
hurtling down the freeway -- very small wheel movements are quite 
sufficient. However, we seldom model this in our games, because we 
use arrow keys with no force feedback as the typical input device. 

If you used a real wheel, with force feedback, and you made the 
wheel have the handling of a regular wheel (i e, 3 rotations between 
end points, not just one-half turn), I think your current car would 
flip much less often.

Lacking that, you can make steering inversely progressive, so that 
you actually steer less the faster you're going. This will probably 
prevent flips pretty well, and will reasonably realistically model 
what's going on. There's one exception: if you're driving rally on 
really slippery surfaces, like snow or packed sand, you CAN turn 
the wheel a lot without flipping, because the wheels lose traction. 
If you model this traction loss, you probably need to allow for 
big steering angles even when going fast.

That being said, suppose you flip anyway, and suppose you don't want 
to look like an off-balance windmill when flipping. How would a real 
car flip? Looking at real cars, they have a heavy bottom plate, 
with drive axle, suspension, engine, and gear box all mounted as far 
down as possible. Then there's light and fluffy windows, seating, 
and headroom (no weight at all!) above that. Thus, I would expect the 
center of gravity of a typical sedan to be below the line of dent 
guards that runs down the side doors. If you flipped such a car, it 
would rotate around a center of gravity that's below your seat and 
center of the car -- that's probably not too dis-similar to what you 
are modeling already.

As a first approximation of this, if you want a more centroid center 
of gravity, I would model the car as two boxes; one that's the main 
body (of a typical sedan) and one that's the passenger compartment. 
They would be of about equal height, and the bottom box would be no 
more than six inches off the ground (probably more like 4). I would 
put the center of the body at the center of the bottom box, and I 
would attach the top box using a GeomTransform, adding no effective 
mass to the car.

Then, make sure your Mu isn't too big, and make sure you have a bit 
of force-dependent slip in your contact, and that you set your front 
vector to something reasonable so that the side slip goes in the right 
direction. This will cause too big turns to be forgiving, in that they 
will make the car understeer rather than flip.


If you tried all of this already, well, I don't know how to help you 
more -- please let us know what you end up learning!


Cheers,

				/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of James
Bamford
Sent: Thursday, September 30, 2004 4:44 PM
To: ODE mailing list
Subject: [ODE] Car stability with lowered centre of mass leads to
problemswhen rolling


Hi folks..

I've been picking over the ode archives and got some really useful tips on  
basic vehicle simulation with ODE.. I've managed to get a set of different  
types of vehicles working to a reasonable degree and now i want to just  
tidy up the remaining problems I have with the simulation.

At any kind of speed (really quite low in my setup) with a sensible centre  
of mass the cars were always tending to roll over at the slightest hint of  
cornering, after discovering that the built in ode mass translate  
functions weren't suitable i went the geom transform route to offsetting  
the body to be in a lowered state with the geom positioned correctly  
offset via the geom transform... I've not tweaked this that heavily but it  
really seems to require the new centre of mass to be very close to the  
ground to get a nice sense of stability, especially at higher speeds.

This is all great but when your driving skills (or perhaps some niggles in  
the controls/simulation) get you into trouble and you do end up rolling  
the vehicle the rotation is of course about the body pos which in its  
lowered position is around floor height.. you get the real feel of the car  
orbiting around a point with some kind of translation associated with the  
visible body instead of just rotation as is the case with the rotation  
point sensibly placed near the centre of the geometry.

I've seen this on a few of the other demos out there where the centre of  
mass has been similarly lowered and was just wondering what strategies are  
available to reduce/remove this problem.

I had the idea of either snapping or tweening the centre of mass position  
back to the centre of the object when i detected that the car was tilted  
on its side (about to go into a spin) .. this involves setting the  
transform geom offset to 0 and compensating for this change with body  
position changes for the chassis, wheels and their hinge's anchor  
positions from having the wheels vertically level with the old body pos to  
being well below the body pos when its back in the centre of the vehicle.

I've managed to get this working and aside from a slight wobble in the  
wheel hinges its pretty imperceptable snapping the centre of mass rapidly  
between the two positions. I thought i was halfway there to solving this  
problem when i started to notice that my car wouldn't drive in a straight  
line anymore.. further stress testing in stranger orientations allows you  
to get the hinges of the wheels well and truly broken facing in many  
different directions at steering rest. Its as if the hinge takes whatever  
state its in when i alter the anchor point and sets this as its new  
centred orientation.. I can think of no way to undo this as I can't see  
anyway to directly set the hinge's values back to a correct setup.

I know that messing with the vehicle's positions etc out of the simulation  
isn't really a good idea but i couldn't think of an alternative to improve  
this body rolling rotation problem.

Anyone got any ideas why the hinges get corrupted like this, or have any  
other ideas how to fix it or make our lowered centre of mass cars perform  
more like they should when in mid air and rolling down a slope after a  
crash?

Thanks for your time, sorry for the post length

Regards

Jim


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list