46 #ifndef DW_VEHICLEIO_H_ 47 #define DW_VEHICLEIO_H_ 546 #define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 50 661 bool const brakeOverride,
bool const gearOverride,
662 dwVehicleIOHandle_t
const obj);
708 dwVehicleIOHandle_t
const obj);
722 dwVehicleIOHandle_t
const obj);
808 #endif // DW_VehicleIO_ACTUATORS_H_ NVIDIA DriveWorks API: Core Types
bool buttonCruiseControlGapDecrement
uint8_t displayBrightnessValue
bool buttonCruiseControlOnOff
float32_t maxFrontSteeringSpeed
Maximum front wheel speed of the turning command (rad/s)
dwStateValueFloat frontLoad
Load on front axle [kg].
float32_t ldwSeverity
LDW Warning severity.
bool maxSpeedValid
True if setting speed request.
dwVehicleIODoorLock doorLock
basic lock or unlock
bool buttonCruiseControlIncrement
float32_t steeringWheelAngleCmd
Last acknowledged steering wheel value from a command (-10.0 to 10.0 +- 0.01rad)
float float32_t
Specifies POD types.
NVIDIA DriveWorks API: Rig Configuration
dwVehicleIOLateralActuatorInterface
bool buttonLaneAssistOnOff
bool gearValid
True if setting gear.
bool latAccelerationValid
True if setting lateral acceleration.
dwVehicleIODrivingMode drivingMode
bool buttonCruiseControlGapIncrement
bool mirrorFoldValid
True if setting mirror un/fold.
dwVehicleIOMirror mirrors
FOLD, UNFOLD, ADJUST_LEFT, ADJUST_RIGHT.
float32_t throttleValue
Current thottle value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed...
bool prefillRequest
Request to activate prefill.
float32_t latAccelerationValue
lateral acceleration (m/s^2)
bool latModeValid
True if setting lateral function.
float32_t maxSpeed
Maximum allowed speed to support remaining distance request (m/s)
dwStateValueFloat rearWheelAngle
Defines a two-element single-precision floating-point vector.
bool mirrorAdjustValid
True if setting mirror adjustment.
bool decelerationValid
True if setting deceleration.
dwVehicleIOCDWRequestType cdwRequest
Request to activate CDW.
int32_t steeringWheelAngleLUTSize
Size of the corresponding lookup table.
DW_API_PUBLIC dwStatus dwVehicleIO_getCapabilities(dwVehicleIOCapabilities *const caps, dwVehicleIOHandle_t const obj)
Retrieve current VehicleIO capabilities.
DW_API_PUBLIC dwStatus dwVehicleIO_consumeCANFrame(dwCANMessage const *const msg, uint32_t const sensorId, dwVehicleIOHandle_t const obj)
Parse a received event.
dwTime_t longVelocityForwardMinTimestamp
float32_t brakeCmd
Last acknowledged brake value from a command (0..1 +- 0.01 fraction of max pedal depressed, unitless)
int32_t brakeValueLUTSize
Size of the corresponding lookup table.
float32_t speed
Signed norm of velocity vector.
uint64_t heartbeatCounter
VIO command heartbeat.
float32_t steeringWheelAngle
Steering wheel angle (-10.0 to 10.0 +- 0.01rad)
float32_t brakeTorqueActual
Actual applied brake torque value (Nm)
DW_API_PUBLIC dwStatus dwVehicleIO_initialize(dwVehicleIOHandle_t *const obj, dwVehicleIOType const type, const dwVehicle *const properties, dwContextHandle_t const ctx)
Initialize VehicleIO and prepare all internal structures.
dwStateValueFloat lonAccelerationMax
The maximum longutidinal acceleration command that can be guaranteed.
float32_t steeringWheelTorque
Additional steering wheel torque request (Nm).
float32_t lonAccelerationValue
longitudinal acceleration (m/s^2)
dwStateValueFloat driverLoad
Load on driver axle [kg].
float32_t brakeTorqueRequested
Requested value of brake torque (Nm)
NVIDIA DriveWorks API: Data
dwTime_t speedTimestamp
Time at which speed was updated.
int32_t steeringSpeedLUTSize
Size of the corresponding lookup table.
bool moonroofValid
True if setting moonroof movement.
dwVehicleIOBSMRequest bsmRightRequest
Request corresponding to the right visual warning.
float32_t rearAxleCurvature
Path curvature [1/m].
dwStateValueFloat articulationAngle
Yaw articulation angle between truck and trailer measured at rear axle [rad] Angle measured as descri...
dwVehicleIOLaneDepartureWarningSide ldwSide
LDW Warning side of ego lane- left/right.
dwVehicleIOTrailerConnectedStatus
float32_t throttleState
Throttle value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless) ...
dwVehicleIOGear gear
Desired gear: 0=UNKNOWN, 1=PARK, 2=REVERSE, 3=NEUTRAL, 4=DRIVE.
uint32_t overrides
Overrides in place (0 = none). Flags defined in dwVehicleIOOverrides.
Count of LDW warning sides.
DW_API_PUBLIC dwStatus dwVehicleIO_addDataSensor(uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj)
Add data sensor handle and corresponding VehicleIO configuration ID.
bool steeringWheelTorqueValid
True if setting steering torque.
bool turnSigValid
True if setting turn signal.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
bool fcwRequest
Request to activate FCW.
dwStatus
Status definition.
NVIDIA DriveWorks API: Sensors
float32_t maxSteeringWheelSpeed
Maximum steering wheel speed of the turning command rad/s.
DW_API_PUBLIC dwStatus dwVehicleIO_initializeFromRig(dwVehicleIOHandle_t *const obj, dwConstRigHandle_t const rig, dwContextHandle_t const ctx)
Initialize VehicleIO and prepare all internal structures from Rig Configuration.
dwVehicleIOLaneDepartureWarningState
Driveworks Lane Departure Warning (LDW) activation states.
float32_t rearAxleCurvatureMax
The tightest radius (left) that can be guaranteed.
dwTime_t throttleTimestamp
Time at which throttle was updated.
float32_t rearAxleCurvatureMin
The tightest radius (right) that can be guaranteed.
dwVehicleIOFCWState fcwState
FCW system status/state.
bool remainingDistanceValid
True if setting remaining distance.
DW_API_PUBLIC dwStatus dwVehicleIO_sendMiscCommand(const dwVehicleIOMiscCommand *const cmd, dwVehicleIOHandle_t const obj)
Send a vehicle command to the VehicleIO.
Safety checks suitable for collision avoidance logic (right now same as NO_SAFETY below)...
Driving mode is not valid.
bool steeringWheelValid
True if setting steering wheel steering.
dwTime_t engineSpeedTimestamp
engine speed timestamp[us]
float32_t inverseSteeringR
Inverse turning radius of the vehicle on the road.
bool steeringEnabled
Steering by-wire enablement reported by vehicle.
dwVehicleIOBSMRequest bsmLeftRequest
Request corresponding to the left visual warning.
float32_t longVelocityForwardMin
A minimum positive longitudinal vehicle speed, when driving forward, to avoid burning the clutch...
bool buttonLeftKeypadDown
dwVehicleIOCapabilityState capability
Rear wheel angle on road.
bool lonModeValid
True if setting longitudinal function.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
float32_t accSetSpeed
Current ACC Set Speed in m/s.
dwTime_t rearAxleCurvatureCapabilityTimestamp
dwStateValueFloat trailerLoad
Sum of load on all trailer axles [kg].
dwVehicleIOLonMode lonMode
bool lonAccelerationValid
True if setting longitudinal acceleration.
bool turnSigValid
True if setting turn signal.
bool throttleEnabled
Throttle by-wire enablement reported by vehicle.
dwVector2f acceleration
Actual acceleration measured in m/s^2.
dwVehicleIOTrailerState trailer
struct dwRigObject const * dwConstRigHandle_t
dwTime_t brakeTimestamp
Time at which brake was updated.
dwVehicleIOLaneDepartureWarningState ldwState
LDW Warning state- on/off.
float32_t fuelLevel
(0 to 1 +- 0.01 fraction of tank volume, unitless)
DW_API_PUBLIC dwStatus dwVehicleIO_sendCommand(const dwVehicleIOCommand *const cmd, dwVehicleIOHandle_t const obj)
Send a vehicle command to the VehicleIO.
bool rearAxleCurvatureValid
True if setting rear axle curvature.
float32_t frontSteeringAngle
Same as inverseSteeringR described as an angle instead of radius [rad].
bool rearSteeringValid
True if setting rear wheel steering.
float32_t steeringWheelTorque
Steering wheel torque (0 to 10.0 +- 0.01 Nm)
dwVector2f radarVelocity
Reported velocity from radar unit(s)
DW_API_PUBLIC dwStatus dwVehicleIO_consumeDataPacket(const dwDataPacket *const pkt, uint32_t const sensorId, dwVehicleIOHandle_t const obj)
Similar to dwVehicleIO_consumeCANFrame.
dwVehicleIOTurnSignal turnSig
Turn signal value.
dwTime_t longVelocityForwardMaxTimestamp
float32_t brakeValue
Current brake value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed, unitless)
int32_t minAccelerationLUTSize
Size of the corresponding lookup table.
bool throttleValid
True if setting throttle.
dwVehicleIOBSMRequest bsmAudioRequest
Request corresponding to the audio warning.
float32_t steeringWheelAngle
Desired steering wheel angle (rad)
dwVehicleIOLatMode latMode
float32_t brakeState
Brake value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless)
#define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES
dwVehicleIOHeadlights headlights
ON/OFF, LOW_BEAM, HIGH_BEAM, DRL.
bool buttonCruiseControlResetCancel
float32_t frontSteeringAngle
Desired front wheel steering angle (rad)
DW_API_PUBLIC dwStatus dwVehicleIO_getVehicleState(dwVehicleIOState *const state, dwVehicleIOHandle_t const obj)
Retrieve current vehicle state.
float32_t rearSteeringAngle
Desired rear wheel steering angle (rad)
bool aebRequest
Request to activate AEB.
Warning on the left side.
bool enable
True if we are driving by wire. Has to always be set.
dwVehicleIOSignalQuality speedQuality
Speed and velocity signal quality.
NVIDIA DriveWorks API: CAN
dwStateValueFloat pusherLoad
Load on pusher axle [kg].
dwVehicleIOTurnSignal turnSignal
Turn signal value.
float32_t throttleValue
range 0.0 to 1.0
float32_t mirrorAdjustX
float value 0-5.0 seconds
Comfortable driving is expected (most conservative).
bool clearFaults
Setting > 0 clears any canbus faults/errors.
dwVehicleIOGear gearCmd
Last acknowledged gear from a command.
dwStateValueFloat mass
Total mass of vehicle [kg].
uint32_t faults
Faults detected (0 = none). Flags defined in dwVehicleIOFaults.
Number of wheels describing the vehicle.
float32_t brakeValue
range 0.0 to 1.0
dwVehicleIOLatMode latMode
float32_t reverseSpeedLimit
Normally a negative value (m/s)
bool displayBrightnessValid
True if setting display brightness.
bool buttonCruiseControlDecrement
struct dwContextObject * dwContextHandle_t
Context handle.
dwVehicleIOCDWRequestType
NVIDIA DriveWorks API: Core Methods
int32_t frontSteeringSpeedLUTSize
Size of the corresponding lookup table.
DW_API_PUBLIC dwStatus dwVehicleIO_setDrivingMode(dwVehicleIODrivingMode const mode, dwVehicleIOHandle_t const obj)
Setting driving mode allows to control the behaviour of VehicleIO module with regards to the permitte...
float32_t throttleCmd
Last acknowledged throttle value from a command (0..1 +- 0.01 fraction of max pedal depressed...
struct dwVehicleIOObject * dwVehicleIOHandle_t
dwTime_t accelerationTimestamp
Time at which acceleration was updated.
Warning on the right side.
dwVehicleIOAEBState aebState
AEB system status/state.
dwStateValueFloat rearWheelAngleMax
The maximum rear wheel angle command that can be guaranteed.
int32_t throttleValueLUTSize
Size of the corresponding lookup table.
bool buttonCruiseControlCancel
bool doorLockValid
True if setting door locks.
bool brakeValid
True if setting break.
float32_t decelerationValue
decleration m/s^2 - represented as a positive number
dwVehicleIOGear gear
Vehicle gear.
dwVector2f velocity
Vehicle velocity (longitudinal, lateral) measured in m/s at the rear axle.
DW_API_PUBLIC dwStatus dwVehicleIO_initializeFromDBC(dwVehicleIOHandle_t *const obj, dwVehicleIOType const type, const dwVehicle *const properties, const char *const dbcFilePath, dwContextHandle_t const ctx)
Initialize VehicleIO and prepare all internal structures from DBC File.
DW_API_PUBLIC dwStatus dwVehicleIO_selectDriverOverrides(bool const throttleOverride, bool const steeringOverride, bool const brakeOverride, bool const gearOverride, dwVehicleIOHandle_t const obj)
Select the overrides that the driver can use to disable vehicle control.
DW_API_PUBLIC dwStatus dwVehicleIO_reset(dwVehicleIOHandle_t const obj)
Reset VehicleIO to default state.
bool longitudinalTOR
True if an immediate takeover is needed.
bool headlightsValid
True if setting headlights.
dwVehicleIOTurnSignal turnSig
Turn signal - misc also wants this.
dwVehicleIOLonMode lonMode
bool frontSteeringValid
True if setting front wheel steering.
float32_t rearAxleCurvatureValue
Path curvature request based on travelled distance (1/m)
VehicleIO will bypass all safety checks.
DW_API_PUBLIC dwStatus dwVehicleIO_addCANSensor(uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj)
Add CAN sensor handle and corresponding VehicleIO configuration ID.
dwStateValueFloat frontWheelAngleMax
The maximum front wheel angle command that can be guaranteed.
float32_t remainingDistance
Desired longitudinal offset from current position (m)
The capability state data.
dwStateValueFloat mass
Total mass of trailer unit [kg].
dwTime_t steeringTimestamp
Time at which steering was updated.
dwVehicleIOMoonroof moonroof
basic open or close
dwTime_t rearAxleCurvatureTimestamp
Timestamp for all motion signals.
dwStateValueFloat outsideTemperature
outside temperature [degrees C]
dwTime_t radarVelocityTimestamp
DW_API_PUBLIC dwStatus dwVehicleIO_release(dwVehicleIOHandle_t const obj)
Release used memory and close all modules.
int32_t frontSteeringAngleLUTSize
Size of the corresponding lookup table.
float32_t longVelocityForwardMax
A maximum positive longitudinal vehicle speed that the vehicle is designed for.
int32_t maxAccelerationLUTSize
Size of the corresponding lookup table.
Generic state field structure capturing data validity and timestamp.
DEPRECATED: Properties of a passenger car vehicle.
float32_t mirrorAdjustY
float value 0-5.0 seconds
float32_t engineSpeed
engine rpm speed [RPM]
dwVehicleIOLaneDepartureWarningSide
Driveworks LDW sides with respect to the ego lane.
bool brakeEnabled
Brake by-wire enablement reported by vehicle.
bool buttonCruiseControlReset
NVIDIA DriveWorks API: Core Exports
dwVehicleIOAxleStatus axles
Same as above, but unsafe commands are clamped to safe limits and warnings are isssued.