PxVehicleTankDriveDifferentialParams
Defined in include/vehicle2/drivetrain/PxVehicleDrivetrainParams.h
-
struct PxVehicleTankDriveDifferentialParams : public PxVehicleMultiWheelDriveDifferentialParams
A description of a tank differential.
Note
The wheels on a tank may be connected to the differential or not connected to the differential.
Note
The wheels on a tank track may be connected to a tank track or not connected to a tank track.
Note
Wheels connected to the differential but not to a tank track receive the torque split specified by the corresponding elements of PxVehicleMultiWheelDriveDifferentialParams::torqueRatios[].
Note
Wheels connected to a tank track but not to the differential receive no torque from the engine.
Note
Wheels connected to a tank track and to the differential receive the torque split specified by the corresponding elements of PxVehicleMultiWheelDriveDifferentialParams::torqueRatios[] multiplied by the corresponding thrust controller value. If the thrust controller has a negative value, the wheels will receive a torque that is negative with respect to the gearing ratio.
Note
The wheels in each tank track have a constraint applied to them to enforce the rule that they all have the same longitudinal speed at the contact point between the wheel and the tank track.
Public Functions
-
inline void setToDefault()
-
inline void addTankTrack(const PxU32 nbWheelsInTrackToAdd, const PxU32 *const wheelIdsInTrackToAdd, const PxU32 thrustControllerIndex)
Add a tank track by specifying the number of wheels along the track and an array of wheel ids specifying each wheel in the tank track.
- Parameters
nbWheelsInTrackToAdd – [in] is the number of wheels in the track to be added.
wheelIdsInTrackToAdd – [in] is an array of wheel ids specifying all the wheels in the track to be added.
thrustControllerIndex – [in] specifies the index of the thrust controller that will be used to control the tank track.
-
inline PxU32 getNbTracks() const
Return the number of tracks.
See also
- Returns
The number of tracks.
-
inline PxU32 getNbWheelsInTrack(const PxU32 i) const
Return the number of wheels in the ith track.
See also
- Parameters
i – [in] specifies the track to be queried for its wheel count.
- Returns
The number of wheels in the specified track.
-
inline const PxU32 *getWheelsInTrack(const PxU32 i) const
Return the array of all wheels in the ith track.
- Parameters
i – [in] specifies the track to be queried for its wheels.
- Returns
The array of wheels in the specified track.
-
inline PxU32 getWheelInTrack(const PxU32 j, const PxU32 i) const
Return the wheel id of the jth wheel in the ith track.
See also
- Parameters
j – [in] specifies that the wheel id to be returned is the jth wheel in the list of wheels on the specified track.
i – [in] specifies the track to be queried.
- Returns
The wheel id of the jth wheel in the ith track.
-
inline PxU32 getThrustControllerIndex(const PxU32 i) const
Return the index of the thrust controller that will control a specified track.
- Parameters
i – [in] specifies the track to be queried for its thrust controller index
- Returns
The index of the thrust controller that will control the ith track.
-
inline PxVehicleTankDriveDifferentialParams transformAndScale(const PxVehicleFrame &srcFrame, const PxVehicleFrame &trgFrame, const PxVehicleScale &srcScale, const PxVehicleScale &trgScale) const
-
inline bool isValid(const PxVehicleAxleDescription &axleDesc) const
Public Members
-
PxU32 thrustIdPerTrack[PxVehicleLimits::eMAX_NB_WHEELS]
The id of the thrust that will control the track. Must have value 0 or 1.
-
PxU32 nbWheelsPerTrack[PxVehicleLimits::eMAX_NB_WHEELS]
The number of wheels in each track.
-
PxU32 trackToWheelIds[PxVehicleLimits::eMAX_NB_WHEELS]
The list of wheel ids for the ith tank track begins at wheelIdsInTrackOrder[trackToWheelIds[i]].
-
PxU32 wheelIdsInTrackOrder[PxVehicleLimits::eMAX_NB_WHEELS]
The list of all wheel ids in all tracks.
-
PxReal torqueRatios[PxVehicleLimits::eMAX_NB_WHEELS]
torqueRatios describes the fraction of torque delivered to each wheel through the differential.
Range: [1, -1]
Note
Wheels not connected to the differential must receive zero torque.
Note
Wheels connected to the differential may receive a non-zero torque.
Note
The sum of the absolute of the ratios of all wheels must equal to 1.0.
Note
A negative torque ratio simulates a wheel with negative gearing applied.
-
PxReal aveWheelSpeedRatios[PxVehicleLimits::eMAX_NB_WHEELS]
aveWheelSpeedRatios describes the contribution of each wheel to the average wheel speed measured at the clutch.
Range: [0, 1]
Note
Wheels not connected to the differential do not contribute to the average wheel speed measured at the clutch.
Note
Wheels connected to the differential may delivere a non-zero contribution to the average wheel speed measured at the clutch.
Note
The sum of all ratios of all wheels must equal to 1.0.
-
inline void setToDefault()