About This Module
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® DriveWorks accuracy. The particular properties of a rig, which are represented by a rig configuration, are measured and estimated by a calibration process.
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. Rig configuration files can also be serialized by the module.
An example of the JSON structure of a rig configuration file is given below.
{
"rig": {
"sensors": [
{...}, ...
],
"vehicle": {
"valid" : true,
"value" : {
"axleFront": {...},
"axleRear": {...},
"body": {...},
"actuation": {...},
"suspension": {...},
"hasCabin": false,
"numTrailers": 0,
}
}
},
"version" : 7
}
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()
).
Camera Rig and Camera Models
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()
).
The supported calibrated camera models are pinhole, OCam, and FTheta. Their calibration parameters are specified with the dwPinholeCameraConfig
, 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 Intrinsic Camera Models for details).
Relevant Tutorials
APIs