|
|
DriveWorks SDK Reference| 0.6.67 Release |
The Lidar Accumulator sample demonstrates how to use LidarAccumulator module to process and collect data from decoded Lidar packets. The sample shows 2 modes: 1) Sync mode adds the Lidar packet to the accumulator, lock the sweep buffer and do rendering. 2) Aysnc mode creates a dedicated thread which adds Lidar packets to LidarAccumulator, the main thread keeps querying whether the full sweep is ready. Besides the packet collection, LidarAccumulator module allows the user to select Lidar data within certain range and certain spin angles. The data made available to the user consists of two types: Lidar point clouds in Cartesian XYZ space and cylindrical projection image. User can toggle in the application to choose the type of the cylindrical projection image. There are three types of the image are supported: DW_LIDAR_IMAGE_TYPE_3D_DISTANCE_IMAGE, DW_LIDAR_IMAGE_TYPE_2D_DISTANCE_IMAGE and DW_LIDAR_IMAGE_TYPE_INTENSITY_IMAGE. By definition, it means the image pixel represents the 3D distance in XYZ space, 2D distance in XY plane and Lidar intensity. Currently LidarAccumulator supports Velodyne HDL64E, Velodyne HDL32E, Velodyne VLP16 and Quanergy M81A.
The command line for the sample to run with live Lidar sensor is:
./sample_lidar_accumulator --ip=[Lidar IP address] --port=[Lidar port] --device=[type of device] --scan-frequency=[valid frequency] --mode=[sync or async] --maxDistance[max distance in meters to select the Lidar points] --minDistance[min distance in meters to select the Lidar points] --minAngle[min angle in degrees to select the Lidar points] --maxAngle[max angle in degrees to select the Lidar points] --smooth-window-size[1, 2, 4, 8] --lidar-image-type[depth-xyz, depth-xy or intensity]
The command line for the sample to run with recorded Lidar binary file is:
./sample_lidar_accumulator --file=[Lidar binary file] --mode=[sync or async] --maxDistance[max distance in meters to select the Lidar points] --minDistance[min distance in meters to select the Lidar points] --minAngle[min angle in degrees to select the Lidar points] --maxAngle[max angle in degrees to select the Lidar points] --smooth-window-size[1, 2, 4, 8] --lidar-image-type[depth-xyz, depth-xy or intensity]
The sample opens an X window to display a full sweep of 3D point cloud, a rolling sector sweep of the 3D point cloud and a projected cylindrical image on the bottom. Use the mouse to interact with the visualization: