• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
Code question for CARDYNAMICS::ApplyWheelForces
07-31-2011, 08:11 AM,
 LBodnar Junior Member Posts: 37 Threads: 10 Joined: Jul 2011
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?
07-31-2011, 09:25 AM,
 NaN Posting Freak Posts: 1,990 Threads: 119 Joined: Jan 2010

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;```
07-31-2011, 09:31 AM,
 LBodnar Junior Member Posts: 37 Threads: 10 Joined: Jul 2011

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?
07-31-2011, 09:37 AM,
 NaN Posting Freak Posts: 1,990 Threads: 119 Joined: Jan 2010

Lock up torque, as torque required to lock a free rotating wheel, reduce its angular velocity to zero.

Forum Jump:

Users browsing this thread: 1 Guest(s)