DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Replaying Sensors
Note
SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

To replay sensor data from the NVIDIA® DriveWorks recording, you can use the same APIs introduced earlier for creating a virtual sensor object.
For example to replay a camera recording:

dwSensorParams sensorParams{};
sensorParams.protocol = "camera.virtual";
std::string file = "video=/location/to/the/recording";
sensorParams.parameters = file.c_str();

Every sensor can be initialized as a virtual sensors and the parameters can be used to point to the location of the recording. Virtual sensors can be created, started and used like real sensors:

dwSAL_createSensor(&sensorHandle, sensorParams, SALhandle);
dwSensor_start(sensorHandle);
dwSensorCamera_readFrame() // for a different sensor replace "Camera" with your sensor
dwSensorCamera_returnFrame() // for a different sensor replace "Camera" with your sensor

To easily replay sensor data:

  1. Try the default compiled samples with predefined sensor input data
  2. Change the input parameter of the samples to the data you want to replay. The data should be collected by the recording tools in DriveWorks. (Each sensor sample has a detailed README for usage and explanation)
  3. Read the sample codes for how to use DriveWorks APIs to replay data as virtual sensors. Read the API definition of each sensor type for details
  4. Start to use DriveWorks APIs in the targeted application and platforms

For sensors specific example see: