DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Accessing Vehicle Properties and Sensors From a Rig File
SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

The following code snippets shows the general structure of a program that uses a rig configuration and enumerate / query sensor properties.
The rig module can be initialized from a rig file:

dwContextParameters contextParams{};
dwInitialize(&contextHandle, DW_VERSION, &contextParams);
dwRig_initializeFromFile(&rigHandle, contextHandle, rigconfigFilename);

Afterwards we can easily access the vehicle properties:

dwVehicle const* vehicle;
dwRig_getVehicle(&vehicle, rigHandle);

As well as all sensors contained in the file:

dwRig_getSensorCount(&sensorCount, ...);
for(uint32_t sensorID; sensorID < sensorCount; ++sensorID)
dwRig_getSensorProtocol(&sensorProtocol, sensorID, rigHandle);
dwRig_getSensorParameter(&sensorParameter, sensorID, rigHandle);
dwRig_getSensorName(&sensorName, sensorID, rigHandle);
dwRig_getNominalSensorToRigTransformation(&transformation, sensorID, rigHandle);
dwRig_getSensorToRigTransformation(&transformation, sensorID, rigHandle);

Finally we can release all handles:


For the full implementation refer to Rig Configuration Sample