Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code question for CARDYNAMICS::ApplyWheelForces
07-31-2011, 08:11 AM,
#1
Code question for CARDYNAMICS::ApplyWheelForces
Code:
    //calculate brake torque
    btScalar wheel_brake_torque = (0 - wheel[i].GetAngularVelocity()) / dt * wheel[i].GetInertia() - wheel_drive_torque + tire_friction_torque;
    if (wheel_brake_torque > 0 && wheel_brake_torque > brake[i].GetTorque())
    {
        wheel_brake_torque = brake[i].GetTorque();
    }
...

What does AngularVelocity / dt * Inertia term represent?

Consider half-braked wheel at constant high speed. In such condition brake force should equal friction force. But Velocity / dt * Inertia will be non-zero, increase with speed and depend on iteration time step. Why is it there?
Reply
07-31-2011, 09:25 AM,
#2
 
Not the most readable piece:
Code:
btScalar dw = 0 - wheel[i].GetAngularVelocity();
btScalar lockup_torque = wheel[i].GetInertia() * dw / dt; // torque to lock a free rotating wheel
btScalar wheel_brake_torque  = lockup_torque - wheel_drive_torque + tire_friction_torque;
Reply
07-31-2011, 09:31 AM,
#3
 
NaN Wrote:
Code:
btScalar dw = 0 - wheel[i].GetAngularVelocity();
btScalar lockup_torque = wheel[i].GetInertia() * dw / dt; // torque to lock a free rotating wheel

dw / dt should be angular accelaration, so how come dw = - Velocity?
Reply
07-31-2011, 09:37 AM,
#4
 
Lock up torque, as torque required to lock a free rotating wheel, reduce its angular velocity to zero.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)