Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code question for CARDYNAMICS::ApplyWheelForces
07-31-2011, 08:11 AM
Post: #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?
Find all posts by this user
Quote this message in a reply
07-31-2011, 09:25 AM
Post: #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;
Find all posts by this user
Quote this message in a reply
07-31-2011, 09:31 AM
Post: #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?
Find all posts by this user
Quote this message in a reply
07-31-2011, 09:37 AM
Post: #4
 
Lock up torque, as torque required to lock a free rotating wheel, reduce its angular velocity to zero.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)