Defines LidarAccumulator module for Lidar data processing and collection.
|
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...
|
|
◆ 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. |
◆ dwConstLidarAccumulatorHandle_t
◆ dwLidarAccumulatorHandle_t
◆ 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.
◆ dwLidarAccumulator_addPacket()
Adds a dwLidarDecodedPacket to Lidar Accumulator module, thread-safe.
- Parameters
-
[in] | packet | Pointer to dwLidarDecodedPacket read by Lidar sensor
|
[in] | obj | Handle 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()
Creates Lidar Cylindrical Image.
- Parameters
-
[out] | lidarImage | Pointer to Lidar cylindrical image. |
[in] | obj | Handle to the Lidar Accumulator module being initialized. |
- Returns
- DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS
◆ dwLidarAccumulator_destroyImage()
Destroys Lidar Cylindrical Image.
- Parameters
-
[in] | lidarImage | Pointer to Lidar cylindrical image. |
[in] | obj | Handle 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()
Fills image previously created with Lidar Cylindrical Image.
- Parameters
-
[out] | lidarImage | Single channel Lidar cylindrical image |
[in] | type | The semantic type for the Lidar cylindrical image |
[in] | obj | Handle 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()
Gets sweeps/spins of Lidar Point Cloud.
- Parameters
-
[out] | sweep | Accumulated Lidar sweep buffer |
[in] | obj | Handle 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()
Initializes Lidar Accumulator module.
- Parameters
-
[out] | obj | Handle to the Lidar Accumulator module being initialized. |
[in] | context | Handle to the current driveworks context. |
[in] | filterWinSize | The horizontal smoothing filter window size |
[in] | lidarProperties | Lidar 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()
Releases the Lidar Accumulator module.
- Parameters
-
[in] | obj | Handle to the Lidar Accumulator module being released. |
- Returns
- DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS
◆ dwLidarAccumulator_reset()
Resets Lidar Accumulator module.
- Parameters
-
obj | Handle to the Lidar Accumulator module being reset. |
- Returns
- DW_INVALID_HANDLE if given handle is invalid
DW_SUCCESS
◆ dwLidarAccumulator_returnSweep()
Returns the sweep/image or both to the Lidar Accumulator.
- Parameters
-
[in] | obj | Handle 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()
Sets angle of interest for Lidar Accumulator to collect.
- Parameters
-
[in] | minAngleDegree | The starting angle in degree for the Lidar Accumulator |
[in] | maxAngleDegree | The ending angle in degree for the Lidar Accumulator |
[in] | obj | Handle 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()
Sets distance of interest for Lidar Accumulator to collect.
- Parameters
-
[in] | minDistanceMeter | The starting distance in meter for Lidar Accumulator |
[in] | maxDistanceMeter | The ending distance in meter for Lidar Accumulator |
[in] | obj | Handle 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