[ODE] Throttle 2 Engine 2 Wheels ..
Tom De Muer
tom.demuer at skynet.be
Fri Feb 6 16:56:48 MST 2004
> Hi,
>
> I'm currently implementing ODE in an arcade style racer.
> The car is driving with an acceptable behaviour. The problem I now
> have is the gearbox.
>
> I read a lot of car physics paper and stuff .. but I don't get it..
>
> Can someone give me a brief explanation about the gearbox basics ?
>
> What I mean is .. what do I have to do get the dParamVel2 and
> dParamFMax2 for the hinge2's out of the throttle value between 0 and
> 1.
>
> I read about enging torque and gear-ratio and stuff, but what has to
> be calculated in which order to get a simple engine-gearbox system.
> Without engine-friction and so ..
>
> Thanks in advance,
> Bodo Pfeifer
>
Hi,
Look at the post I've made here :
http://forum.racesimcentral.com/showthread.php?t=132258&highlight=source
This ODE model contains a gearbox and engine.
Here is a way to achieve what you want, like in that post I've made:
dParamVel2 is the velocity you want the wheels to have. You can set that to
infinity or a large number. The dParamFMax determines how much power the
joint motor may use to achieve that speed. This you set dynamically based
on the engine's output torque (not bhp). This however doesn't take care of
the feedback from the wheels into the engine (Newton's 3 if I'm not
mistaken). So, your engine RPM is through the gearbox related to the
wheelspeed. The akward thing with this is that initially your wheels will
have speed 0 and your engine also speed 0 and normally torque = 0. So you
can't induce movement.
This is why you need a clutch :). A quick hack around this is that you
scale the torque of the engine with the throttle. So when you're off the
throttle the engine will effectively give no torque which is good, and as
soon as you press the throttle the car will start moving.
To avoid that your car goes to "infinite" speed you will need some friction
of some kind or have a rev-limiter in your engine: for instance, when rpm >
8000, then output torque is zero.
If you now want to go further:
* implement a basic clutch
* when the throttle is off, the engine actually brakes so it will produce a
(relative large) negative torque, slowing down the car, IIRC I implemented
this by setting dParamVel2 to zero and torque to the wheels at the absolute
value of the engine torque.
Cheers!
Tom
More information about the ODE
mailing list