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

James Bamford fromweb at jimtreats.com
Fri Oct 1 00:44:07 MST 2004


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/


More information about the ODE mailing list