[ODE] Car simulation

Nate W coding at natew.com
Mon Feb 4 22:42:02 2002


On Mon, 4 Feb 2002, Michael Sebastian Sbrissa Bortolin wrote:

> m_fTorqueOnDriveWheels =  m_fAccel * (1.0 - m_fClutch) * LookupTorque(m_iRPM)
> 							  * m_fGearRatio[m_iGear]
> 							  * m_fDifferentialRatio ;			// Here I get the engine torque
> 
> // torque on drive wheel 
> dJointSetHinge2Param (joints[0],dParamFMax2, m_fTorqueOnDriveWheels);
> dJointSetHinge2Param (joints[0],dParamVel2, ??? ); 
>
> Just applying the torque dont do the job? If I really need
> to set this parameter, what value I must use here?

You do need to set that parameter - the 'max force' parameter specifies
how much force is available, but not how much is used.  My guess is that 
(m_iRPM * m_fGearRatio) would give the results you're looking for.

One other thing - you may already be aware of this, but just in case - ODE
doesn't model aerodynamic drag or rolling friction, so I suspect that the
top speed of your car will be unrealistically high unless you factor these
in yourself.  

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com