DriveWorks SDK Reference
5.6.215 Release
For Test and Development only

Rig.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2015-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
46#ifndef DW_RIG_RIG_H_
47#define DW_RIG_RIG_H_
48
49#include <dw/core/Config.h>
52#include <dw/core/base/Types.h>
53#include <dw/sensors/Sensors.h>
54#include <dw/rig/Vehicle.h>
55#include <stdint.h>
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
70typedef struct dwRigObject* dwRigHandle_t;
71typedef struct dwRigObject const* dwConstRigHandle_t;
72
74// Calibrated cameras
75
77#define DW_MAX_RIG_CAMERA_COUNT 255U
78
83typedef enum dwCameraModel {
88
92#define DW_PINHOLE_DISTORTION_LENGTH 3U
93
120{
122 uint32_t width;
123
125 uint32_t height;
126
129
132
135
138
145
149#define DW_OCAM_POLY_LENGTH 5U
150
161typedef struct dwOCamCameraConfig
162{
164 uint32_t width;
165
167 uint32_t height;
168
171
174
177
180
183
187
191#define DW_FTHETA_POLY_LENGTH 6U
192
199{
201 uint32_t width;
202
204 uint32_t height;
205
208
211
215
233
241
337{
339 uint32_t width;
340
342 uint32_t height;
343
355
358
366
369
372
381
389
441{
443 uint32_t width;
444
446 uint32_t height;
447
450
453
457
478 dwContextHandle_t const ctx,
479 char8_t const* const configurationFile);
480
499 dwContextHandle_t const ctx,
500 char8_t const* const configurationString,
501 char8_t const* const relativeBasePath);
502
514
526
542dwStatus dwRig_getVehicle(dwVehicle const** const vehicle, dwConstRigHandle_t const obj);
543
558
573dwStatus dwRig_setVehicle(dwVehicle const* const vehicle, dwRigHandle_t const obj);
574
589
602dwStatus dwRig_getVehicleIOConfigCount(uint32_t* const vioConfigCount,
603 dwConstRigHandle_t const obj);
604
616dwStatus dwRig_getSensorCount(uint32_t* const sensorCount,
617 dwConstRigHandle_t const obj);
618
631dwStatus dwRig_getSensorCountOfType(uint32_t* const sensorCount,
632 dwSensorType const sensorType,
633 dwConstRigHandle_t const obj);
634
650dwStatus dwRig_getSensorProtocol(char8_t const** const sensorProtocol,
651 uint32_t const sensorId,
652 dwConstRigHandle_t const obj);
653
667DW_API_PUBLIC dwStatus dwRig_getSensorParameter(char8_t const** const sensorParameter,
668 uint32_t const sensorId,
669 dwConstRigHandle_t const obj);
670
684DW_API_PUBLIC dwStatus dwRig_setSensorParameter(char8_t const* const sensorParameter,
685 uint32_t const sensorId,
686 dwRigHandle_t const obj);
687
705DW_API_PUBLIC dwStatus dwRig_getSensorParameterUpdatedPath(char8_t const** const sensorParameter,
706 uint32_t const sensorId,
707 dwConstRigHandle_t const obj);
708
726 uint32_t const sensorId,
727 dwConstRigHandle_t const obj);
728
745 uint32_t const sensorId,
746 dwConstRigHandle_t const obj);
747
765 uint32_t const sensorId,
766 dwConstRigHandle_t const obj);
767
785 uint32_t const sensorIdFrom,
786 uint32_t const sensorIdTo,
787 dwConstRigHandle_t const obj);
788
807 uint32_t const sensorIdFrom,
808 uint32_t const sensorIdTo,
809 dwConstRigHandle_t const obj);
810
827 uint32_t const sensorId,
828 dwRigHandle_t const obj);
829
844dwStatus dwRig_getSensorName(char8_t const** const sensorName,
845 uint32_t const sensorId,
846 dwConstRigHandle_t const obj);
847
863dwStatus dwRig_getSensorDataPath(char8_t const** const dataPath,
864 uint32_t const sensorId,
865 dwConstRigHandle_t const obj);
866
881dwStatus dwRig_getCameraTimestampPath(char8_t const** const timestampPath,
882 uint32_t const sensorId,
883 dwConstRigHandle_t const obj);
884
902dwStatus dwRig_getSensorPropertyByName(char8_t const** const propertyValue,
903 char8_t const* const propertyName,
904 uint32_t const sensorId,
905 dwConstRigHandle_t const obj);
906
922dwStatus dwRig_addOrSetSensorPropertyByName(char8_t const* const propertyValue,
923 char8_t const* const propertyName,
924 uint32_t const sensorId,
925 dwRigHandle_t const obj);
942dwStatus dwRig_getPropertyByName(char8_t const** const propertyValue,
943 char8_t const* const propertyName,
944 dwConstRigHandle_t const obj);
945
960dwStatus dwRig_addOrSetPropertyByName(char8_t const* const propertyValue,
961 char8_t const* const propertyName,
962 dwRigHandle_t const obj);
963
978dwStatus dwRig_findSensorByName(uint32_t* const sensorId,
979 char8_t const* const sensorName,
980 dwConstRigHandle_t const obj);
996 uint32_t const vehicleIOId,
997 dwConstRigHandle_t const obj);
998
1014dwStatus dwRig_findSensorByTypeIndex(uint32_t* const sensorId,
1015 dwSensorType const sensorType,
1016 uint32_t const sensorTypeIndex,
1017 dwConstRigHandle_t const obj);
1018
1033 uint32_t const sensorId,
1034 dwConstRigHandle_t const obj);
1035
1052 uint32_t const sensorId,
1053 dwConstRigHandle_t const obj);
1054
1070 uint32_t const sensorId,
1071 dwConstRigHandle_t const obj);
1072
1090DW_DEPRECATED("OCam support will be removed from Driveworks in an upcmming release. Use FTheta instead.")
1092 uint32_t const sensorId,
1093 dwConstRigHandle_t const obj);
1094
1114 uint32_t const sensorId,
1115 dwConstRigHandle_t const obj);
1116
1135 uint32_t const sensorId,
1136 dwConstRigHandle_t const obj);
1137
1153 uint32_t const sensorId,
1154 dwRigHandle_t const obj);
1155
1170DW_DEPRECATED("OCam support will be removed from Driveworks in an upcoming release. Use FTheta instead.")
1172 uint32_t const sensorId,
1173 dwRigHandle_t const obj);
1174
1191 uint32_t const sensorId,
1192 dwRigHandle_t const obj);
1193
1209 uint32_t const sensorId,
1210 dwRigHandle_t const obj);
1211
1231dwStatus dwRig_serializeToFile(char8_t const* const configurationFile,
1232 dwConstRigHandle_t const obj);
1233
1234#ifdef __cplusplus
1235}
1236#endif
1237
1239#endif // DW_RIG_RIG_H_
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Vehicle Parameters
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Core Exports
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
#define DW_API_PUBLIC
Definition: Exports.h:54
dwStatus
Status definition.
Definition: Status.h:170
float float32_t
Specifies POD types.
Definition: Types.h:70
Specifies a 3D rigid transformation.
Definition: Types.h:536
uint32_t width
Width of the image (in pixels)
Definition: Rig.h:201
float32_t u0
U coordinate for the principal point (in pixels)
Definition: Rig.h:128
float32_t focalY
Focal length in the Y axis (in pixels)
Definition: Rig.h:137
float32_t v0
V coordinate for the principal point (in pixels)
Definition: Rig.h:131
float32_t v0
V coordinate for the principal point (in pixels)
Definition: Rig.h:173
float32_t backwardsPoly[DW_FTHETA_POLY_LENGTH]
Pixel2ray backward projection polynomial coefficients.
Definition: Rig.h:213
dwFThetaCameraPolynomialType polynomialType
Defines whether the polynomial parameter either map angles to pixel-distances (called forward directi...
Definition: Rig.h:387
uint32_t height
Height of the image (in pixels)
Definition: Rig.h:167
uint32_t width
Width of the image (in pixels)
Definition: Rig.h:122
float32_t distortion[DW_PINHOLE_DISTORTION_LENGTH]
Polynomial coefficients [k_1, k_2, k_3] that allow to map undistored, normalized image coordinates (x...
Definition: Rig.h:143
float32_t focalX
Focal length in the X axis (in pixels)
Definition: Rig.h:134
float32_t u0
U coordinate for the principal point (in pixels)
Definition: Rig.h:449
float32_t u0
U coordinate for the principal point (in pixels)
Definition: Rig.h:170
float32_t v0
V coordinate for the principal point (in pixels)
Definition: Rig.h:210
float32_t poly[DW_OCAM_POLY_LENGTH]
Pixel2ray polynomial coefficients.
Definition: Rig.h:185
float32_t c
Linear pixel transformation matrix coefficient c (top left element) If all c, d, and e are set to 0....
Definition: Rig.h:365
float32_t u0
U coordinate for the principal point (in pixels)
Definition: Rig.h:207
uint32_t height
Height of the image (in pixels)
Definition: Rig.h:342
float32_t d
Linear pixel transformation coefficient d (top right element).
Definition: Rig.h:368
float32_t u0
Principal point coordinates: indicating the horizontal / vertical image coordinates of the principal ...
Definition: Rig.h:354
uint32_t height
Height of the image (in pixels)
Definition: Rig.h:125
uint32_t width
Width of the image (in pixels)
Definition: Rig.h:443
float32_t c
Affine matrix coefficient C.
Definition: Rig.h:176
uint32_t height
Height of the image (in pixels)
Definition: Rig.h:204
float32_t e
Affine matrix coefficient E.
Definition: Rig.h:182
float32_t d
Affine matrix coefficient D.
Definition: Rig.h:179
float32_t v0
V coordinate for the principal point (in pixels)
Definition: Rig.h:452
uint32_t width
Width of the image (in pixels)
Definition: Rig.h:339
float32_t e
Linear pixel transformation coefficient e (bottom left element).
Definition: Rig.h:371
float32_t polynomial[DW_FTHETA_POLY_LENGTH]
Polynomial describing either the mapping of angles to pixel-distances or the mapping of pixel-distanc...
Definition: Rig.h:380
float32_t v0
V coordinate for the principal point (in pixels)
Definition: Rig.h:357
float32_t hFOV
Horizontal FOV (in radians)
Definition: Rig.h:455
uint32_t width
Width of the image (in pixels)
Definition: Rig.h:164
uint32_t height
Height of the image (in pixels)
Definition: Rig.h:446
DW_API_PUBLIC dwStatus dwRig_getSensorName(char8_t const **const sensorName, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the name of a sensor as given in the configuration.
DW_API_PUBLIC dwStatus dwRig_getSensorDataPath(char8_t const **const dataPath, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets path to sensor recording.
DW_API_PUBLIC dwStatus dwRig_setVehicle(dwVehicle const *const vehicle, dwRigHandle_t const obj)
DEPRECATED: Sets the properties of a passenger car vehicle.
DW_API_PUBLIC dwStatus dwRig_setFThetaCameraConfig(dwFThetaCameraConfig const *const config, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the parameters of the FTheta camera model.
DW_API_PUBLIC dwStatus dwRig_getSensorProtocol(char8_t const **const sensorProtocol, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the protocol string of a sensor.
DW_API_PUBLIC dwStatus dwRig_getSensorType(dwSensorType *const sensorType, uint32_t const sensorId, dwConstRigHandle_t const obj)
Returns the type of sensor based upon the sensorID sent into the method.
DW_API_PUBLIC dwStatus dwRig_getNominalSensorToSensorTransformation(dwTransformation3f *const transformation, uint32_t const sensorIdFrom, uint32_t const sensorIdTo, dwConstRigHandle_t const obj)
Gets the nominal sensor to sensor transformation for a pair of sensors.
DW_API_PUBLIC dwStatus dwRig_setPinholeCameraConfig(dwPinholeCameraConfig const *const config, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the parameters of the pinhole camera model.
DW_API_PUBLIC dwStatus dwRig_release(dwRigHandle_t const obj)
Releases the Rig Configuration module.
DW_API_PUBLIC dwStatus dwRig_getPinholeCameraConfig(dwPinholeCameraConfig *const config, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameters of the Pinhole camera model.
DW_API_PUBLIC dwStatus dwRig_initializeFromString(dwRigHandle_t *const obj, dwContextHandle_t const ctx, char8_t const *const configurationString, char8_t const *const relativeBasePath)
Initializes the Rig Configuration module from a string.
DW_API_PUBLIC dwStatus dwRig_getSensorPropertyByName(char8_t const **const propertyValue, char8_t const *const propertyName, uint32_t const sensorId, dwConstRigHandle_t const obj)
Returns property stored inside of a sensor.
DW_API_PUBLIC dwStatus dwRig_getPropertyByName(char8_t const **const propertyValue, char8_t const *const propertyName, dwConstRigHandle_t const obj)
Returns property stored inside of rig.
DW_API_PUBLIC dwStatus dwRig_getSensorToSensorTransformation(dwTransformation3f *const transformation, uint32_t const sensorIdFrom, uint32_t const sensorIdTo, dwConstRigHandle_t const obj)
Gets the sensor to sensor transformation for a pair of sensors.
DW_API_PUBLIC dwStatus dwRig_findSensorIdFromVehicleIOId(uint32_t *const sensorId, uint32_t const vehicleIOId, dwConstRigHandle_t const obj)
Finds a sensor with the given vehicleIO ID and returns the index.
dwCameraModel
Specifies the supported optical camera models.
Definition: Rig.h:83
DW_API_PUBLIC dwStatus dwRig_reset(dwRigHandle_t const obj)
Resets the Rig Configuration module.
DW_API_PUBLIC dwStatus dwRig_findSensorByTypeIndex(uint32_t *const sensorId, dwSensorType const sensorType, uint32_t const sensorTypeIndex, dwConstRigHandle_t const obj)
Finds the absolute sensor index of the Nth sensor of a given type.
DW_API_PUBLIC dwStatus dwRig_getGenericVehicle(dwGenericVehicle *const vehicle, dwConstRigHandle_t const obj)
Gets the properties of a generic vehicle (car or truck).
DW_API_PUBLIC dwStatus dwRig_setFThetaCameraConfigNew(dwFThetaCameraConfigNew const *const config, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the parameters of the FTheta camera model.
struct dwRigObject * dwRigHandle_t
Handle representing the Rig interface.
Definition: Rig.h:70
#define DW_FTHETA_POLY_LENGTH
Defines the number of distortion coefficients for the ftheta camera model.
Definition: Rig.h:191
DW_API_PUBLIC dwStatus dwRig_getNominalSensorToRigTransformation(dwTransformation3f *const transformation, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the nominal sensor to rig transformation for a sensor.
DW_API_PUBLIC dwStatus dwRig_serializeToFile(char8_t const *const configurationFile, dwConstRigHandle_t const obj)
This method serializes the rig-configuration object to a human-readable rig-configuration file.
DW_API_PUBLIC dwStatus dwRig_getSensorToRigTransformation(dwTransformation3f *const transformation, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the sensor to rig transformation for a sensor.
DW_API_PUBLIC dwStatus dwRig_findSensorByName(uint32_t *const sensorId, char8_t const *const sensorName, dwConstRigHandle_t const obj)
Finds the sensor with the given name and returns its index.
DW_API_PUBLIC dwStatus dwRig_getSensorCountOfType(uint32_t *const sensorCount, dwSensorType const sensorType, dwConstRigHandle_t const obj)
Find number of sensors of a given type.
DW_API_PUBLIC dwStatus dwRig_setSensorParameter(char8_t const *const sensorParameter, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the parameter string for a sensor.
DW_API_PUBLIC dwStatus dwRig_getOCamCameraConfig(dwOCamCameraConfig *const config, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameters of the OCam camera model.
DW_API_PUBLIC dwStatus dwRig_getFThetaCameraConfigNew(dwFThetaCameraConfigNew *const config, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameters of the FTheta camera model.
DW_API_PUBLIC dwStatus dwRig_getVehicle(dwVehicle const **const vehicle, dwConstRigHandle_t const obj)
DEPRECATED: Gets the properties of a passenger car vehicle.
DW_API_PUBLIC dwStatus dwRig_getSensorFLUToRigTransformation(dwTransformation3f *const transformation, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the sensor FLU to rig transformation for a sensor.
DW_API_PUBLIC dwStatus dwRig_addOrSetPropertyByName(char8_t const *const propertyValue, char8_t const *const propertyName, dwRigHandle_t const obj)
Overwrite content of an existing rig property.
DW_API_PUBLIC dwStatus dwRig_getSensorCount(uint32_t *const sensorCount, dwConstRigHandle_t const obj)
Gets the number of all available sensors.
DW_API_PUBLIC dwStatus dwRig_initializeFromFile(dwRigHandle_t *const obj, dwContextHandle_t const ctx, char8_t const *const configurationFile)
Initializes the Rig Configuration module from a file.
#define DW_PINHOLE_DISTORTION_LENGTH
Defines the number of distortion coefficients for the pinhole camera model.
Definition: Rig.h:92
DW_API_PUBLIC dwStatus dwRig_getSensorParameterUpdatedPath(char8_t const **const sensorParameter, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameter string for a sensor with any path described by file=,video=,timestamp= property mo...
struct dwRigObject const * dwConstRigHandle_t
Definition: Rig.h:71
dwFThetaCameraPolynomialType
Type of polynomial stored in FTheta.
Definition: Rig.h:226
DW_API_PUBLIC dwStatus dwRig_getCameraTimestampPath(char8_t const **const timestampPath, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets path to camera timestamp file.
DW_API_PUBLIC dwStatus dwRig_setOCamCameraConfig(dwOCamCameraConfig const *const config, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the parameters of the OCam camera model.
DW_API_PUBLIC dwStatus dwRig_setSensorToRigTransformation(dwTransformation3f const *const transformation, uint32_t const sensorId, dwRigHandle_t const obj)
Sets the sensor to rig transformation for a sensor.
#define DW_OCAM_POLY_LENGTH
Defines the number of distortion coefficients for the OCAM camera model.
Definition: Rig.h:149
DW_API_PUBLIC dwStatus dwRig_getFThetaCameraConfig(dwFThetaCameraConfig *const config, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameters of the FTheta camera model.
DW_API_PUBLIC dwStatus dwRig_addOrSetSensorPropertyByName(char8_t const *const propertyValue, char8_t const *const propertyName, uint32_t const sensorId, dwRigHandle_t const obj)
Overwrite content of an existing sensor property.
DW_API_PUBLIC dwStatus dwRig_getCameraModel(dwCameraModel *const cameraModel, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the model type of the camera intrinsics.
DW_API_PUBLIC dwStatus dwRig_getSensorParameter(char8_t const **const sensorParameter, uint32_t const sensorId, dwConstRigHandle_t const obj)
Gets the parameter string for a sensor.
DW_API_PUBLIC dwStatus dwRig_getVehicleIOConfigCount(uint32_t *const vioConfigCount, dwConstRigHandle_t const obj)
Gets the number of vehicle IO sensors.
DW_API_PUBLIC dwStatus dwRig_setGenericVehicle(dwGenericVehicle const *const vehicle, dwRigHandle_t const obj)
Sets the properties of a generic vehicle (car or truck).
@ DW_CAMERA_MODEL_FTHETA
Definition: Rig.h:86
@ DW_CAMERA_MODEL_PINHOLE
Definition: Rig.h:85
@ DW_CAMERA_MODEL_OCAM
Definition: Rig.h:84
@ DW_FTHETA_CAMERA_POLYNOMIAL_TYPE_PIXELDISTANCE_TO_ANGLE
Backward polynomial type, mapping pixel distances (offset from principal point) to angles (angle betw...
Definition: Rig.h:232
@ DW_FTHETA_CAMERA_POLYNOMIAL_TYPE_ANGLE_TO_PIXELDISTANCE
Forward polynomial type, mapping angles (angle between ray and forward direction) to pixel distances ...
Definition: Rig.h:239
DEPRECATED: Configuration parameters for a calibrated FTheta camera.
Definition: Rig.h:199
Configuration parameters for a calibrated FTheta camera.
Definition: Rig.h:337
Vehicle description.
Definition: Vehicle.h:263
DEPRECATED: Configuration parameters for a calibrated ominidirectional (OCam) sphere camera.
Definition: Rig.h:162
Configuration parameters for a calibrated pinhole camera.
Definition: Rig.h:120
Configuration parameters for a calibrated stereographic camera.
Definition: Rig.h:441
DEPRECATED: Properties of a passenger car vehicle.
Definition: Vehicle.h:316
dwSensorType
Defines the type of sensors that are available in DriveWorks.
Definition: Sensors.h:188