1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
3 @page calibration_usecase_vehicle Vehicle Self-Calibration
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
9 NVIDIA<sup>®</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.
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.
15 
19 ### Initialization Requirements
21 - Nominal values on vehicle calibration
22 - steering offset: 0 radian
24 ### Runtime Calibration Dependencies
26 - IMU-based egomotion needs to be based on accurate IMU calibration and odometry properties
28 ### Input Requirements
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
34 ### Output Requirements
36 - Corrected steering offset: less than 0.8 degrees accuracy
38 ## Cross-validation KPI
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.
48 
52 The following code snippet shows the general structure of a program that performs IMU self-calibration
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
59 while(true) // main loop
61 // get current vehicle IO state
62 dwVehicleIO_getVehicleState(&state, ...); // requires vehicle io module
64 // feed vehicle io state into self-calibration
65 dwCalibrationEngine_addVehicleIOState(&state, ...);
67 // retrieve calibration status
68 dwCalibrationEngine_getCalibrationStatus(...);
70 // retrieve self-calibration results
71 dwCalibrationEngine_getVehicleSteeringProperties(...);
74 dwCalibrationEngine_stopCalibration(...);
77 This workflow is demonstrated in the following sample: @ref dwx_vehicle_steering_calibration_sample