PxVehicleWheelRotationAngleUpdate

Defined in include/vehicle2/wheel/PxVehicleWheelFunctions.h

void PxVehicleWheelRotationAngleUpdate(const PxVehicleWheelParams &wheelParams, const PxVehicleWheelActuationState &actuationState, const PxVehicleSuspensionState &suspensionState, const PxVehicleTireSpeedState &tireSpeedState, const PxReal thresholdForwardSpeedForWheelAngleIntegration, const PxReal dt, PxVehicleWheelRigidBody1dState &wheelRigidBody1dState)

Forward integrate the rotation angle of a wheel.

Note

The rotation angle of the wheel plays no role in simulation but is important to compute the pose of the wheel for rendering.

Note

At low speeds and large timesteps, wheel rotation speed can become noisy due to singularities in the tire slip computations. At low speeds, therefore, the wheel speed used for integrating the angle is a blend of current angular speed and rolling angular speed if the wheel experiences neither brake nor drive torque and can be placed on the ground. The blended rotation speed gets stored in PxVehicleWheelRigidBody1dState::correctedRotationSpeed.

Parameters
  • wheelParams[in] describes the radius and half-width of the wheel

  • actuationState[in] describes whether the wheel has drive or brake torque applied to it.

  • suspensionState[in] describes whether the wheel touches the ground.

  • tireSpeedState[in] describes the components of rigid body velocity at the ground contact point along the tire’s lateral and longitudinal directions.

  • thresholdForwardSpeedForWheelAngleIntegration[in] Forward wheel speed below which the wheel rotation speed gets blended with the rolling speed (based on the forward wheel speed) which is then used to integrate the wheel rotation angle. At low forward wheel speed, the wheel rotation speed can get unstable (depending on the tire model used) and, for example, oscillate. If brake or throttle is applied, there will be no blending.

  • dt[in] is the simulation time that has lapsed since the last call to PxVehicleWheelRotationAngleUpdate

  • wheelRigidBody1dState[inout] describes the current angular speed and angle of the wheel.