1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page time_usecase1 Get Time Synchronized Data
5 #### Get time synchronized lidar packets from live lidar sensor
8 dwSAL_initialize(&sal, sdk);
10 dwSensorHandle_t timeSensor = DW_NULL_HANDLE;
11 dwSensorHandle_t lidarSensor = DW_NULL_HANDLE;
13 dwSensorParams lidarParams;
14 lidarParams.parameters = "ip=192.168.3.43,port=2368,device=VELO_HDL64E,scan-frequency=10.0";
15 lidarParams.protocol = "lidar.socket";
16 dwSAL_createSensor(&lidarSensor, lidarParams, sal);
18 dwSensorParams timeParams;
19 timeParams.parameters = "nvpps-device=/dev/nvpps0,reference-type=NOVATEL_CAN,can-device=can0";
20 timeParams.protocol = "time.nvpps";
21 dwSAL_createSensor(&timeSensor, timeParams, sal);
23 dwSensor_start(timeSensor);
24 dwSensor_start(lidarSensor);
27 dwSensorLidar_readPacket(...);
29 // CODE: use the time synchronized lidar packets for other tasks
31 dwSensorLidar_returnPacket(...);
35 dwSAL_releaseSensor(&timeSensor);
36 dwSAL_releaseSensor(&lidarSensor);
40 This can also be done with sensor recordings. For example, we can modify the example above with the following parameters to reference recorded data.
43 lidarParams.parameters = "file=lidar_recording.bin";
44 lidarParams.protocol = "lidar.virtual";
46 timeParams.parameters = "file=time_recording.bin";
47 timeParams.protocol = "time.virtual";
50 For more details see @ref dwx_time_sensor_sample