[ODE] Car simulation

Benny Kramek wolfman8k at barrysworld.com
Mon Feb 4 14:29:02 2002


I made a mistake. I meant dBodyAddRelTorque()


---------- Original Message ----------------------------------
From: "Benny Kramek" <wolfman8k@barrysworld.com>
Reply-To: <wolfman8k@barrysworld.com>
Date: Mon,  4 Feb 2002 21:23:13 +0000

>You could try using dBodyAddRelForce() on the wheels, instead of using motors:
>
>dBodyAddRelForce(leftwheel, m_fTorqueOnDriveWheels, 0, 0);
>dBodyAddRelForce(rightwheel, m_fTorqueOnDriveWheels, 0, 0);
>
>This assumes that the wheels spin around the x axis
>
>---------- Original Message ----------------------------------
>From: "Michael Sebastian Sbrissa Bortolin" <michael_bortolin@dell.pucrs.br>
>Date: Mon, 4 Feb 2002 17:24:34 -0300
>
>>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
>>
>>
>>_______________________________________________
>>ODE mailing list
>>ODE@q12.org
>>http://q12.org/mailman/listinfo/ode
>>---
>>---
>>[This E-mail has been scanned for viruses by BarrysWorld]
>>
>
>>
>_______________________________________________
>ODE mailing list
>ODE@q12.org
>http://q12.org/mailman/listinfo/ode
>---
>---
>[This E-mail has been scanned for viruses by BarrysWorld]
>

>