DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

tools/preFlightChecker/docs/README.md
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
11 @page pfc Pre-Flight Checker Tool (PFC)
12 @tableofcontents
13 
14 @section pfc_tool_description Description
15 
16 The NVIDIA<sup>&reg;</sup> DriveWorks Pre-Flight Checker tool (PFC) ensures proper operation for all connected
17 sensors, and checks prerequisites before the car can be safely driven
18 autonomously.<br>
19 The PFC can only be used in a stationary car.
20 
21 The PFC checks the following items:
22 - System sanity checks for the NVIDIA DRIVE<sup>&trade;</sup> AV component.
23 - Sensor sanity checks for the front camera, Radar, GPS, IMU, and CAN.
24 - Vehicle sanity checks for the steering, brake, and throttle.
25 
26 You can run PFC in these modes:
27 - **Autonomous vehicle mode**: where PFC validates data from live sensors.
28 - **Bench mode**: where PFC validates data from recorded or live sensors.
29 
30 During installation, PFC is initialized for the current configuration.
31 
32 @note The PFC tool bench validation currently only supports data obtained directly from sensors. It does not support recorded data.
33 
34 @subsection pfc_tool_features Features
35 
36 The Pre-Flight Checker (PFC) tool performs the following in both
37 **autonomous vehicle mode** and **bench mode**:
38 
39 #### Validates the Following Sensors:
40 
41 - Camera sensors with data-validation based on histogram.
42 - CAN sensor-based steering, brake, throttle, and gear.
43 - IMU sensor with timestamp-based data validation (Xsense only).
44 - GPS sensor with timestamp- and DOP-based data validation (Xsense only).
45 - Ethernet Radar sensor.
46 
47 #### Displays the Following Version Information:
48 
49 - DriveWorks and NVIDIA DRIVE<sup>&trade;</sup> AV.
50 - AURIX MCU firmware.
51 - PDK versions.
52 - Provides the status for the disk storage space, including whether it is critically low.
53 
54 #### Performs Data Validation:
55 
56 PFC performs sensor validation by calculating the frequencies for which sensors provide data. It performs data validations specific for the following sensors:
57 
58 - Camera: Ensures the
59  captured data is good and contains valid frames. During camera validation, PFC
60  checks the captured data by examining histograms for RAW frames.<br>
61  It divides the histogram into low, medium, and high percentiles. It then compares the high and
62  low percentiles to ensure they exceed a threshold value, <br>and the mid-percentiles
63  lie within a lower and upper boundary.
64 - IMU: Uses timestamps and IMU frame flag correctness to
65  validate IMU data correctness.
66 - CAN: Uses timely receipt of CAN messages to verify functional
67  steering, brake, throttle, and gear.
68 - GPS: Determines the GPS data correctness based on timestamps, GPS
69  frame flag correctness, and dilution of precision. <br>If multiple GPS sensors are
70  defined, PFC also performs cross validation.
71 
72 @section pfc_tool_prereq Prerequisites
73 
74 This tool is available on NVIDIA DRIVE<sup>&trade;</sup> OS Linux and NVIDIA DRIVE<sup>&trade;</sup> OS QNX.
75 
76 PFC runs on these hardware platforms:
77 - NVIDIA DRIVE<sup>&trade;</sup> AGX Platform:
78  Bench setup with all sensors connected.
79 - NVIDIA DRIVE AGX Platform: In-Car.
80 
81 For information related to the following, see the _NVIDIA DRIVE AV Release Notes_:
82 - Specifications on the supported NVIDIA DRIVE AGX Platform
83 - Software versions that PFC and NVIDIA DRIVE AV use
84 
85 PFC must be installed with NVIDIA DRIVE<sup>&trade;</sup> AV.
86 
87 @subsection pfc_tool_prereq_bench Bench Mode Validation Prerequisites
88 
89 Below are the prerequisites to ensure correct PFC results during **bench mode**
90 validation. In bench mode, sensor data can come from both recordings and sensors.
91 
92 - The GPS sensor must have a clear sky. If PFC is executed in a garage or closed environment, the GPS data-validity may
93  indicate failure.
94 - The Radar sensors must be separated from objects by at least 1-meter. Otherwise, Radar data-validity fails.
95 - All camera and Radar sensors must be exposed to a valid environment. Cameras must:
96  - Be exposed to appropriate lights.
97  - Have a valid, unobstructed view.\n
98  Cameras must not face a static view, e.g., a wall.\n
99  Cameras must not be obstructed by barriers, e.g., trees, cloth, or mud.
100 
101 @subsection pfc_tool_prereq_av Autonomous Vehicle Mode Validation Prerequisites
102 
103 Below are the prerequisites to ensure correct PFC results during **autonomous vehicle mode** validation.
104 
105 - The prerequisites specified in @ref pfc_tool_prereq_bench.
106 - The following must be true, otherwise CAN sanity fails:
107  - Car engine must be ON.
108  - Transmission must be in Park.
109  - Steering wheel must be unlocked.
110 
111 @section pfc_tool_usage Usage
112 
113 Run this tool by navigating to:
114 
115  /usr/local/driveworks/tools/preFlightChecker/config
116 
117 and executing:
118 
119  ./pfc_run.sh
120 
121 @subsection pfc_tool_usage_av For Autonomous Vehicle Mode
122 
123 Run the tool by executing:
124 
125  ./pfc_run.sh --rig=[rig_file_path]
126  --car=[car name]
127  --no-gui
128 
129 For example:
130 
131  ./pfc_run.sh --rig=hyperion-7-1-release.json
132  --car=agx-rel
133  --no-gui
134 
135 For NVIDIA Hyperion 7.1, the config rig file is available at:
136 
137  /usr/local/driveworks/tools/preFlightChecker/config/hyperion7-1-release.json
138 
139 PFC updates the log output as specified in this file. For more information regarding this log, refer to @ref pfc_tool_log_output.
140 
141 
142 
143 @subsection pfc_tool_usage_bench For Bench Mode
144 
145 PFC performs the same checks in bench mode as it does in autonomous vehicle mode. However, CAN devices are unavailable in bench mode. These devices include <br> brake, throttle, gear, and steering. As a result, validation for these devices will always fail.
146 
147 Run the tool by executing:
148 
149  ./pfc_run.sh --rig=[rig_file_path]
150 
151 For example:
152 
153  ./pfc_run.sh --rig=hyperion-7-1-release.json
154 
155 For NVIDIA Hyperion 7.1, the config rig file is available at:
156 
157  /usr/local/driveworks/tools/preFlightChecker/config/hyperion7-1-release.json
158 
159 @section pfc_tool_command_options Command Line Options
160 
161 The following lists the required command line arguments for each mode.
162 
163 @subsection pfc_tool_command_options_av Required Arguments for Autonomous Vehicle Mode
164 
165  --rig=
166  Parameter: --rig=[rig_file_path]
167  Description: The path of the rig.json file specifying each sensor to validate based on the setup configuration.
168  Example: --rig=hyperion7-1-release.json
169 
170  --car=
171  Parameter: --car=[rig_file_path]
172  Description: Identifies the specific vehicle for PFC. For the NVIDIA AGX Platform, set this parameter to `agx-rel`.
173  Default value: bench
174  Example: --car=agx-rel
175 
176 @subsection pfc_tool_command_options_bench Required Arguments for Bench Mode
177 
178  --rig=
179  Parameter: --rig=[rig_file_path]
180  Description: The path of the rig.json file specifying each sensor to validate based on the setup configuration.
181  Example: --rig=hyperion7-1-release.json
182 
183 @subsection pfc_tool_command_options_optional Optional Arguments
184 
185  --no-gui
186  Parameter: --no-gui
187  Description: Disables the PFC GUI, and displays only the result on the console.
188 
189 @subsection pfc_tool_hyperion8 Usage on Hyperion 8 Platform
190 
191 Run this tool by navigating to:
192 
193  /usr/local/driveworks/tools/preFlightChecker/config
194 
195 Execution:
196 
197  python3 hyp8_pfc_run.py --rig, -r [rig_folder_path]
198  --rigname, -rn [rig_folder_name]
199  --autorig, -a
200  --output, -o [output_folder_path]
201  --car, -c [car_designation]
202  --inspection, -i
203 
204 @subsection pfc_tool_command_options_av Arguments for Hyperion 8 Execution
205 
206  --rig
207  Parameter: --rig, -r [rig_folder_path]
208  Description: The path of the rig folder specifying the supported sensors attached to each tegra.
209  Example: --rig /usr/local/driveworks/tools/capture/configs/campaign/hyperion8-protoplus-dc
210 
211  --rigname
212  Parameter: --rigname, -rn [rig_folder_name]
213  Description: The rig folder name specifying the supported sensors attached to the platform.
214  Example: --rigname hyperion8-protoplus-dc
215 
216  --autorig
217  Parameter: --autorig, -a
218  Description: Runs PFC with automatically-selected rigs based on the vehicle BOM ID.
219 
220  --car
221  Parameter: --car, -c [car_designation]
222  Description: The designator for the given car. Used only to seperate outputs of PFC results.
223  Example: --car 27
224 
225  --output
226  Parameter: --output, -o [output_folder_path]
227  Description: Ouput folder to write logs from all tegras. An output file for each tegra will be generated in folder location.
228  Default: /tmp/pfc_logs.
229  Example: --output /home/nvidia/pfc_output
230 
231  --inspection
232  Parameter: --inspection, -i
233  Description: Run automated inspection process. Requires the 'car' argument to be set.
234 
235 @section pfc_tool_log_output Output
236 
237 This is an example of the log output specified in @ref pfc_tool_usage_av. It displays the current sensor status in a sequence of four pages: one **Summary** and three **Detail**.
238 
239 ## Summary
240 
241 Displays a status summary for all sensors. Press the LEFT-ARROW and RIGHT-ARROW keys to navigate between pages.
242 
243 ![PFC Summary](pfc_summary.png)
244 
245 ## Detail
246 
247 Displays a detailed status log with sensor information. The log provides the following information:
248 
249 | Information | Description|
250 |-------------|------------|
251 | SENSOR TYPE | The type of sensor. |
252 | SENSOR NAME | Sensor name and type as specified in rig file, i.e., camera, Lidar, or Radar. This field also displays the sensor position if available. |
253 | INIT | Sensor initialization status. |
254 | DATA-RATE (MP/s) | Rate for which the sensor feeds data to the PFC (in megapixels per second). Applies to camera sensors only. |
255 | FREQUENCY (Hz) | Number of frames available per second (in Hertz). |
256 | DATA-VALIDATE | Status of the data validity check performed on sensors. Possible values are: \n - **VALID**: Sensor provides valid data. \n - **NOT_IMPL**: Support for the specified sensor is not implemented. \n - **NA**: Indicates the attribute does not apply to the sensor. |
257 
258 The following is an example of the detailed status log.
259 
260 ![PFC Detail Table](pfc_detail_table.png)
261 
262 If debug logs are enabled, there is a possibility of CAN Sanity and IMU/GPS data-validity failure. This failure is from the logging latency.
263 
264 For information on how PFC determines data validity, please refer to @ref pfc_tool_features.
265 
266 @section pfc_tool_additional_info Additional Information
267 
268 This section explains how to interpret information in the detailed sensor log.
269 
270 #### If the Sensor Frequency Is Zero
271 
272 The `FREQUENCY` field for a sensor shows a value of zero when data is not available.
273 This can happen even though the sensor is connected properly.<br>
274 These symptoms can be due to:
275 - A weak GPS signal strength.
276 - A blocked Lidar or Radar sensor.
277 
278 #### If the Sensor has an INVALID Status
279 
280 The `DATA-VALIDATE` field for a camera shows `INVALID` when there are issues with
281 the sensor position.
282 
283 - To fix this in bench mode, re-align the camera sensor.
284 - To fix this in autonomous vehicle mode, move the vehicle to a different location.