PxVehicleSuspensionStateUpdate

Defined in include/vehicle2/suspension/PxVehicleSuspensionFunctions.h

void PxVehicleSuspensionStateUpdate(const PxVehicleWheelParams &wheelParams, const PxVehicleSuspensionParams &suspensionParams, const PxVehicleSuspensionStateCalculationParams &suspensionStateCalcParams, const PxReal suspensionStiffness, const PxReal suspensionDamping, const PxReal steerAngle, const PxVehicleRoadGeometryState &roadGeometryState, const PxVehicleRigidBodyState &rigidBodyState, const PxReal dt, const PxVehicleFrame &frame, const PxVec3 &gravity, PxVehicleSuspensionState &suspState)

Compute the suspension compression and compression speed for a single suspension.

Parameters
  • wheelParams[in] is a description of the radius and half-width of the wheel on the suspension.

  • suspensionParams[in] is a description of the suspension and wheel frames.

  • suspensionStateCalcParams[in] specifies whether to compute the suspension compression by either raycasting or sweeping against the plane of the road geometry under the wheel.

  • suspensionStiffness[in] is the stiffness of the suspension

  • suspensionDamping[in] is the damping rate of the suspension. or whether to apply a limit to the expansion speed so that the wheel may not reach the ground.

  • steerAngle[in] is the yaw angle (in radians) of the wheel.

  • roadGeometryState[in] describes the plane under the wheel.

  • rigidBodyState[in] describes the pose of the rigid body.

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

  • frame[in] describes the longitudinal, lateral and vertical axes of the vehicle.

  • gravity[in] is the gravitational acceleration that acts on the suspension sprung mass.

  • suspState[inout] is the compression (jounce) and compression speed of the suspension.