DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

src/dw/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 ## Operating Principle
6 
7 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.
8 
9 ### Steering Offset
10 
11 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.
12 
13 ![Normalized steering offset q3 (steering offset / wheelbase) (center histogram), and Understeer coefficient (left histogram)collected over a period of time](self_calib_vehicle.png)
14 
15 ## Requirements
16 
17 ### Initialization Requirements
18 
19 - Nominal values on vehicle calibration
20  - steering offset: 0 radian
21 
22 ### Runtime Calibration Dependencies
23 
24 - IMU-based egomotion needs to be based on accurate IMU calibration and odometry properties
25 
26 ### Input Requirements
27 
28 - Assumption: Vehicle performs the aforementioned maneuvers until calibration convergence.
29 - Vehicle egomotion: requirements can be found in the @ref egomotion_mainsection module
30 - Vehicle IO State: requirements can be found in the @ref vehicleio_mainsection VehicleIO
31 
32 ### Output Requirements
33 
34 - Corrected steering offset: less than 0.8 degrees accuracy
35 
36 ## Cross-validation KPI
37 
38 Several hours of data are used to produce a reference calibration value for cross-validation.
39 Then, short periods of data are evaluated for whether they can recover the same values.
40 For example, the graph below shows precision/recall curves of normalized steering offset
41 q3 (q3=steering offset / wheelbase).
42 Precision indicates that an accepted calibration is within a fixed precision threshold
43 from the reference calibration, and recall indicates the ratio of accepted calibrations
44 in the given amount of time.
45 
46 ![](self_calib_vehicle_kpi.png)
47 
48 ## Workflow
49 
50 The following code snippet shows the general structure of a program that performs IMU self-calibration
51 
52 ```{.cpp}
53  dwCalibrationEngine_initialize(...); // depends on sensor from rig configuration module
54  dwCalibrationEngine_initializeVehicle(...); // depends on nominal calibration from rig configuration
55  dwCalibrationEngine_startCalibration(...); // runtime calibration dependencies need to be met
56 
57  while(true) // main loop
58  {
59  // get current vehicle IO state
60  dwVehicleIO_getVehicleState(&state, ...); // requires vehicle io module
61 
62  // feed vehicle io state into self-calibration
63  dwCalibrationEngine_addVehicleIOState(&state, ...);
64 
65  // retrieve calibration status
66  dwCalibrationEngine_getCalibrationStatus(...);
67 
68  // retrieve self-calibration results
69  dwCalibrationEngine_getVehicleSteeringProperties(...);
70  }
71 
72  dwCalibrationEngine_stopCalibration(...);
73 ```
74 
75 This workflow is demonstrated in the following sample: @ref dwx_vehicle_steering_calibration_sample