[ODE] Car simulation
Michael Sebastian Sbrissa Bortolin
michael_bortolin at dell.pucrs.br
Mon Feb 4 12:32:01 2002
I need some help. I'm trying to do a car simulation with ode and I want to know how do I do to move the car only applying a torque on the wheel. I modified the buggy demo to do my car simulation. In real life, the engine of a car apply only some torque on the wheels, but in ode, beyond torque, I need to set the desired velocity.
If someone have a sample code that implement a car simulation with real values, etc, please, let me know.
Here is a snippet of my app:
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],dParamVel2, ??? ); // Just applying the torque dont do the job? If I really need to set this parameter, what value I must use here?
dJointSetHinge2Param (joints[0],dParamFMax2, m_fTorqueOnDriveWheels);
Michael Bortolin
Development Team
E-Business Research Center - DELL/PUCRS
Phone: +55 (51) 3320-3639 - Ext. 230
michael_bortolin@dell.pucrs.br