DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

VehicleIO.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2015-2021 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
46 #ifndef DW_VEHICLEIO_H_
47 #define DW_VEHICLEIO_H_
48 
49 #include <dw/core/Config.h>
50 #include <dw/core/base/Exports.h>
52 #include <dw/core/base/Types.h>
53 #include <dw/sensors/Sensors.h>
54 #include <dw/sensors/canbus/CAN.h>
55 #include <dw/sensors/data/Data.h>
56 #include <dw/rig/Rig.h>
57 
58 #include <stdint.h>
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 typedef struct dwVehicleIOObject* dwVehicleIOHandle_t;
65 
66 typedef enum dwVehicleIODrivingMode {
71 
75 
79 
82 
86 
87 typedef enum dwVehicleIOType {
93 
94 typedef enum dwVehicleIOFaults {
103 
104 typedef enum dwVehicleIOOverrides {
112 
113 typedef enum dwVehicleIOGear {
115 
116  // Automatic vehicles
122 
123  // Stick shift vehicles
135 
136 typedef enum dwVehicleIOTurnSignal {
143 
144 typedef enum {
149 
150 typedef enum dwVehicleIOMoonroof {
155 
156 typedef enum dwVehicleIOMirror {
163 
164 typedef enum dwVehicleIOHeadlights {
169  DW_VEHICLEIO_HEADLIGHTS_DRL = 4 //DAYTIME RUNNING LIGHTS
171 
172 // AEB - Automatic Emergency Braking System Status to report externally
173 typedef enum dwVehicleIOAEBState {
174  DW_VEHICLEIO_AEB_STATE_UNKNOWN = 0, // System is in an unknown state
175  DW_VEHICLEIO_AEB_STATE_OFF = 1, // System is off
176  DW_VEHICLEIO_AEB_STATE_READY = 2 // System is operational and ready to fire if necessary
178 
179 // FCW - Forward Collision Warning Status to report externally
180 typedef enum dwVehicleIOFCWState {
181  DW_VEHICLEIO_FCW_STATE_UNKNOWN = 0, // System is in an unknown state
182  DW_VEHICLEIO_FCW_STATE_OFF = 1, // System is off
183  DW_VEHICLEIO_FCW_STATE_READY = 2 // System is operational and ready to fire if necessary
185 
186 // CDW - Close Distance Warning Status to report externally
188  DW_VEHICLEIO_CDW_REQUEST_NONE = 0, // no activation
189  DW_VEHICLEIO_CDW_REQUEST_LEVEL_1 = 1, // level 1 warning (short distance)
190  DW_VEHICLEIO_CDW_REQUEST_LEVEL_2 = 2 // level 2 warning (extremely short distance)
192 
193 // BSM - Blind Spot Monitoring Request
194 typedef enum dwVehicleIOBSMRequest {
195  DW_VEHICLEIO_BSM_REQUEST_UNKNOWN = 0, // Unknown request from Blind Spot Monitor
196  DW_VEHICLEIO_BSM_REQUEST_NONE = 1, // No request from Blind Spot Monitor
197  DW_VEHICLEIO_BSM_REQUEST_CONTINUOUS = 2, // Continuous response request from Blind Spot Monitor
198  DW_VEHICLEIO_BSM_REQUEST_FLASHING = 3 // Flashing response request from Blind Spot Monitor
200 
202  DW_VEHICLEIO_LATERAL_ACTUATOR_UNKNOWN = 0, // lateral control actuator interface is unknown
203  DW_VEHICLEIO_LATERAL_STEERING_WHEEL_ANGLE = 1, // uses steering wheel angle for lateral control
204  DW_VEHICLEIO_LATERAL_FRONT_WHEEL_ANGLE = 2, // use front wheel angle for lateral control
205  DW_VEHICLEIO_LATERAL_CURVATURE = 3, // use curvature for lateral control
207 
208 // Lateral ADAS mode
209 // Note: all modes may not be supported depending on vehicle
210 typedef enum dwVehicleIOLatMode {
218 
219 // Longitudinal ADAS mode
220 // Note: all modes may not be supported depending on vehicle
221 typedef enum dwVehicleIOLonMode {
225  DW_VEHICLEIO_LON_MODE_CA = 3, // Collision avoidance
229 
230 // Trailer connected status
237 
238 // Generic struct representing signal quality
243 
247 typedef struct dwVehicleIOCommand
248 {
249  bool enable;
250 
251  // Steering command
254 
258 
262 
264 
265  // Throttle command - command to the accelerator pedal deflection as a value from 0 to 1
267 
268  // Brake command - command to the brake pedal deflection as a value from 0 to 1
270 
271  // Deceleration command - target deceleration rate for the vehicle. NOTE: Depending on IO driver,
272  // there are potentially multiple ways to command the vehicle - directly with actuator commands
273  // or with targets (deceleration for example) to downstream systems (brake controller).
275 
276  // Acceleration command
279 
280  // Other commands
283 
284  // Clear CAN bus errors
285  bool clearFaults;
286 
287  // Booleans validating commands
289  bool brakeValid;
295  bool gearValid;
304 
305  // AEB signals
306  bool aebRequest;
309 
310  // FCW signals
311  bool fcwRequest;
313 
314  // CDW signals
316 
317  uint64_t heartbeatCounter;
318 
319  // High accuracy maneuver
322 
325 
327 
334 
337 
345 
348 
350 {
351 
352  //basic body controls
358  dwVehicleIOLaneDepartureWarningState ldwState;
359  dwVehicleIOLaneDepartureWarningSide ldwSide;
361  //specifically for mirrors
364  //specifically for center console display brightness
366 
367  bool enable;
376 
378 
380 
385 
389 typedef struct dwStateValueFloat
390 {
393  bool valid;
395 
400 {
405 
409 
414 
416 {
423 
424 typedef struct dwVehicleIOAxleStatus
425 {
431 
435 typedef struct dwVehicleIOState
436 {
440 
443 
448 
450  float32_t frontSteeringAngleCmd;
454 
459 
466 
468  dwTime_t wheelSpeedTimestamp[DW_VEHICLE_NUM_WHEELS];
470 
471  int16_t wheelPosition[DW_VEHICLE_NUM_WHEELS];
472  dwTime_t wheelPositionTimestamp[DW_VEHICLE_NUM_WHEELS];
476 
478 
479  // Vehicle Miscellanoeus data
493  bool doorHood;
494  bool doorTrunk;
500  bool wiper;
506 
511 
512  uint32_t overrides;
513  uint32_t faults;
514 
518 
519  bool enabled;
520 
524 
527 
529 
531 
536 
538 
541 
545 
546 #define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES 50
547 
554 {
564 
574 
588 dwStatus dwVehicleIO_initialize(dwVehicleIOHandle_t* const obj, dwVehicleIOType const type, const dwVehicle* const properties,
589  dwContextHandle_t const ctx);
603 dwStatus dwVehicleIO_initializeFromDBC(dwVehicleIOHandle_t* const obj, dwVehicleIOType const type, const dwVehicle* const properties,
604  const char* const dbcFilePath, dwContextHandle_t const ctx);
605 
619 dwStatus dwVehicleIO_initializeFromRig(dwVehicleIOHandle_t* const obj,
620  dwConstRigHandle_t const rig,
621  dwContextHandle_t const ctx);
622 
633 dwStatus dwVehicleIO_reset(dwVehicleIOHandle_t const obj);
634 
645 dwStatus dwVehicleIO_release(dwVehicleIOHandle_t const obj);
646 
660 dwStatus dwVehicleIO_selectDriverOverrides(bool const throttleOverride, bool const steeringOverride,
661  bool const brakeOverride, bool const gearOverride,
662  dwVehicleIOHandle_t const obj);
663 
679 dwStatus dwVehicleIO_consumeCANFrame(dwCANMessage const* const msg, uint32_t const sensorId, dwVehicleIOHandle_t const obj);
680 
694 dwStatus dwVehicleIO_consumeDataPacket(const dwDataPacket* const pkt, uint32_t const sensorId, dwVehicleIOHandle_t const obj);
695 
708  dwVehicleIOHandle_t const obj);
709 
722  dwVehicleIOHandle_t const obj);
723 
735 dwStatus dwVehicleIO_getVehicleState(dwVehicleIOState* const state, dwVehicleIOHandle_t const obj);
736 
747 dwStatus dwVehicleIO_getCapabilities(dwVehicleIOCapabilities* const caps, dwVehicleIOHandle_t const obj);
748 
772 dwStatus dwVehicleIO_setDrivingMode(dwVehicleIODrivingMode const mode, dwVehicleIOHandle_t const obj);
773 
787 dwStatus dwVehicleIO_addCANSensor(uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj);
788 
802 dwStatus dwVehicleIO_addDataSensor(uint32_t const vehicleIOId, dwSensorHandle_t const sensorHandle, dwVehicleIOHandle_t const obj);
803 
804 #ifdef __cplusplus
805 }
806 #endif
807 
808 #endif // DW_VehicleIO_ACTUATORS_H_
NVIDIA DriveWorks API: Core Types
bool buttonCruiseControlGapDecrement
Definition: VehicleIO.h:487
uint8_t displayBrightnessValue
Definition: VehicleIO.h:365
dwVehicleIOFCWState
Definition: VehicleIO.h:180
bool buttonCruiseControlOnOff
Definition: VehicleIO.h:480
float32_t maxFrontSteeringSpeed
Maximum front wheel speed of the turning command (rad/s)
Definition: VehicleIO.h:256
dwStateValueFloat frontLoad
Load on front axle [kg].
Definition: VehicleIO.h:426
float32_t ldwSeverity
LDW Warning severity.
Definition: VehicleIO.h:360
bool maxSpeedValid
True if setting speed request.
Definition: VehicleIO.h:301
dwVehicleIODoorLock doorLock
basic lock or unlock
Definition: VehicleIO.h:353
bool buttonCruiseControlIncrement
Definition: VehicleIO.h:484
float32_t steeringWheelAngleCmd
Last acknowledged steering wheel value from a command (-10.0 to 10.0 +- 0.01rad)
Definition: VehicleIO.h:446
dwVehicleIOGear
Definition: VehicleIO.h:113
float32_t value
Definition: VehicleIO.h:391
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: Rig Configuration
dwVehicleIOLateralActuatorInterface
Definition: VehicleIO.h:201
bool buttonLaneAssistOnOff
Definition: VehicleIO.h:488
No warning on any side.
Definition: VehicleIO.h:342
bool gearValid
True if setting gear.
Definition: VehicleIO.h:295
bool latAccelerationValid
True if setting lateral acceleration.
Definition: VehicleIO.h:299
The state data.
Definition: VehicleIO.h:435
dwVehicleIODrivingMode drivingMode
Definition: VehicleIO.h:515
bool buttonCruiseControlGapIncrement
Definition: VehicleIO.h:486
bool mirrorFoldValid
True if setting mirror un/fold.
Definition: VehicleIO.h:371
dwVehicleIOMirror mirrors
FOLD, UNFOLD, ADJUST_LEFT, ADJUST_RIGHT.
Definition: VehicleIO.h:355
dwVehicleIOTurnSignal
Definition: VehicleIO.h:136
float32_t throttleValue
Current thottle value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed...
Definition: VehicleIO.h:455
bool prefillRequest
Request to activate prefill.
Definition: VehicleIO.h:307
float32_t latAccelerationValue
lateral acceleration (m/s^2)
Definition: VehicleIO.h:278
bool latModeValid
True if setting lateral function.
Definition: VehicleIO.h:302
float32_t maxSpeed
Maximum allowed speed to support remaining distance request (m/s)
Definition: VehicleIO.h:321
dwStateValueFloat rearWheelAngle
Definition: VehicleIO.h:528
Defines a two-element single-precision floating-point vector.
Definition: Types.h:291
bool mirrorAdjustValid
True if setting mirror adjustment.
Definition: VehicleIO.h:372
dwVehicleIOHeadlights
Definition: VehicleIO.h:164
bool decelerationValid
True if setting deceleration.
Definition: VehicleIO.h:297
The command data.
Definition: VehicleIO.h:247
dwVehicleIOCDWRequestType cdwRequest
Request to activate CDW.
Definition: VehicleIO.h:315
dwVehicleIOLatMode
Definition: VehicleIO.h:210
int32_t steeringWheelAngleLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:562
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
Definition: VehicleIO.h:402
float32_t brakeCmd
Last acknowledged brake value from a command (0..1 +- 0.01 fraction of max pedal depressed, unitless)
Definition: VehicleIO.h:461
int32_t brakeValueLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:556
float32_t speed
Signed norm of velocity vector.
Definition: VehicleIO.h:438
uint64_t heartbeatCounter
VIO command heartbeat.
Definition: VehicleIO.h:317
float32_t steeringWheelAngle
Steering wheel angle (-10.0 to 10.0 +- 0.01rad)
Definition: VehicleIO.h:445
float32_t brakeTorqueActual
Actual applied brake torque value (Nm)
Definition: VehicleIO.h:464
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.
Definition: VehicleIO.h:412
float32_t steeringWheelTorque
Additional steering wheel torque request (Nm).
Definition: VehicleIO.h:257
float32_t lonAccelerationValue
longitudinal acceleration (m/s^2)
Definition: VehicleIO.h:277
dwVehicleIOMoonroof
Definition: VehicleIO.h:150
dwStateValueFloat driverLoad
Load on driver axle [kg].
Definition: VehicleIO.h:428
float32_t brakeTorqueRequested
Requested value of brake torque (Nm)
Definition: VehicleIO.h:463
NVIDIA DriveWorks API: Data
bool passengerDetect
Definition: VehicleIO.h:495
dwTime_t speedTimestamp
Time at which speed was updated.
Definition: VehicleIO.h:439
int32_t steeringSpeedLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:560
bool moonroofValid
True if setting moonroof movement.
Definition: VehicleIO.h:370
dwVehicleIOOverrides
Definition: VehicleIO.h:104
dwVehicleIOBSMRequest bsmRightRequest
Request corresponding to the right visual warning.
Definition: VehicleIO.h:382
float32_t rearAxleCurvature
Path curvature [1/m].
Definition: VehicleIO.h:525
dwVehicleIODrivingMode
Definition: VehicleIO.h:66
bool bucklePassenger
Definition: VehicleIO.h:498
dwStateValueFloat articulationAngle
Yaw articulation angle between truck and trailer measured at rear axle [rad] Angle measured as descri...
Definition: VehicleIO.h:418
bool passengerAirbag
Definition: VehicleIO.h:496
dwVehicleIOLaneDepartureWarningSide ldwSide
LDW Warning side of ego lane- left/right.
Definition: VehicleIO.h:359
dwVehicleIOTrailerConnectedStatus
Definition: VehicleIO.h:231
float32_t throttleState
Throttle value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless) ...
Definition: VehicleIO.h:457
dwVehicleIOGear gear
Desired gear: 0=UNKNOWN, 1=PARK, 2=REVERSE, 3=NEUTRAL, 4=DRIVE.
Definition: VehicleIO.h:281
uint32_t overrides
Overrides in place (0 = none). Flags defined in dwVehicleIOOverrides.
Definition: VehicleIO.h:512
dwTime_t timestamp
Definition: VehicleIO.h:392
Count of LDW warning sides.
Definition: VehicleIO.h:346
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.
Definition: VehicleIO.h:292
bool turnSigValid
True if setting turn signal.
Definition: VehicleIO.h:296
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:84
dwVehicleIOFaults
Definition: VehicleIO.h:94
bool fcwRequest
Request to activate FCW.
Definition: VehicleIO.h:311
dwStatus
Status definition.
Definition: Status.h:180
NVIDIA DriveWorks API: Sensors
dwVehicleIOBSMRequest
Definition: VehicleIO.h:194
float32_t maxSteeringWheelSpeed
Maximum steering wheel speed of the turning command rad/s.
Definition: VehicleIO.h:253
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.
Definition: VehicleIO.h:331
float32_t rearAxleCurvatureMax
The tightest radius (left) that can be guaranteed.
Definition: VehicleIO.h:406
dwTime_t throttleTimestamp
Time at which throttle was updated.
Definition: VehicleIO.h:458
float32_t rearAxleCurvatureMin
The tightest radius (right) that can be guaranteed.
Definition: VehicleIO.h:407
dwVehicleIOFCWState fcwState
FCW system status/state.
Definition: VehicleIO.h:312
bool remainingDistanceValid
True if setting remaining distance.
Definition: VehicleIO.h:300
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)...
Definition: VehicleIO.h:78
Driving mode is not valid.
Definition: VehicleIO.h:84
bool steeringWheelValid
True if setting steering wheel steering.
Definition: VehicleIO.h:290
dwTime_t engineSpeedTimestamp
engine speed timestamp[us]
Definition: VehicleIO.h:534
float32_t inverseSteeringR
Inverse turning radius of the vehicle on the road.
Definition: VehicleIO.h:449
bool steeringEnabled
Steering by-wire enablement reported by vehicle.
Definition: VehicleIO.h:523
dwVehicleIOBSMRequest bsmLeftRequest
Request corresponding to the left visual warning.
Definition: VehicleIO.h:381
float32_t longVelocityForwardMin
A minimum positive longitudinal vehicle speed, when driving forward, to avoid burning the clutch...
Definition: VehicleIO.h:401
bool buttonLeftKeypadDown
Definition: VehicleIO.h:503
dwVehicleIOCapabilityState capability
Rear wheel angle on road.
Definition: VehicleIO.h:530
bool lonModeValid
True if setting longitudinal function.
Definition: VehicleIO.h:303
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
float32_t accSetSpeed
Current ACC Set Speed in m/s.
Definition: VehicleIO.h:377
dwTime_t rearAxleCurvatureCapabilityTimestamp
Definition: VehicleIO.h:408
dwStateValueFloat trailerLoad
Sum of load on all trailer axles [kg].
Definition: VehicleIO.h:429
dwVehicleIOLonMode lonMode
Definition: VehicleIO.h:324
bool lonAccelerationValid
True if setting longitudinal acceleration.
Definition: VehicleIO.h:298
Holds a data packet.
Definition: Data.h:60
bool turnSigValid
True if setting turn signal.
Definition: VehicleIO.h:375
bool throttleEnabled
Throttle by-wire enablement reported by vehicle.
Definition: VehicleIO.h:522
dwVehicleIOAEBState
Definition: VehicleIO.h:173
dwVector2f acceleration
Actual acceleration measured in m/s^2.
Definition: VehicleIO.h:441
dwVehicleIOTrailerState trailer
Definition: VehicleIO.h:542
struct dwRigObject const * dwConstRigHandle_t
Definition: Rig.h:71
dwTime_t brakeTimestamp
Time at which brake was updated.
Definition: VehicleIO.h:465
dwVehicleIOLaneDepartureWarningState ldwState
LDW Warning state- on/off.
Definition: VehicleIO.h:358
float32_t fuelLevel
(0 to 1 +- 0.01 fraction of tank volume, unitless)
Definition: VehicleIO.h:507
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.
Definition: VehicleIO.h:293
float32_t frontSteeringAngle
Same as inverseSteeringR described as an angle instead of radius [rad].
Definition: VehicleIO.h:453
bool rearSteeringValid
True if setting rear wheel steering.
Definition: VehicleIO.h:294
VehicleIO Capabilities.
Definition: VehicleIO.h:553
float32_t steeringWheelTorque
Steering wheel torque (0 to 10.0 +- 0.01 Nm)
Definition: VehicleIO.h:447
bool highBeamHeadlights
Definition: VehicleIO.h:499
dwVector2f radarVelocity
Reported velocity from radar unit(s)
Definition: VehicleIO.h:532
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.
Definition: VehicleIO.h:282
dwTime_t longVelocityForwardMaxTimestamp
Definition: VehicleIO.h:404
float32_t brakeValue
Current brake value as requested by a driver (0..1 +- 0.01 fraction of max pedal depressed, unitless)
Definition: VehicleIO.h:460
int32_t minAccelerationLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:571
bool throttleValid
True if setting throttle.
Definition: VehicleIO.h:288
dwVehicleIOBSMRequest bsmAudioRequest
Request corresponding to the audio warning.
Definition: VehicleIO.h:383
float32_t steeringWheelAngle
Desired steering wheel angle (rad)
Definition: VehicleIO.h:252
dwVehicleIOLatMode latMode
Definition: VehicleIO.h:323
float32_t brakeState
Brake value in effect (0..1 +- 0.01 fraction of max pedal depressed, unitless)
Definition: VehicleIO.h:462
#define DW_VEHICLEIO_SPEED_LUT_MAX_ENTRIES
Definition: VehicleIO.h:546
dwVehicleIOHeadlights headlights
ON/OFF, LOW_BEAM, HIGH_BEAM, DRL.
Definition: VehicleIO.h:356
bool buttonCruiseControlResetCancel
Definition: VehicleIO.h:483
float32_t frontSteeringAngle
Desired front wheel steering angle (rad)
Definition: VehicleIO.h:255
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)
Definition: VehicleIO.h:263
bool aebRequest
Request to activate AEB.
Definition: VehicleIO.h:306
Warning on the left side.
Definition: VehicleIO.h:343
bool enable
True if we are driving by wire. Has to always be set.
Definition: VehicleIO.h:249
dwVehicleIOSignalQuality speedQuality
Speed and velocity signal quality.
Definition: VehicleIO.h:540
NVIDIA DriveWorks API: CAN
dwStateValueFloat pusherLoad
Load on pusher axle [kg].
Definition: VehicleIO.h:427
dwVehicleIOTurnSignal turnSignal
Turn signal value.
Definition: VehicleIO.h:510
float32_t throttleValue
range 0.0 to 1.0
Definition: VehicleIO.h:266
float32_t mirrorAdjustX
float value 0-5.0 seconds
Definition: VehicleIO.h:362
Comfortable driving is expected (most conservative).
Definition: VehicleIO.h:70
bool clearFaults
Setting > 0 clears any canbus faults/errors.
Definition: VehicleIO.h:285
dwVehicleIOGear gearCmd
Last acknowledged gear from a command.
Definition: VehicleIO.h:509
dwStateValueFloat mass
Total mass of vehicle [kg].
Definition: VehicleIO.h:539
uint32_t faults
Faults detected (0 = none). Flags defined in dwVehicleIOFaults.
Definition: VehicleIO.h:513
Number of wheels describing the vehicle.
Definition: Vehicle.h:298
float32_t brakeValue
range 0.0 to 1.0
Definition: VehicleIO.h:269
dwVehicleIOLatMode latMode
Definition: VehicleIO.h:516
float32_t reverseSpeedLimit
Normally a negative value (m/s)
Definition: VehicleIO.h:555
bool displayBrightnessValid
True if setting display brightness.
Definition: VehicleIO.h:374
bool buttonCruiseControlDecrement
Definition: VehicleIO.h:485
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
dwVehicleIOCDWRequestType
Definition: VehicleIO.h:187
NVIDIA DriveWorks API: Core Methods
int32_t frontSteeringSpeedLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:565
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...
Definition: VehicleIO.h:456
struct dwVehicleIOObject * dwVehicleIOHandle_t
Definition: VehicleIO.h:64
dwTime_t accelerationTimestamp
Time at which acceleration was updated.
Definition: VehicleIO.h:442
Warning on the right side.
Definition: VehicleIO.h:344
dwVehicleIOAEBState aebState
AEB system status/state.
Definition: VehicleIO.h:308
bool buttonLeftKeypadOk
Definition: VehicleIO.h:501
dwStateValueFloat rearWheelAngleMax
The maximum rear wheel angle command that can be guaranteed.
Definition: VehicleIO.h:411
int32_t throttleValueLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:558
bool buttonCruiseControlCancel
Definition: VehicleIO.h:482
bool doorLockValid
True if setting door locks.
Definition: VehicleIO.h:369
bool brakeValid
True if setting break.
Definition: VehicleIO.h:289
dwVehicleIODoorLock
Definition: VehicleIO.h:144
dwVehicleIOMirror
Definition: VehicleIO.h:156
float32_t decelerationValue
decleration m/s^2 - represented as a positive number
Definition: VehicleIO.h:274
dwVehicleIOGear gear
Vehicle gear.
Definition: VehicleIO.h:508
dwVector2f velocity
Vehicle velocity (longitudinal, lateral) measured in m/s at the rear axle.
Definition: VehicleIO.h:437
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.
dwVehicleIOLonMode
Definition: VehicleIO.h:221
bool longitudinalTOR
True if an immediate takeover is needed.
Definition: VehicleIO.h:379
bool headlightsValid
True if setting headlights.
Definition: VehicleIO.h:373
dwVehicleIOTurnSignal turnSig
Turn signal - misc also wants this.
Definition: VehicleIO.h:357
dwVehicleIOSignalQuality
Definition: VehicleIO.h:239
dwVehicleIOLonMode lonMode
Definition: VehicleIO.h:517
bool frontSteeringValid
True if setting front wheel steering.
Definition: VehicleIO.h:291
dwVehicleIOType
Definition: VehicleIO.h:87
float32_t rearAxleCurvatureValue
Path curvature request based on travelled distance (1/m)
Definition: VehicleIO.h:261
bool buttonTimeGapCycle
Definition: VehicleIO.h:504
VehicleIO will bypass all safety checks.
Definition: VehicleIO.h:81
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.
Definition: VehicleIO.h:410
#define DW_API_PUBLIC
Definition: Exports.h:54
float32_t remainingDistance
Desired longitudinal offset from current position (m)
Definition: VehicleIO.h:320
The capability state data.
Definition: VehicleIO.h:399
dwStateValueFloat mass
Total mass of trailer unit [kg].
Definition: VehicleIO.h:417
dwTime_t steeringTimestamp
Time at which steering was updated.
Definition: VehicleIO.h:444
dwVehicleIOMoonroof moonroof
basic open or close
Definition: VehicleIO.h:354
dwTime_t rearAxleCurvatureTimestamp
Timestamp for all motion signals.
Definition: VehicleIO.h:526
dwStateValueFloat outsideTemperature
outside temperature [degrees C]
Definition: VehicleIO.h:537
Holds a CAN package.
Definition: CAN.h:112
dwTime_t radarVelocityTimestamp
Definition: VehicleIO.h:533
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.
Definition: VehicleIO.h:567
float32_t longVelocityForwardMax
A maximum positive longitudinal vehicle speed that the vehicle is designed for.
Definition: VehicleIO.h:403
int32_t maxAccelerationLUTSize
Size of the corresponding lookup table.
Definition: VehicleIO.h:569
Generic state field structure capturing data validity and timestamp.
Definition: VehicleIO.h:389
DEPRECATED: Properties of a passenger car vehicle.
Definition: Vehicle.h:306
float32_t mirrorAdjustY
float value 0-5.0 seconds
Definition: VehicleIO.h:363
float32_t engineSpeed
engine rpm speed [RPM]
Definition: VehicleIO.h:535
dwVehicleIOLaneDepartureWarningSide
Driveworks LDW sides with respect to the ego lane.
Definition: VehicleIO.h:341
bool brakeEnabled
Brake by-wire enablement reported by vehicle.
Definition: VehicleIO.h:521
bool buttonCruiseControlReset
Definition: VehicleIO.h:481
bool buttonLeftKeypadUp
Definition: VehicleIO.h:502
NVIDIA DriveWorks API: Core Exports
dwVehicleIOAxleStatus axles
Definition: VehicleIO.h:543
Same as above, but unsafe commands are clamped to safe limits and warnings are isssued.
Definition: VehicleIO.h:74