PxVehicleCommandNonLinearResponseParams#

Defined in include/vehicle2/commands/PxVehicleCommandParams.h

class PxVehicleCommandNonLinearResponseParams#

Note

Brake, drive and steer response typically reduce at increased longitudinal speed. Moreover, response to a brake, throttle or steer command is typically nonlinear and may be subject to dead zones where response is constant with either zero or non-zero response. PxVehicleCommandNonLinearResponseParams allows command responses to be authored as multi-variate piecewise polynomials with normalized command response a function of command value and longitudinal speed.

Public Types

enum Enum#

Values:

enumerator eMAX_NB_COMMAND_VALUES#

Public Functions

inline PxVehicleCommandNonLinearResponseParams()#
inline void clear()#
inline bool addResponse(
const PxVehicleCommandValueResponseTable &commandValueSpeedResponses,
)#

Add a table of normalised response vs speed and associated it with a specified command value.

Note

commandValueSpeedResponses must be authored as a series of strictly increasing speeds with form {speed, normalizedResponse}

Note

The responses added must form a series of strictly increasing command values.

Public Members

PxReal speedResponses[PxVehicleCommandValueResponseTable::eMAX_NB_SPEED_RESPONSES * 2]#

A ragged array of speeds and normalized responses.

PxU16 nbSpeedResponses#

The number of speeds and normalized responses.

PxU16 speedResponsesPerCommandValue[eMAX_NB_COMMAND_VALUES]#

The table of speed responses for the ith command value begins at speedResponses[2*speedResponsesPerCommandValue[i]].

PxU16 nbSpeedResponsesPerCommandValue[eMAX_NB_COMMAND_VALUES]#

The ith command value has N speed responses with N = nbSpeedRenponsesPerCommandValue[i].

PxReal commandValues[eMAX_NB_COMMAND_VALUES]#

The command values.

PxU16 nbCommandValues#

The number of command values.