DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

src/dw/rig/doc_public/mainsection.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020 NVIDIA CORPORATION. All rights reserved.
2 
3 @page rig_mainsection Rig Configuration
4 
5 ## About This Module
6 
7 The car is considered a rig with several rigidly-attached sensors. The dimensions of the car and the positions and orientations of these sensors relative to the car are important to NVIDIA<sup>&reg;</sup> DriveWorks accuracy. The particular properties of a rig, which are represented by a rig configuration, are measured and estimated by a calibration process.
8 
9 The rig configuration module allows reading and enumerating of these pre-calibrated properties. The module obtains the rig configuration from a rig configuration file generated by the DriveWorks calibration tool. For more information, see DriveWorks Calibration Tool Application Note in the doc/pdf/calibration folder of this release.
10 Rig configuration files can also be serialized by the module.
11 
12 An example of the JSON structure of a rig configuration file is given below.
13 ```
14 {
15  "rig": {
16  "sensors": [
17  {...}, ...
18  ],
19  "vehicle": {
20  "valid" : true,
21  "value" : {
22  "axleFront": {...},
23  "axleRear": {...},
24  "body": {...},
25  "actuation": {...},
26  "suspension": {...},
27  "hasCabin": false,
28  "numTrailers": 0,
29  }
30  }
31  },
32  "version" : 7
33 }
34 ```
35 A rig configuration object (`::dwRigHandle_t`) can be initialized either from a file or directly from string (see `dwRig_initializeFromFile()`). Once the rig configuration is loaded successfully, individual properties of the rig and it's sensors can be queried. Vehicle properties are represented by the dwVehicle struct (see `dwRig_getVehicle()`). Generic sensor properties can be obtained through the function `dwRig_getSensorXXX`. Some sensors may have more specific properties, which can be obtained using dedicated functions, like the calibrated camera model (for example see `dwRig_getPinholeCameraConfig()`).
36 
37 ### Camera Rig and Camera Models
38 
39 A number of modules use a camera-only rig that contains only rigidly-attached calibrated cameras (`::dwCameraModelHandle_t`). This camera rig is a subset of the generic rig. It can be initialized independently or directly from a generic rig configuration (see `dwRig_initializeFromFile()`).
40 
41 The supported calibrated camera models are pinhole, OCam, and FTheta. Their calibration parameters are specified with the `dwPinholeCameraConfig`, `::dwOCamCameraConfig`, and `::dwFThetaCameraConfig` structs, respectively. For each of these camera models, DriveWorks provides generic `dwCameraModel_pixel2Ray()` and `dwCameraModel_ray2Pixel()` functions to transform a point from image space to camera space and vice versa (see @ref cameramodel_mainsection for details).
42 
43 ## Relevant Tutorials
44 
45 - @ref rigconfiguration_usecase0
46 - @ref rigconfiguration_usecase1
47 
48 ## APIs
49 
50 - @ref rig_configuration_group
51 - @ref cameramodel_group
52