[ODE] Odd Hinge-2 Behaviour?

Thomas Harte thomasharte at lycos.co.uk
Mon Dec 16 18:38:02 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Lycos_0279141040089014_ID
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

I am attempting to simulate a rear wheel drive car, presently built using four bodies representing the wheels and one representing the chassis. Each wheel is attached to the chassis by a hinge-2 joint.

When race driving, a lot of the hard work is keeping within what drivers call the traction circle. This appears, based on my reading, to be a natural result of the same thing referred to in section 3.11.1 of the ODE documentation as the 'friction cone'. Both because I need to get this right, and because I've had issues getting ODE to react as expected using its built-in implementation, I will have to resort to supplying frictional forces myself.

Obviously, in order to do that I must obviously disable ODE's notion of friction, which I have done by supplying 0 for the 'mu' member of the dSurfaceParameters struct. But this, and a little further investigation, has revealed some very odd behaviour within my system.

My chassis has a 'mass' of 1143. Each of my wheels has mass 15. I believe this represents a realistic ratio of weight between wheels and chassis. On a side issue, I assume that if I have used m/s/s as the units in setting my world gravity, then weights passed to dMassAdjust and so on are in grams? I obviously want my chassis to have weight 1143kg, but never mind that now, as I find that while the ratio between wheels and chassis remains the same, provided other constants relating to expendable force by the hinge-2 joint are scaled accordingly, simulation behaviour is the same.

The suspension ERP and CFM are set to be slightly bouncy, based on a spring constant of 66000 and a damping constant of 10000.

Now, the first odd result comes when the car is resting on a flat surface, with completely no friction. Accelerating for my model is setting a non-zero 'speed' for dParamVel2 - the axis you'd expect to be connected to the motor - for both of the back wheels. The front wheels are both set to allow free rotation around that axis, by means of setting dParamFMax2 to 0.

When I accelerate, the rear end of the chassis goes up. When I brake, the rear end goes down. When I maintain a constant rotation speed for the back wheels, the chassis levels out. In other words, I see exactly the expected results of weight transfer on the chassis, except that their should be no weight transfer because there is no friction and so there is no linear motion for any of the chassis or wheels.

Similarly, I have discovered that if I allow my car to fall freely, then whereas you'd expect acceleration to cause the wheels to spin but not really achieve anything, both the wheels and chassis spin.

If I have dParamFMax2 set to dInfinity and then set dParamVel2 sufficiently higher than its previous value, to effect a very sudden jump in 'motor output' (but one of a magnitude which might be seen in real life, e.g. if a driver slammed the handbrake on), the effect is actually to throw the entire car off the ground.

There are also odd results when it comes to steering. When either resting on a zero friction surface or not, steering (which in this case is achieved by setting a velocity for the first axis on the front two wheels) causes the chassis body to rotate as well as the wheels themselves. Again this is not the behaviour I expect at all.

I have made absolutely sure that my wheels are 'body 2', and that my chassis is 'body 1' as per the diagram in section 7.3.4 of the documentation, dedicated to the hinge-2 joint.

So, am Iright in believing this behaviour to be odd? Or am I simply mistaken in my expectations? If, as I believe, something is wrong, what is the solution to my problem?

-Thomas

When words aren't enough - Vodafone live! A new world of colour, sounds, picture messages and information on your mobile. <a href="http://ad.doubleclick.net/clk;4909903;7724245;q?http://www.vodafone.co.uk/live">
Click here</a> to find out more.


--=_NextPart_Lycos_0279141040089014_ID--