[ODE] "Ladies and gentlemen, start your engines"
Nate W
coding at natew.com
Tue Apr 23 12:10:02 2002
On Tue, 23 Apr 2002, Michael Sebastian Sbrissa Bortolin wrote:
> I don't remember if this question was already made, but, have someone
> used real values in a car simulation with ode? I can't get a good
> simulation with the values i'm using.
>
> I'm calculating the ammount of torque delivered by the motor to the wheels:
> float m_fTorqueOnDriveWheels = m_fAccel * LookupTorque(m_iRPM)
> * m_fGearRatio[m_iGear]
> * m_fDifferentialRatio * m_fFrontWheelRadius;
>
> Where i must use the returned value (m_fTorqueOnDriveWheels) ?
I'm probably not the best person to ask, but I can't resist guessing...
I'd try using that torque value as the maximum-force joint motor
parameter. The, for the desired-velocity motor parameter, pick a number
10% higher than the current actual velocty. Or maybe you could always use
the same number for the desired velocity, some number that's a bit higher
than you'll ever actually encouter. For braking, set the desired velocity
to zero and use another function to compute the torque from the brakes.
That might work... But bear in mind this all comes from a guy who uses
ODE to make things that walk, not things that roll. :-)
--
Nate Waddoups
Redmond WA USA
http://www.natew.com