1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page time_usecase1 Get Time Synchronized Data
4 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
6 #### Get time synchronized lidar packets from live lidar sensor
9 dwSAL_initialize(&sal, sdk);
11 dwSensorHandle_t timeSensor = DW_NULL_HANDLE;
12 dwSensorHandle_t lidarSensor = DW_NULL_HANDLE;
14 dwSensorParams lidarParams;
15 lidarParams.parameters = "ip=192.168.3.43,port=2368,device=VELO_HDL64E,scan-frequency=10.0";
16 lidarParams.protocol = "lidar.socket";
17 dwSAL_createSensor(&lidarSensor, lidarParams, sal);
19 dwSensorParams timeParams;
20 timeParams.parameters = "nvpps-device=/dev/nvpps0,reference-type=NOVATEL_CAN,can-device=can0";
21 timeParams.protocol = "time.nvpps";
22 dwSAL_createSensor(&timeSensor, timeParams, sal);
24 dwSensor_start(timeSensor);
25 dwSensor_start(lidarSensor);
28 dwSensorLidar_readPacket(...);
30 // CODE: use the time synchronized lidar packets for other tasks
32 dwSensorLidar_returnPacket(...);
36 dwSAL_releaseSensor(&timeSensor);
37 dwSAL_releaseSensor(&lidarSensor);
41 This can also be done with sensor recordings. For example, we can modify the example above with the following parameters to reference recorded data.
44 lidarParams.parameters = "file=lidar_recording.bin";
45 lidarParams.protocol = "lidar.virtual";
47 timeParams.parameters = "file=time_recording.bin";
48 timeParams.protocol = "time.virtual";
51 For more details see @ref dwx_time_sensor_sample