Defines point cloud assembling module.
Defines point cloud processing datatypes and memory handling functions.
Defines lidar point cloud structure.
Defines point cloud motion compensation module.
Data Structures | |
struct | dwLidarMotionCompensationInfo |
Declares motion compensation traits of the point cloud. More... | |
struct | dwLidarPointCloud |
Defines a LiDAR-specific point cloud data structure. More... | |
struct | dwLidarPointCloudMapping |
Struct indicating layer and aux channel mapping. More... | |
struct | dwMotionCompensatorParams |
Defines point cloud motion compensator parameters. More... | |
struct | dwPointCloud |
Defines point cloud data structure. More... | |
struct | dwPointCloudAssemblerParams |
Initialization parameters. More... | |
struct | dwPointCloudAuxChannel |
Struct holding information about aux channel. More... | |
struct | dwPointCloudLayer |
Struct holding information about a single point cloud layer. More... | |
Modules | |
Point Cloud Accumulator | |
Defines datatypes and functions to accumulate cloud of points. | |
Point Cloud Filter | |
Defines module to perform point cloud box filtering. | |
Point Cloud ICP | |
Defines Point Cloud ICP module to align point clouds using iterative closest point algorithms. | |
Point Cloud Plane Extractor | |
Defines module to extract one 3D plane nearby the sensor. | |
Point Cloud Range Image Creator | |
Defines module to produce range image via spherical projection of the point cloud. | |
Point Cloud Stitcher | |
Defines module to register/stitch multiple sets of point clouds. | |
Macros | |
#define | DW_LIDAR_POINT_CLOUD_USER_DATA_SIZE 8 |
Number of elements in user buffer. More... | |
#define | DW_POINT_CLOUD_MAX_AUX_CHANNELS 16U |
#define | DW_POINT_CLOUD_MAX_LAYERS 16U |
Typedefs | |
typedef struct dwMotionCompensatorObject const * | dwMotionCompensatorConstHandle_t |
typedef struct dwMotionCompensatorObject * | dwMotionCompensatorHandle_t |
typedef struct dwPointCloudAssemblerObject const * | dwPointCloudAssemblerConstHandle_t |
typedef struct dwPointCloudAssemblerObject * | dwPointCloudAssemblerHandle_t |
Enumerations | |
enum | dwMotionCompensatorInterpolationStrategy { DW_PC_MOTION_COMPENSATOR_INTERPOLATION_LINEAR = 0 } |
Defines transform interpolation strategy. More... | |
enum | dwPointCloudFormat { DW_POINTCLOUD_FORMAT_XYZI = 0 , DW_POINTCLOUD_FORMAT_RTHI = 1 } |
Defines point format. More... | |
enum | dwPointCloudReferenceFrame { DW_POINTCLOUD_REFERENCE_FRAME_SENSOR = 0 , DW_POINTCLOUD_REFERENCE_FRAME_RIG = 1 , DW_POINTCLOUD_REFERENCE_FRAME_CUSTOM = 2 } |
Defines point cloud coordinate reference frame. More... | |
struct dwLidarMotionCompensationInfo |
Data Fields | ||
---|---|---|
bool | compensated | True if this pointcloud has been motion compensated. |
dwTime_t | compensationTimestamp | Motion compensation reference timestamp. |
struct dwLidarPointCloud |
Data Fields | ||
---|---|---|
dwPointCloudReferenceFrame | coordinateFrame | Coordinate reference frame for the data in this pointcloud. |
dwLidarPointCloudMapping | mapping | Mapping of returns and aux channels. |
dwLidarMotionCompensationInfo | motionCompensation | Motion compensation information. |
dwPointCloud | pointCloud | Wrapped point cloud. |
uint32_t | userData[DW_LIDAR_POINT_CLOUD_USER_DATA_SIZE] | User defined data. |
struct dwLidarPointCloudMapping |
Data Fields | ||
---|---|---|
dwLidarAuxDataType | auxType[DW_POINT_CLOUD_MAX_AUX_CHANNELS] | Map aux channel from SAL to aux channel of a point cloud. |
dwLidarReturnType | layerType[DW_POINT_CLOUD_MAX_LAYERS] |
Map a return type to a layer, i.e. put into layer i a return type from SAL indicated by layerType[i] |
uint32_t | numAuxChannels | |
uint32_t | numLayers | Number of layers. |
struct dwMotionCompensatorParams |
Data Fields | ||
---|---|---|
bool | enableCuda | If set the module operate on GPU point clouds. |
dwMotionCompensatorInterpolationStrategy | interpolationStrategy | Interpolation strategy. |
uint32_t | maxPointCloudSize | Maximum number of points in input/output point cloud. |
uint32_t | motionModelResolution | Number of transfomations calculated at equal time intervals between start and the end of a spin. |
bool | outputInRigCoordinates |
If true output points are transformed to rig coordinate system. |
dwTransformation3f | pointCloudToRig | Transformation aligns the lidar sensor with the platform that produces the egomotion. |
struct dwPointCloud |
Data Fields | ||
---|---|---|
dwPointCloudAuxChannel | auxChannels[DW_POINT_CLOUD_MAX_AUX_CHANNELS] | |
uint32_t | capacity | numLayers * maxPointsPerLayer |
dwPointCloudFormat | format | Format of a buffer. |
dwTime_t | hostEndTimestamp | Point cloud end timestamp. |
dwTime_t | hostStartTimestamp | Point cloud start timestamp. |
dwPointCloudLayer | layers[DW_POINT_CLOUD_MAX_LAYERS] | |
uint32_t | maxPointsPerLayer | Maximum number of points in layer (use even number of points to benefit from aligned memory access per layer if each point is 16 bytes long) |
uint32_t | numAuxChannels | Number of aux channels in a point cloud. |
uint32_t | numLayers | Number of layers in a point cloud. |
bool | organized | Flag indicating the data is ordered on the 3D grid. |
void * | points | Pointer to memory buffer of all points. Not compact, but contiguous with invalid points in between layers. |
uint32_t | size | Number of points in the cloud including all layers. |
dwTime_t | timestamp | Time when the point cloud capturing is finished. |
dwMemoryType | type | Defines type of a memory GPU or CPU. |
struct dwPointCloudAssemblerParams |
Data Fields | ||
---|---|---|
bool | enableCuda | If set to true, assembling to GPU memory. |
dwLidarPointCloudMapping | mapping | Layers and aux channels mapping. |
struct dwPointCloudAuxChannel |
struct dwPointCloudLayer |
#define DW_LIDAR_POINT_CLOUD_USER_DATA_SIZE 8 |
Number of elements in user buffer.
Definition at line 92 of file LidarPointCloud.h.
#define DW_POINT_CLOUD_MAX_AUX_CHANNELS 16U |
Definition at line 93 of file PointCloud.h.
#define DW_POINT_CLOUD_MAX_LAYERS 16U |
Definition at line 92 of file PointCloud.h.
typedef struct dwMotionCompensatorObject const* dwMotionCompensatorConstHandle_t |
Definition at line 57 of file MotionCompensator.h.
typedef struct dwMotionCompensatorObject* dwMotionCompensatorHandle_t |
Definition at line 56 of file MotionCompensator.h.
typedef struct dwPointCloudAssemblerObject const* dwPointCloudAssemblerConstHandle_t |
Definition at line 56 of file PointCloudAssembler.h.
typedef struct dwPointCloudAssemblerObject* dwPointCloudAssemblerHandle_t |
Definition at line 55 of file PointCloudAssembler.h.
Defines transform interpolation strategy.
Enumerator | |
---|---|
DW_PC_MOTION_COMPENSATOR_INTERPOLATION_LINEAR | Default interpolation strategy applying linear interpolation. |
Definition at line 62 of file MotionCompensator.h.
enum dwPointCloudFormat |
Defines point format.
Enumerator | |
---|---|
DW_POINTCLOUD_FORMAT_XYZI | Cartesian 3D coordinate + intensity. |
DW_POINTCLOUD_FORMAT_RTHI | Polar 3D coordinate + intensity. |
Definition at line 60 of file PointCloud.h.
Defines point cloud coordinate reference frame.
Definition at line 58 of file LidarPointCloud.h.
DW_API_PUBLIC dwStatus dwLidarPointCloud_create | ( | dwLidarPointCloud * | lidarPointCloud, |
dwPointCloudFormat const | format, | ||
dwMemoryType const | memoryType, | ||
uint32_t const | maxPointsPerReturn, | ||
dwLidarPointCloudMapping const * | mapping | ||
) |
Create lidar specific point cloud.
[out] | lidarPointCloud | Point cloud to be created |
[in] | format | Point cloud format XYZI or RTHI |
[in] | memoryType | Point cloud memory type, CUDA, CPU or PINNED |
[in] | maxPointsPerReturn | Maximum number of points in single lidar return |
[in] | mapping | Return and aux data mapping |
DW_API_PUBLIC dwStatus dwLidarPointCloud_destroy | ( | dwLidarPointCloud * | lidarPointCloud | ) |
Destroy lidar specific point cloud.
[in] | lidarPointCloud | A pointer to point cloud |
DW_API_PUBLIC dwStatus dwMotionCompensator_bindEgomotionState | ( | dwConstEgomotionStateHandle_t | motionState, |
dwMotionCompensatorHandle_t | obj | ||
) |
Bind egomotion state handle.
[out] | motionState | A handle to egomotion state |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_bindInput | ( | dwPointCloud const * | pointCloud, |
uint32_t const | timestampChannelIndex, | ||
dwMotionCompensatorHandle_t | obj | ||
) |
Bind input point cloud.
[out] | pointCloud | Input point cloud |
[in] | timestampChannelIndex | Index of aux channel holding timestamp information |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_bindInputLidarPointCloud | ( | dwLidarPointCloud const * | pointCloud, |
dwMotionCompensatorHandle_t | obj | ||
) |
Bind input lidar point cloud.
[out] | pointCloud | Input lidar point cloud |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_bindOutput | ( | dwPointCloud * | pointCloud, |
dwMotionCompensatorHandle_t | obj | ||
) |
Bind output point cloud.
[out] | pointCloud | Output point cloud |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_bindOutputLidarPointCloud | ( | dwLidarPointCloud * | pointCloud, |
dwMotionCompensatorHandle_t | obj | ||
) |
Bind output lidar point cloud.
[out] | pointCloud | Output lidar point cloud |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_getCUDAStream | ( | cudaStream_t * | stream, |
dwMotionCompensatorConstHandle_t | obj | ||
) |
Get CUDA stream of motion compensator.
[out] | stream | Pointer to CUDA stream handle |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_getDefaultParams | ( | dwMotionCompensatorParams * | params, |
dwLidarProperties const * | lidarProps | ||
) |
Get default parameters for motion compensator.
[out] | params | Pointer to parameters structure |
[in] | lidarProps | Lidar properties the module is supposed to be used with |
DW_API_PUBLIC dwStatus dwMotionCompensator_initialize | ( | dwMotionCompensatorHandle_t * | obj, |
dwMotionCompensatorParams const * | params, | ||
dwContextHandle_t | ctx | ||
) |
Initialize motion compensator module.
[out] | obj | Pointer to motion compensator handle |
[in] | params | Initialization parameters |
[in] | ctx | Handle to the context |
DW_API_PUBLIC dwStatus dwMotionCompensator_process | ( | dwMotionCompensatorHandle_t | obj | ) |
Perform motion compensation.
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_release | ( | dwMotionCompensatorHandle_t | obj | ) |
Release motion compensator.
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_reset | ( | dwMotionCompensatorHandle_t | obj | ) |
Reset motion compensator.
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_setCUDAStream | ( | const cudaStream_t | stream, |
dwMotionCompensatorHandle_t | obj | ||
) |
Set CUDA stream of motion compensator.
[in] | stream | Handle to CUDA stream |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_setReferenceTimestamp | ( | dwTime_t const | timestamp, |
dwMotionCompensatorHandle_t | obj | ||
) |
Set reference time for motion compensation.
[out] | timestamp | Timestamp for motion compensation |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwMotionCompensator_setTransform | ( | dwTransformation3f const * | transform, |
dwMotionCompensatorHandle_t | obj | ||
) |
Update point cloud transformation to egomotion coordinate frame.
[in] | transform | Transformation aligning the lidar sensor with the platform that produces the egomotion |
[in] | obj | Motion compensator handle |
DW_API_PUBLIC dwStatus dwPointCloud_create | ( | dwPointCloud * | pointCloud, |
dwPointCloudFormat const | format, | ||
dwMemoryType const | memoryType, | ||
uint32_t const | maxPointsPerLayer, | ||
uint32_t const | numRequestedLayers, | ||
uint32_t const * | auxChannelsElemSize, | ||
uint32_t const | numRequestedAuxChannels | ||
) |
Create point cloud with layers and aux channel information.
[out] | pointCloud | Point cloud to be created |
[in] | format | Point cloud format XYZI or RTHI |
[in] | memoryType | Point cloud memory type, CUDA, CPU or PINNED |
[in] | maxPointsPerLayer | Maximum number of points in single layer |
[in] | numRequestedLayers | Number of layer in a point cloud |
[in] | auxChannelsElemSize | An array of auxiliary channel elements sizes |
[in] | numRequestedAuxChannels | Number of requested aux channels |
DW_API_PUBLIC dwStatus dwPointCloud_createBuffer | ( | dwPointCloud * | buffer | ) |
Allocates memory for point cloud data structure.
[out] | buffer | Pointer to dwPointCloud |
buffer
:capacity
to indicate the memory allocation sizetype
to indicate the memory type, either host memory or device memorysize
to zero to indicate it contains no element in the memory By default this API will set organized
to falsenumLayers
and numAuxChannels
are both set to zero. DW_API_PUBLIC dwStatus dwPointCloud_destroy | ( | dwPointCloud * | pointCloud | ) |
Destroy point cloud buffers.
[in] | pointCloud | A pointer to point cloud |
DW_API_PUBLIC dwStatus dwPointCloud_destroyBuffer | ( | dwPointCloud * | buffer | ) |
Destroys allocated memory for point cloud data structure.
[out] | buffer | Pointer to dwPointCloud |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_addLidarPacket | ( | dwLidarDecodedPacket const *const | packet, |
dwPointCloudAssemblerHandle_t const | obj | ||
) |
Push lidar packet to point cloud assembler.
[in] | packet | Pointer to decoded lidar packet |
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_bindLidarPointCloud | ( | dwLidarPointCloud *const | pointCloud, |
dwPointCloudAssemblerHandle_t const | obj | ||
) |
Bind output lidar specific point cloud.
[out] | pointCloud | Lidar point cloud |
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_bindOutput | ( | dwPointCloud *const | pointCloud, |
dwPointCloudAssemblerHandle_t const | obj | ||
) |
Bind output point cloud.
[out] | pointCloud | Lidar point cloud |
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_getCUDAStream | ( | cudaStream_t *const | stream, |
dwPointCloudAssemblerConstHandle_t const | obj | ||
) |
Get CUDA stream of point cloud assembler.
[out] | stream | Pointer to CUDA stream handle |
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_getDefaultParams | ( | dwPointCloudAssemblerParams *const | params, |
dwLidarProperties const *const | lidarProperties | ||
) |
Get default initialization parameters for specified lidar device.
[out] | params | Initialization parameters |
[in] | lidarProperties | Lidar properties |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_initialize | ( | dwPointCloudAssemblerHandle_t *const | obj, |
dwPointCloudAssemblerParams const *const | params, | ||
dwLidarProperties const *const | lidarProperties, | ||
dwContextHandle_t const | ctx | ||
) |
Initialize point cloud assembler module.
[out] | obj | Pointer to point cloud assembler handle |
[in] | params | Initialization parameters |
[in] | lidarProperties | Input lidar properties |
[in] | ctx | Handle to the context |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_isReady | ( | bool *const | isReady, |
dwPointCloudAssemblerConstHandle_t const | obj | ||
) |
Indicate that lidar frame has been accumulated.
[out] | isReady | If true frame has been accumulated |
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_process | ( | dwPointCloudAssemblerHandle_t const | obj | ) |
Perform processing of accumulated data.
[in] | obj | Module handle |
dwPointCloudAssembler_isReady
returns false DW_CALL_NOT_ALLOWED - if output is not bound DW_SUCCESSExample:
Arrived packets | First process call | Second process call 0,1,2*,3,4* | {2,3} | DW_NOT_READY 0,1,2*,3,4*,5 | {2,3} | DW_NOT_READY 0,1,2*,3,4*,5,6* | {4,5} | DW_NOT_READY
where numbers denote packet ids and (*) denotes if the packet has zero crossing flag set to true.
DW_API_PUBLIC dwStatus dwPointCloudAssembler_release | ( | dwPointCloudAssemblerHandle_t const | obj | ) |
Release point cloud assembler.
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_reset | ( | dwPointCloudAssemblerHandle_t const | obj | ) |
Reset point cloud assembler.
[in] | obj | Module handle |
DW_API_PUBLIC dwStatus dwPointCloudAssembler_setCUDAStream | ( | cudaStream_t const | stream, |
dwPointCloudAssemblerHandle_t const | obj | ||
) |
Set CUDA stream of point cloud assembler.
[in] | stream | Handle to CUDA stream |
[in] | obj | Module handle |