On Wed, 1 May 2002 13:39:50 +0100, "Al Dukes"
>Hi guys
>I've been reading your car physics threads with great interest.
>I'm writing a game at the moment and I'm experiencing a problem:
>When I try to model a free-rolling wheel, I am getting a negative slip ratio
>as the car accelerates off (I'm using SAE 950311). Of course the result is
>that the wheel tries to brake the car - hence my wheel never rotates.
Sounds like you're not applying the right forces. Here's what I do,
more or less:
- Calculate engine torque
- Calculate resulting torque at wheel contact patch (geared).
- Calculate slip ratio (through the relaxation length or whatever)
- Calculate Fx=Pacejka(SR,...)
Note that the torque at the wheel because of the engine then is:
T=T_engine*gearing
Then:
- Apply Fx to body
- Apply (F_engine-Fx) as rotational acceleration for the wheel
spinning. (note that T=F*r, so from Fx you can make torque by
Tx=Fx*wheelRadius and then you get T_engine-Tx, so T=I*w => w=angular
acceleration = (T_engine-T_x)/I_wheel).
Even if this would in the first few timesteps make the wheel stop,
that shouldn't matter, since then SR gets down to 0, making Fx move to
0 (check that; with low speed & Pacejka you may want to damp Fx down
to 0 as well). In that case, F_engine-Fx ~ F_engine, and the wheel
should start rotating. In bits, the body should accelerate, jittering
a bit around the wheel's origin at first.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/