- Welcome
- Getting Started With the NVIDIA DriveWorks SDK
- Modules
- Samples
- Tools
- Tutorials
- SDK Porting Guide
- DriveWorks API
- More
This tutorial demonstrates how to accumulate dwLidarDecodedPacket
to a Lidar spin according to the properties specified in dwLidarProperties
.
Initialize the point cloud accumulator:
filterWinSize
specifies the horizontal smoothing for the Lidar sweep to reduce the horizontal jitter inherent to the Lidar rotating units. It must be set to be the power of 2 whose exponent ranges from 0 to 4. When set to values other than 1, the Lidar point whose 3D distance is the closest to the Lidar sensor is selected in the horizontal window.
minAngleDegree
, maxAngleDegree
parameters specify angle range to accumulate points. By default the module returns full 360-degree Lidar sweep.
minDistanceMeter
, maxDistanceMeter
parameters allows to customize the range of distance in a 360-degree Lidar sweep.
params.type
specifies whether the accumulator works on CPU or GPU.
User can also set params.memoryType = DW_MEMORY_TYPE_CPU
if CPU memory is expected. Organized point cloud resemble 2D grid which can be indexed by row and column. The organized nature brings up neighborhood relationship which could reduce computational costs for certain tasks. If params.organized = false
, such neighborhood relationship is not maintained in the accumulated point cloud. If params.enableMotionCompensation = true
, the accumulator will correct the motion distortion during the packet collection. User must initialize params.egomotion
with valid egomotion handle. See Relative Egomotion Workflow for egomotion usecase.
The sample specifies CUDA memory in the initialization, user is assumed to allocate CUDA memory to store the output, bind the buffer to the module and set the proper CUDA stream
To continuously collect the decoded lidar packet until is reaches the packets per spin specified in dwLidarProperties
:
To release the module:
accumulatedSpin
should have the same memory type as params.memoryType
.For more details see Point Cloud Processing Sample