DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

calibration/engine/docs/usecase_vehicle.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
2 
3 @page calibration_usecase_vehicle Vehicle Self-Calibration
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
6 
7 ## Operating Principle
8 
9 NVIDIA<sup>&reg;</sup> DriveWorks uses vehicle model to calibrate the steering system properities using vehicle odometery and vehicle egomotion measurement and predicted vehicle motion based on vehicle model.
10 
11 ### Steering Offset
12 
13 Vehicle self-calibration supports vehicle steering offset self calibration. The steering offset is the difference between the actual steering and the measured steering angle, and it equals to the negative of the measured steering angle when the vehicle drive straight. The steering offset is calibrated by minimizing the predicted turn curvature based on model and curvature computed based on measurement data. To start the calibration process, the vehicle has to drive above 10 meter per seocnd, perform gradual lane change maneuvers.
14 
15 ![Normalized steering offset q3 (steering offset / wheelbase) (center histogram), and Understeer coefficient (left histogram)collected over a period of time](self_calib_vehicle.png)
16 
17 ## Requirements
18 
19 ### Initialization Requirements
20 
21 - Nominal values on vehicle calibration
22  - steering offset: 0 radian
23 
24 ### Runtime Calibration Dependencies
25 
26 - IMU-based egomotion needs to be based on accurate IMU calibration and odometry properties
27 
28 ### Input Requirements
29 
30 - Assumption: Vehicle performs the aforementioned maneuvers until calibration convergence.
31 - Vehicle egomotion: requirements can be found in the @ref egomotion_mainsection module
32 - Vehicle IO State: requirements can be found in the @ref vehicleio_mainsection VehicleIO
33 
34 ### Output Requirements
35 
36 - Corrected steering offset: less than 0.8 degrees accuracy
37 
38 ## Cross-validation KPI
39 
40 Several hours of data are used to produce a reference calibration value for cross-validation.
41 Then, short periods of data are evaluated for whether they can recover the same values.
42 For example, the graph below shows precision/recall curves of normalized steering offset
43 q3 (q3=steering offset / wheelbase).
44 Precision indicates that an accepted calibration is within a fixed precision threshold
45 from the reference calibration, and recall indicates the ratio of accepted calibrations
46 in the given amount of time.
47 
48 ![](self_calib_vehicle_kpi.png)
49 
50 ## Workflow
51 
52 The following code snippet shows the general structure of a program that performs IMU self-calibration
53 
54 ```{.cpp}
55  dwCalibrationEngine_initialize(...); // depends on sensor from rig configuration module
56  dwCalibrationEngine_initializeVehicle(...); // depends on nominal calibration from rig configuration
57  dwCalibrationEngine_startCalibration(...); // runtime calibration dependencies need to be met
58 
59  while(true) // main loop
60  {
61  // get current vehicle IO state
62  dwVehicleIO_getVehicleState(&state, ...); // requires vehicle io module
63 
64  // feed vehicle io state into self-calibration
65  dwCalibrationEngine_addVehicleIOState(&state, ...);
66 
67  // retrieve calibration status
68  dwCalibrationEngine_getCalibrationStatus(...);
69 
70  // retrieve self-calibration results
71  dwCalibrationEngine_getVehicleSteeringProperties(...);
72  }
73 
74  dwCalibrationEngine_stopCalibration(...);
75 ```
76 
77 This workflow is demonstrated in the following sample: @ref dwx_vehicle_steering_calibration_sample