Before you use any sensor in NVIDIA® DriveWorks, you must create an instance of the sensor, then use a start-stop mechanism to collect data and finally release the sensor so all resources are freed.
The following functions support the life cycle shown above:
Here is an example of initialization of a virtual camera for video replay and its release:
Once the sensor has started, it is possible to consume the data being acquired by using generic or specialized accessors.
Generic accessors are used mainly for serialization purposes as they provide raw sensor data. The available function calls are dwSensor_readRawData()
to get access to the data memory pointers and dwSensor_returnRawData()
to return the pointers back to the sensor abstraction layer. A full workflow based on raw data use is demonstrare in Simple Sensor Recording Sample.
To access processed data one needs to use specialized function calls that will provide the data formatted appropriately depending on the sensor type. For all details on specific sensors see:
After usage the sensor, SAL and SDK handle must be released.