1 # Copyright (c) 2019-2021 NVIDIA CORPORATION. All rights reserved.
3 @page rigconfiguration_usecase0 Rig File Format
5 A rig file contains two major fields to define sensors and vehicles, that is,
9 "sensors": [ { sensor I }, { sensor II }, ... ],
10 "vehicle": { vehicle }
17 Each sensor field provides information on each sensor and can be categorized into two types: camera field and non-camera field.
21 Each camera field is an array that describes each specific camera in the sensor suite. The following code snippet shows how the camera field is structured,
24 "name": "camera:front:center:60fov",
25 "nominalSensor2Rig": {
38 "parameter": "camera-name=SF3325,interface=csi-a,link=0,output-format=raw+yuv,fifo-size=1,warn-per-frame=0",
41 "bw-poly": "0.0 0.000545421498827636 -1.6216719633103e-10 -4.64720492990289e-12 2.85224527762934e-16",
46 "car-mask": "camera:front:center:60fov.pgm"
48 "protocol": "camera.gmsl",
63 "data/rle16-base64": "//8BjoABAQAA3QEBBQAA2gEBBwAA2AEBC...",
70 **name**: *camera* : *front* | *rear* : *left* | *center* | *right* : *60fov* | *120fov*
72 **parameter**: [camera parameters](@ref dwx_sensor_enum_sample)
74 **properties**: Properties are stored in name=value pairs and implement properties which are specific for a certain sensor in a generic way. A camera can specify calibration parameters, e.g. the intrinsic parameters, in here.
76 **properties->Model**: *ftheta* | *ocam* | *pinhole*
78 This determines the supported optical camera models, which defines the mapping between optical rays and pixel coordinates. Each model has a separate set of parameters `dwFThetaCameraConfig`, `dwOCamCameraConfig`, `dwPinholeCameraConfig`.
80 **car-mask**: The `car-mask` *property* specifies a (optional) binary image file (currently `.pgm` images are supported) representing a binary mask of the ego-car in the camera image, separating it from the scene. Also, (optional) serialized car mask images are supported, which are represented by a serialization of the binary car mask images in the `car-mask` *field*. A `car-mask` image file property will be converted into a `car-mask` field on rig file serialization, and `car-mask` image file properties always have precedence over serialized car masks (to be able to update them). Car masks are important for, e.g., accurate self-calibration of the given camera.
82 **protocol**: For camera sensors, protocol must be *camera.gmsl*
84 <a name="sensor2Rig"></a>
87 This is the sensor to rig transformation for a camera, and can be represented in two forms,
92 "quaternion": [q_x, q_y, q_z, q_w],
100 "roll-pitch-yaw": [roll, pitch, yaw],
104 This transformation relates the camera and the rig coordinate system to each other, i.e. translation in meters and roll-pitch-yaw in degrees. For example, the origin in camera coordinate system is the position of the camera in rig coordinates. The self-calibration might remove this field, and substitute it with *correction_rig_T* and *correction_sensor_R_FLU* transformations after the calibration.
106 <a name="nominalSensor2Rig"></a>
107 **nominalSensor2Rig**:
109 This is the nominal sensor to rig transformation for a camera, and can be represented in two forms,
114 "quaternion": [q_x, q_y, q_z, q_w],
121 "roll-pitch-yaw": [roll, pitch, yaw],
125 This transformation differs from *sensor2rig* transformation in that it represents a static reference transformation from factory calibration and/or mechanical drawings, whereas *sensor2rig* can change over time.
127 <a name="correction_rig_T"></a>
128 **correction_rig_T**:
130 This shows the corrections in the translation with respect to the *nominalSensor2Rig* transformation, which is estimated and added to the rig file by the self-calibration. The self-calibration saves the translation updates only as,
136 <a name="correction_sensor_R_FLU"></a>
137 **correction_sensor_R_FLU**:
139 This shows the corrections in the rotation with respect to the *nominalSensor2Rig* transformation, which is estimated and added to the rig file by the self-calibration. The self-calibration saves the rotation updates only as,
142 "roll-pitch-yaw": [roll, pitch, yaw],
145 <a name="nominalSensor2Rig_FLU"></a>
146 **nominalSensor2Rig_FLU**:
148 During the self-calibration, *nominalSensor2Rig* transformation is renamed and saved as *nominalSensor2Rig_FLU* without any change in the values as,
151 "roll-pitch-yaw": [roll, pitch, yaw],
155 @note To summarize the self-calibration changes in the rig files,
156 - Rig files before self-calibration: *sensor2Rig* + *nominalSensor2Rig*
157 - Rig files after self-calibration: *correction_sensor_R_FLU* + *correction_rig_T* + *nominalSensor2Rig_FLU*
159 ## 2. Non-Camera Field
161 NVIDIA<sup>®</sup> DriveWorks currently supports the following non-camera sensors:
168 The following code snippet shows an example for the IMU sensor field,
172 "nominalSensor2Rig": {
185 "parameter": "device=/dev/ttyUSBXSENS,baudrate=230400,time-smoothing=true",
187 "protocol": "imu.xsens",
203 The following code snippet shows an example for the GPS sensor field,
207 "correction_rig_T": [
212 "correction_sensor_R_FLU": {
219 "nominalSensor2Rig_FLU": {
231 "parameter": "file=device=/dev/ttyUSBXSENS,baudrate=230400",
233 "protocol": "gps.xsens"
236 **name**: *can* | *gps* | *imu* | *lidar* | *radar*
238 **parameter**: [sensor parameters](@ref dwx_sensor_enum_sample)
242 Properties are stored in name=value pairs and implement properties which are specific for a certain sensor in a generic way. For example, an IMU might store bias values there, etc.
246 - CAN: *can.socket* | *can.aurix*
247 - GPS: *gps.uart* | *gps.xsens*
248 - IMU: *imu.uart* | *imu.xsens*
249 - Lidar: *lidar.socket*
250 - Radar: *radar.socket*
252 **sensor2Rig**: [sensor2Rig transformation](#sensor2Rig)
254 **nominalSensor2Rig**: [nominalSensor2Rig transformation](#nominalSensor2Rig)
256 **correction_rig_T**: [correction_rig_T transformation](#correction_rig_T)
258 **correction_sensor_R_FLU**: [correction_sensor_R_FLU transformation](#correction_sensor_R_FLU)
260 **nominalSensor2Rig_FLU**: [nominalSensor2Rig_FLU transformation](#nominalSensor2Rig_FLU)
264 The following rig snippet shows the vehicle field structure,
271 "corneringStiffness": 0.0,
274 "wheelRadiusLeft": 0.0,
275 "wheelRadiusRight": 0.0
278 "corneringStiffness": 0.0,
281 "wheelRadiusLeft": 0.0,
282 "wheelRadiusRight": 0.0
285 "boundingBoxPosition": [0.0, 0.0, 0.0],
286 "centerOfMass": [0.0, 0.0, 0.0],
288 "inertia": [0.0, 0.0, 0.0],
294 "brakeActuatorTimeConstant": 0.0,
295 "effectiveMass": 0.0,
296 "throttleActuatorTimeConstant": 0.0,
298 "throttlePedalInput": "0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0",
299 "throttleSpeedInput": "0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0",
300 "throttleTorqueOutput": [
301 "0.0, 0.0, 0.0, 0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.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0",
315 "0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0"
317 "brakePedalInput": "0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0",
318 "brakeTorqueOutput": "0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0"
322 "driveByWireTimeConstant": 0.0,
323 "driveByWireTimeDelay": 0.0,
324 "maxSteeringWheelAngle": 0.0,
325 "steeringWheelToSteeringMap": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
328 "pitchDampingRatio": 0.0,
329 "pitchNaturalFrequency": 0.0
337 For the full implementation refer to `dwVehicleGeneric`
341 Vehicle IO field describes Drive-By-Wire interface of a vehicle.
346 "parent-sensor": "can:vehicle",
347 "dbc-file": "AutonomousVehicleCANSignals.dbc"
352 "name": "can:vehicle",
353 "parameter": "device=can0",
354 "protocol": "can.socket",
356 "nominalSensor2Rig": { "quaternion": [ 0.0, 0.0, 0.0, 1.0 ], "t": [ 0.0, 0.0, 0.0 ] },
357 "sensor2Rig": { "quaternion": [ 0.0, 0.0, 0.0, 1.0 ], "t": [ 0.0, 0.0, 0.0 ] }
361 **type**: [Type of a Drive-By-Wire interface.](@ref vehicleio_mainsection)
363 **parent-sensor**: Name of a sensor that is used to communicate with Drive-By-Wire hardware.
365 **dbc-file**: A DBC file for Vehicle IO drivers that require one.
367 For more information, please refer to
368 [Vehicle IO Documentation](@ref vehicleio_mainsection),
369 [Vehicle IO Sample](@ref dwx_vehicleio_sample), and
370 [Vehicle IO Plugin sample](@ref dwx_vehicleio_plugin_sample).