DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

VehicleIOLegacyStructures.h
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
46 #ifndef DW_VEHICLEIO_LEGACY_STRUCTURES_H_
47 #define DW_VEHICLEIO_LEGACY_STRUCTURES_H_
48 
49 #include <dw/core/base/Types.h>
50 #include <dw/rig/Rig.h>
51 
52 #include <stdint.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 typedef struct dwVehicleIOObject* dwVehicleIOHandle_t;
59 
60 typedef enum dwVehicleIODrivingMode {
65 
69 
73 
76 
80 
81 typedef enum dwVehicleIOType {
87 
88 typedef enum dwVehicleIOFaults {
97 
98 typedef enum dwVehicleIOOverrides {
106 
107 typedef enum dwVehicleIOGear {
109 
110  // Automatic vehicles
116 
117  // Stick shift vehicles
129 
130 typedef enum dwVehicleIOTurnSignal {
137 
138 typedef enum {
143 
144 typedef enum dwVehicleIOMoonroof {
149 
150 typedef enum dwVehicleIOMirror {
157 
158 typedef enum dwVehicleIOHeadlights {
163  DW_VEHICLEIO_HEADLIGHTS_DRL = 4 //DAYTIME RUNNING LIGHTS
165 
166 // AEB - Automatic Emergency Braking System Status to report externally
167 typedef enum dwVehicleIOAEBState {
168  DW_VEHICLEIO_AEB_STATE_UNKNOWN = 0, // System is in an unknown state
169  DW_VEHICLEIO_AEB_STATE_OFF = 1, // System is off
170  DW_VEHICLEIO_AEB_STATE_READY = 2 // System is operational and ready to fire if necessary
172 
173 // FCW - Forward Collision Warning Status to report externally
174 typedef enum dwVehicleIOFCWState {
175  DW_VEHICLEIO_FCW_STATE_UNKNOWN = 0, // System is in an unknown state
176  DW_VEHICLEIO_FCW_STATE_OFF = 1, // System is off
177  DW_VEHICLEIO_FCW_STATE_READY = 2 // System is operational and ready to fire if necessary
179 
180 // CDW - Close Distance Warning Status to report externally
182  DW_VEHICLEIO_CDW_REQUEST_NONE = 0, // no activation
183  DW_VEHICLEIO_CDW_REQUEST_LEVEL_1 = 1, // level 1 warning (short distance)
184  DW_VEHICLEIO_CDW_REQUEST_LEVEL_2 = 2 // level 2 warning (extremely short distance)
186 
187 // BSM - Blind Spot Monitoring Request
188 typedef enum dwVehicleIOBSMRequest {
189  DW_VEHICLEIO_BSM_REQUEST_UNKNOWN = 0, // Unknown request from Blind Spot Monitor
190  DW_VEHICLEIO_BSM_REQUEST_NONE = 1, // No request from Blind Spot Monitor
191  DW_VEHICLEIO_BSM_REQUEST_CONTINUOUS = 2, // Continuous response request from Blind Spot Monitor
192  DW_VEHICLEIO_BSM_REQUEST_FLASHING = 3 // Flashing response request from Blind Spot Monitor
194 
205 
207  DW_VEHICLEIO_LATERAL_ACTUATOR_UNKNOWN = 0, // lateral control actuator interface is unknown
208  DW_VEHICLEIO_LATERAL_STEERING_WHEEL_ANGLE = 1, // uses steering wheel angle for lateral control
209  DW_VEHICLEIO_LATERAL_FRONT_WHEEL_ANGLE = 2, // use front wheel angle for lateral control
210  DW_VEHICLEIO_LATERAL_CURVATURE = 3, // use curvature for lateral control
212 
213 // Lateral ADAS mode
214 // Note: all modes may not be supported depending on vehicle
215 typedef enum dwVehicleIOLatMode {
223 
224 // Longitudinal ADAS mode
225 // Note: all modes may not be supported depending on vehicle
226 typedef enum dwVehicleIOLonMode {
230  DW_VEHICLEIO_LON_MODE_CA = 3, // Collision avoidance
234 
235 // Trailer connected status
242 
243 // Generic struct representing signal quality
248 
252 typedef struct dwStateValueFloat
253 {
256  bool valid;
258 
260 {
261  dwStateValueFloat linearVelocity[3];
262  dwStateValueFloat angularVelocity[3];
263  dwStateValueFloat linearAcceleration[3];
265 
269 typedef struct dwVehicleIOCommand
270 {
271  bool enable;
272 
273  // Steering command
276 
280 
284 
286 
287  // Throttle command - command to the accelerator pedal deflection as a value from 0 to 1
289 
290  // Brake command - command to the brake pedal deflection as a value from 0 to 1
292 
293  // Deceleration command - target deceleration rate for the vehicle. NOTE: Depending on IO driver,
294  // there are potentially multiple ways to command the vehicle - directly with actuator commands
295  // or with targets (deceleration for example) to downstream systems (brake controller).
297 
298  // Acceleration command
301 
302  // Other commands
305 
306  // Clear CAN bus errors
307  bool clearFaults;
308 
309  // Booleans validating commands
311  bool brakeValid;
317  bool gearValid;
326 
327  // AEB signals
328  bool aebRequest;
329  bool dbsRequest;
330  bool holdRequest;
333 
334  // FCW signals
335  bool fcwRequest;
337 
338  // CDW signals
340 
341  uint64_t heartbeatCounter;
342 
343  // High accuracy maneuver
346 
349 
350  // Motion manager feedback
353 
360 
363 
371 
374 
376 {
377 
378  //basic body controls
384  dwVehicleIOLaneDepartureWarningState ldwState;
385  dwVehicleIOLaneDepartureWarningSide ldwSide;
387  //specifically for mirrors
390  //specifically for center console display brightness
392 
393  bool enable;
402 
404 
406 
410 
412 
414 
419 {
424 
428 
434 
436 {
443 
444 typedef struct dwVehicleIOAxleStatus
445 {
451 
458 
462 typedef struct dwVehicleIOState
463 {
467 
470 
475 
477  float32_t frontSteeringAngleCmd;
481 
486 
493 
495  dwTime_t wheelSpeedTimestamp[DW_VEHICLE_NUM_WHEELS];
497  dwTime_t suspensionTimestamp[DW_VEHICLE_NUM_WHEELS];
498 
499  int16_t wheelPosition[DW_VEHICLE_NUM_WHEELS];
500  dwTime_t wheelPositionTimestamp[DW_VEHICLE_NUM_WHEELS];
504 
506 
507  // Vehicle Miscellanoeus data
521  bool doorHood;
522  bool doorTrunk;
528  bool wiper;
534 
539 
540  uint32_t overrides;
541  uint32_t faults;
542 
546 
547  bool enabled;
548 
552 
555 
557 
559 
562 
565 
567 
570 
573 
575  bool brakeActive;
577 
580 
581 #define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 50
582 #define DW_VEHICLEIO_LOW_SPEED_THRESHOLD 4
583 
590 {
600 
608  float32_t frontSteeringSpeedLowSpeedLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES];
610  float32_t frontSteeringAngleLowSpeedLUT[DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES];
616 
617 #ifdef __cplusplus
618 }
619 #endif
620 
621 #endif // DW_VEHICLEIO_LEGACY_STRUCTURES_H_
NVIDIA DriveWorks API: Core Types
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 holdRequest
AEB Hold request (only valid if aebRequest or dbsRequest is true)
float32_t steeringWheelAngleCmd
Last acknowledged steering wheel value from a command (-10.0 to 10.0 +- 0.01rad)
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: Rig Configuration
dwVehicleIOLateralActuatorInterface
bool gearValid
True if setting gear.
bool latAccelerationValid
True if setting lateral acceleration.
The vehicle IO state data.
dwVehicleIODrivingMode drivingMode
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.
Definition: Types.h:294
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.
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)
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)
dwTime_t speedTimestamp
Time at which speed was updated.
int32_t steeringSpeedLUTSize
Size of the corresponding lookup table.
dwVehicleIOLaneChangeFeedbackRequest
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.
float32_t brakeTorqueDriver
Brake torque requested by driver via physical pedal (Nm)
bool steeringWheelTorqueValid
True if setting steering torque.
bool turnSigValid
True if setting turn signal.
bool fcwRequest
Request to activate FCW.
float32_t maxSteeringWheelSpeed
Maximum steering wheel speed of the turning command rad/s.
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.
Safety checks suitable for collision avoidance logic (right now same as NO_SAFETY below)...
dwVehicleIOLatCtrlLoopStatus latCtrlLoopStatus
lateral control loop state
bool steeringWheelValid
True if setting steering wheel steering.
int32_t frontSteeringAngleLowSpeedLUTSize
Size of the corresponding lookup table.
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...
dwVehicleIOCapabilityState capability
Rear wheel angle on road.
bool lonModeValid
True if setting longitudinal function.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
float32_t accSetSpeed
Current ACC Set Speed in m/s.
dwStateValueFloat trailerLoad
Sum of load on all trailer axles [kg].
dwVehicleIOEgoFeedback egomotionResult
bool lonAccelerationValid
True if setting longitudinal acceleration.
bool turnSigValid
True if setting turn signal.
dwVehicleIOLaneChangeFeedbackRequest lcfRequest
Lane change info.
bool throttleEnabled
Throttle by-wire enablement reported by vehicle.
dwVector2f acceleration
Actual acceleration measured in m/s^2.
dwVehicleIOTrailerState trailer
bool brakeActive
True if braking system is actively applying brakes.
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)
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.
VehicleIO Capabilities.
float32_t steeringWheelTorque
Steering wheel torque (0 to 10.0 +- 0.01 Nm)
dwVector2f radarVelocity
Reported velocity from radar unit(s)
dwVehicleIOTurnSignal turnSig
Turn signal value.
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)
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.
float32_t frontSteeringAngle
Desired front wheel steering angle (rad)
float32_t rearSteeringAngle
Desired rear wheel steering angle (rad)
bool aebRequest
Request to activate AEB.
bool enable
True if we are driving by wire. Has to always be set.
dwVehicleIOSignalQuality speedQuality
Speed and velocity signal quality.
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.
Definition: Vehicle.h:307
int32_t frontSteeringSpeedLowSpeedLUTSize
Size of the corresponding lookup table.
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.
int32_t curvatureLUTSize
Size of the corresponding lookup table.
int32_t frontSteeringSpeedLUTSize
Size of the corresponding lookup table.
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.
dwVehicleIOAEBState aebState
AEB system status/state.
bool brakePedalPressed
True if the brake pedal has been pressed (note that the brake system can be active without a pedal pr...
dwStateValueFloat rearWheelAngleMax
The maximum rear wheel angle command that can be guaranteed.
int32_t throttleValueLUTSize
Size of the corresponding lookup table.
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.
dwVehicleIOLatCtrlLoopStatus
bool longitudinalTOR
True if an immediate takeover is needed.
dwStateValueFloat frontWheelAngleMin
The minimum front wheel angle command that can be guaranteed.
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.
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]
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 signal structure capturing data validity and timestamp.
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 dbsRequest
Dynamic brake support request.
dwVehicleIOAxleStatus axles
Same as above, but unsafe commands are clamped to safe limits and warnings are isssued.