DriveWorks SDK Reference

| 0.6.67 Release

LidarAccumulator

Detailed Description

Defines LidarAccumulator module for Lidar data processing and collection.

Data Structures

struct  dwLidarAccumulatorBuffer
 Definition of Lidar Accumulator buffer. More...
 

Typedefs

typedef struct dwLidarAccumulatorObject const * dwConstLidarAccumulatorHandle_t
 
typedef struct dwLidarAccumulatorObject * dwLidarAccumulatorHandle_t
 Handle to dwLidarAccumulator. More...
 

Enumerations

enum  dwLidarImageType {
  DW_LIDAR_IMAGE_TYPE_3D_DISTANCE_IMAGE,
  DW_LIDAR_IMAGE_TYPE_2D_DISTANCE_IMAGE,
  DW_LIDAR_IMAGE_TYPE_INTENSITY_IMAGE
}
 Definition of the image type of Lidar cylindrical projection image. More...
 

Functions

DW_API_PUBLIC dwStatus dwLidarAccumulator_addPacket (const dwLidarDecodedPacket *packet, dwLidarAccumulatorHandle_t obj)
 Adds a dwLidarDecodedPacket to Lidar Accumulator module, thread-safe. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_createImage (dwImageCPU *lidarImage, dwLidarAccumulatorHandle_t obj)
 Creates Lidar Cylindrical Image. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_destroyImage (dwImageCPU *lidarImage, dwLidarAccumulatorHandle_t obj)
 Destroys Lidar Cylindrical Image. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_fillImage (dwImageCPU *lidarImage, dwLidarImageType type, dwLidarAccumulatorHandle_t obj)
 Fills image previously created with Lidar Cylindrical Image. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_getSweep (dwLidarAccumulatorBuffer *sweep, dwLidarAccumulatorHandle_t obj)
 Gets sweeps/spins of Lidar Point Cloud. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_initialize (dwLidarAccumulatorHandle_t *obj, dwContextHandle_t context, uint32_t filterWinSize, const dwLidarProperties *lidarProperties)
 Initializes Lidar Accumulator module. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_release (dwLidarAccumulatorHandle_t *obj)
 Releases the Lidar Accumulator module. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_reset (dwLidarAccumulatorHandle_t obj)
 Resets Lidar Accumulator module. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_returnSweep (dwLidarAccumulatorHandle_t obj)
 Returns the sweep/image or both to the Lidar Accumulator. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_setAngleSpan (float32_t minAngleDegree, float32_t maxAngleDegree, dwLidarAccumulatorHandle_t obj)
 Sets angle of interest for Lidar Accumulator to collect. More...
 
DW_API_PUBLIC dwStatus dwLidarAccumulator_setDistanceSpan (float32_t minDistanceMeter, float32_t maxDistanceMeter, dwLidarAccumulatorHandle_t obj)
 Sets distance of interest for Lidar Accumulator to collect. More...
 

Data Structure Documentation

◆ dwLidarAccumulatorBuffer

struct dwLidarAccumulatorBuffer
Data Fields
const dwVector4f * data Organized Lidar points in Cartesian coordinate XYZI It includes both zero and non-zero points.
uint32_t dataCount Total number of points in data.
const dwTime_t * hostTimestamps Host timestamps.
const dwTime_t * sensorTimestamps Sensor timestamps.
uint32_t validCount Total number of non-zero points.

Typedef Documentation

◆ dwConstLidarAccumulatorHandle_t

typedef struct dwLidarAccumulatorObject const* dwConstLidarAccumulatorHandle_t

Definition at line 61 of file LidarAccumulator.h.

◆ dwLidarAccumulatorHandle_t

typedef struct dwLidarAccumulatorObject* dwLidarAccumulatorHandle_t

Handle to dwLidarAccumulator.

Definition at line 60 of file LidarAccumulator.h.

Enumeration Type Documentation

◆ dwLidarImageType

Definition of the image type of Lidar cylindrical projection image.

Enumerator
DW_LIDAR_IMAGE_TYPE_3D_DISTANCE_IMAGE 

each pixel is the 3D distance in XYZ space

DW_LIDAR_IMAGE_TYPE_2D_DISTANCE_IMAGE 

each pixel is the 2D distance in XY Plane

DW_LIDAR_IMAGE_TYPE_INTENSITY_IMAGE 

each pixel is the Lidar intensity

Definition at line 64 of file LidarAccumulator.h.

Function Documentation

◆ dwLidarAccumulator_addPacket()

DW_API_PUBLIC dwStatus dwLidarAccumulator_addPacket ( const dwLidarDecodedPacket packet,
dwLidarAccumulatorHandle_t  obj 
)

Adds a dwLidarDecodedPacket to Lidar Accumulator module, thread-safe.

Parameters
[in]packetPointer to dwLidarDecodedPacket read by Lidar sensor
[in]objHandle to the Lidar Accumulator module
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_INTERNAL_ERROR the accumulated number of points in a full sweep goes beyond the expectation
DW_BUFFER_FULL internal sweep buffer is full, failed to add packet to the internal memory
DW_NOT_AVAILABLE the recycle pool is empty, failed to fetch buffer to write
DW_SUCCESS
Note
When Lidar sensor reaches the end of the recording, user can pass an empty dwLidarDecodedPacket (nullptr) to this function to flush all the packets in the last spin

◆ dwLidarAccumulator_createImage()

DW_API_PUBLIC dwStatus dwLidarAccumulator_createImage ( dwImageCPU lidarImage,
dwLidarAccumulatorHandle_t  obj 
)

Creates Lidar Cylindrical Image.

Parameters
[out]lidarImagePointer to Lidar cylindrical image.
[in]objHandle to the Lidar Accumulator module being initialized.
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS

◆ dwLidarAccumulator_destroyImage()

DW_API_PUBLIC dwStatus dwLidarAccumulator_destroyImage ( dwImageCPU lidarImage,
dwLidarAccumulatorHandle_t  obj 
)

Destroys Lidar Cylindrical Image.

Parameters
[in]lidarImagePointer to Lidar cylindrical image.
[in]objHandle to the Lidar Accumulator module being initialized.
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS
Note
User must use this function together with dwLidarAccumulator_createImages

◆ dwLidarAccumulator_fillImage()

DW_API_PUBLIC dwStatus dwLidarAccumulator_fillImage ( dwImageCPU lidarImage,
dwLidarImageType  type,
dwLidarAccumulatorHandle_t  obj 
)

Fills image previously created with Lidar Cylindrical Image.

Parameters
[out]lidarImageSingle channel Lidar cylindrical image
[in]typeThe semantic type for the Lidar cylindrical image
[in]objHandle to the Lidar Accumulator module
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_INVALID_ARGUMENT if given arguments are invalid
DW_NOT_READY requires more dwLidarDecodedPacket input to accumulate
DW_SUCCESS
Note
This function call should follow dwLidarAccumulator_getSweep. User should use the Lidar image allocated by dwLidarAccumulator_createImage.

◆ dwLidarAccumulator_getSweep()

DW_API_PUBLIC dwStatus dwLidarAccumulator_getSweep ( dwLidarAccumulatorBuffer sweep,
dwLidarAccumulatorHandle_t  obj 
)

Gets sweeps/spins of Lidar Point Cloud.

Parameters
[out]sweepAccumulated Lidar sweep buffer
[in]objHandle to the Lidar Accumulator module
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_INVALID_ARGUMENT if given arguments are invalid
DW_CALL_NOT_ALLOWED if there's a previous getSweep() called
but no corresponding returnSweep()
DW_END_OF_STREAM No more sweeps
DW_NOT_READY requires more dwLidarDecodedPacket input to accumulate
DW_SUCCESS
Note
dwLidarAccumulator_getSweep must be followed by dwLidarAccumulator_returnSweep if there is none

◆ dwLidarAccumulator_initialize()

DW_API_PUBLIC dwStatus dwLidarAccumulator_initialize ( dwLidarAccumulatorHandle_t obj,
dwContextHandle_t  context,
uint32_t  filterWinSize,
const dwLidarProperties lidarProperties 
)

Initializes Lidar Accumulator module.

Parameters
[out]objHandle to the Lidar Accumulator module being initialized.
[in]contextHandle to the current driveworks context.
[in]filterWinSizeThe horizontal smoothing filter window size
[in]lidarPropertiesLidar properties
Returns
DW_INVALID_ARGUMENTS if given arguments are invalid
DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS
Note
The window size is expected to an even number ranges from 1 to 2, 4 and 8. It reduces the jittering of the Lidar beam firing in the horizontal direction. If user does not call this function, Lidar Accumulator will use the default value.

◆ dwLidarAccumulator_release()

DW_API_PUBLIC dwStatus dwLidarAccumulator_release ( dwLidarAccumulatorHandle_t obj)

Releases the Lidar Accumulator module.

Parameters
[in]objHandle to the Lidar Accumulator module being released.
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS

◆ dwLidarAccumulator_reset()

DW_API_PUBLIC dwStatus dwLidarAccumulator_reset ( dwLidarAccumulatorHandle_t  obj)

Resets Lidar Accumulator module.

Parameters
objHandle to the Lidar Accumulator module being reset.
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS

◆ dwLidarAccumulator_returnSweep()

DW_API_PUBLIC dwStatus dwLidarAccumulator_returnSweep ( dwLidarAccumulatorHandle_t  obj)

Returns the sweep/image or both to the Lidar Accumulator.

Parameters
[in]objHandle to the Lidar Accumulator module
Returns
DW_INVALID_HANDLE if given handle is invalid
DW_BUFFER_FULL recycle pool full, failed to return data back DW_SUCCESS

◆ dwLidarAccumulator_setAngleSpan()

DW_API_PUBLIC dwStatus dwLidarAccumulator_setAngleSpan ( float32_t  minAngleDegree,
float32_t  maxAngleDegree,
dwLidarAccumulatorHandle_t  obj 
)

Sets angle of interest for Lidar Accumulator to collect.

Parameters
[in]minAngleDegreeThe starting angle in degree for the Lidar Accumulator
[in]maxAngleDegreeThe ending angle in degree for the Lidar Accumulator
[in]objHandle to the Lidar Accumulator module.
Returns
DW_INVALID_ARGUMENTS if given arguments are invalid
DW_SUCCESS
Note
If user does not call this function, Lidar Accumulator will collect a Lidar sweep covers 360 degrees

◆ dwLidarAccumulator_setDistanceSpan()

DW_API_PUBLIC dwStatus dwLidarAccumulator_setDistanceSpan ( float32_t  minDistanceMeter,
float32_t  maxDistanceMeter,
dwLidarAccumulatorHandle_t  obj 
)

Sets distance of interest for Lidar Accumulator to collect.

Parameters
[in]minDistanceMeterThe starting distance in meter for Lidar Accumulator
[in]maxDistanceMeterThe ending distance in meter for Lidar Accumulator
[in]objHandle to the Lidar Accumulator module.
Returns
DW_INVALID_ARGUMENTS if given arguments are invalid
DW_SUCCESS
Note
If user does not call this function, Lidar Accumulator will collect a Lidar sweep covers all the Euclidean distances