The Time Sensor sample performs time synchronization with Lidar packet timestamps. The sample initializes identical Lidar sensors with and without time synchronization, and compares the output timestamps.
The sample requires the driver and parameters of the Time and Lidar sensors. It accepts the following arguments:
./sample_timesensor --virtual=[true|false] --time-params=[comma/separated/key/value/pairs] --lidar-params=[comma/separated/key/value/pairs]
Where:
--virtual=[true|false] Specify if virtual sensors should be used. If live mode, drivers `lidar.socket` and `time.nvpps` are used. Default value: true --time-params=[comma/separated/key/value/pairs] Different parameters are available for each Time driver. Default value: file=path/to/data/samples/sensors/time/time.bin --lidar-params=[comma/separated/key/value/pairs] Different parameters are available for each Time driver. Default value: file=path/to/data/samples/sensors/time/lidar_hdl32e.bin
For every valid Lidar packet, the sample prints to the console data such as:
[Lidar] timestamp synced: 1499155033601862 | original: 1499155033602454 [Lidar] timestamp synced: 1499155033602415 | original: 1499155033603010 [Lidar] timestamp synced: 1499155033602968 | original: 1499155033603562 [Lidar] timestamp synced: 1499155033603521 | original: 1499155033604113 [Lidar] timestamp synced: 1499155033604074 | original: 1499155033604669 [Lidar] timestamp synced: 1499155033604627 | original: 1499155033605218