DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Detailed Description

Defines Point Cloud ICP module to align point clouds using iterative closest point algorithms.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Data Structures

struct  dwPointCloudICPParams
 Defines point cloud icp parameter. More...
 
struct  dwPointCloudICPResultStats
 Some result stats about the most recent ICP run. More...
 

Typedefs

typedef bool(* dwPointCloudICPConvergenceCheck) (const dwTransformation3f *prevSrc2Tgt, const dwTransformation3f *newSrc2Tgt, void *userData)
 Callback function to be executed by ICP module allowing user to overwrite default convergence criteria method. More...
 
typedef struct dwPointCloudICPObject * dwPointCloudICPHandle_t
 

Enumerations

enum  dwPointCloudICPType { DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP }
 Defines point cloud icp type. More...
 

Functions

DW_API_PUBLIC dwStatus dwPointCloudICP_bindInput (const dwPointCloud *sourcePCD, const dwPointCloud *targetPCD, const dwTransformation3f *sourceToTarget, dwPointCloudICPHandle_t obj)
 Binds Input buffers to point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_bindOutput (dwTransformation3f *pose, dwPointCloudICPHandle_t obj)
 Binds output buffer to point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_getCUDAStream (cudaStream_t *stream, dwPointCloudICPHandle_t obj)
 Gets CUDA stream of point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_getDefaultParams (dwPointCloudICPParams *params)
 Gets default point cloud icp parameters. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_getLastResultStats (dwPointCloudICPResultStats *resultStats, dwPointCloudICPHandle_t obj)
 Get stats about latest point cloud ICP run, returns the costs for last pose. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_getMaximumDepthMapSize (uint32_t *maxDepthMapSize)
 Get the maximum size of the depth map in number of points supported by the ICP implementation. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_initialize (dwPointCloudICPHandle_t *obj, const dwPointCloudICPParams *params, dwContextHandle_t ctx)
 Initializes point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_process (dwPointCloudICPHandle_t obj)
 Estimates the transformation aligns two PointClouds. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_release (dwPointCloudICPHandle_t obj)
 Releases point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_reset (dwPointCloudICPHandle_t obj)
 Resets point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_setConvergenceCriteriaCallback (dwPointCloudICPConvergenceCheck callback, void *userData, dwPointCloudICPHandle_t obj)
 Set callback to be executed to test convergence. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_setConvergenceTolerance (float32_t angleTol, float32_t distanceTol, dwPointCloudICPHandle_t obj)
 Set tolerances used by the default ICP convergence criteria method. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_setCUDAStream (const cudaStream_t stream, dwPointCloudICPHandle_t obj)
 Sets CUDA stream of point cloud icp. More...
 
DW_API_PUBLIC dwStatus dwPointCloudICP_setMaxIterations (uint16_t maxIterations, dwPointCloudICPHandle_t obj)
 Set maximum number of iterations which need to be executed. More...
 

Data Structure Documentation

◆ dwPointCloudICPParams

struct dwPointCloudICPParams
Data Fields
float32_t angleConvergenceTol Angle convergence tolerance, change in radians between two consecutive iteration steps.
dwVector2ui depthmapSize If icpType is DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP, this defines the size of depthmap.
float32_t distanceConvergenceTol Distance convergence tolerance, change in units between two consecutive iteration steps.
dwPointCloudICPType icpType Type of the ICP implementation to be used.
uint16_t maxIterations Maximum number of iterations which need to be executed.
uint32_t maxPoints Maximum number of points that will be pushed to ICP optimization.
bool usePriors Controls whether or not ICP uses the initialization pose as a prior in the optimization.

◆ dwPointCloudICPResultStats

struct dwPointCloudICPResultStats
Data Fields
uint16_t actualNumIterations How many iterations were actually performed.
float32_t inlierFraction Fraction of points which are inliers to the final ICP pose.
uint32_t numCorrespondences Number of 3D points which qualify as valid correspondences.
float32_t rmsCost RMS (weighted) cost after last ICP iteration.

Typedef Documentation

◆ dwPointCloudICPConvergenceCheck

typedef bool(* dwPointCloudICPConvergenceCheck) (const dwTransformation3f *prevSrc2Tgt, const dwTransformation3f *newSrc2Tgt, void *userData)

Callback function to be executed by ICP module allowing user to overwrite default convergence criteria method.

The method will receive original and new transformations as computed by the ICP module

Definition at line 99 of file PointCloudICP.h.

◆ dwPointCloudICPHandle_t

typedef struct dwPointCloudICPObject* dwPointCloudICPHandle_t

Definition at line 58 of file PointCloudICP.h.

Enumeration Type Documentation

◆ dwPointCloudICPType

Defines point cloud icp type.

Enumerator
DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP 

Grid based depthmap representation for the lidar point cloud.

It is assumed that the structured point cloud passed for alignment was generated from a spinning lidar

Definition at line 63 of file PointCloudICP.h.

Function Documentation

◆ dwPointCloudICP_bindInput()

DW_API_PUBLIC dwStatus dwPointCloudICP_bindInput ( const dwPointCloud sourcePCD,
const dwPointCloud targetPCD,
const dwTransformation3f sourceToTarget,
dwPointCloudICPHandle_t  obj 
)

Binds Input buffers to point cloud icp.

Parameters
[in]sourcePCDPointer to source point cloud input buffer. Must be in cartesian coordinate space.
[in]targetPCDPointer to target point cloud input buffer. Must be in cartesian coordinate space.
[in]sourceToTargetPointer to the initial transformation
that transforms from source to target point cloud
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_bindOutput()

DW_API_PUBLIC dwStatus dwPointCloudICP_bindOutput ( dwTransformation3f pose,
dwPointCloudICPHandle_t  obj 
)

Binds output buffer to point cloud icp.

Parameters
[out]posePointer to the transformation that aligns
the source point cloud with target point cloud
[in]objHandle to point cloud icp module
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_getCUDAStream()

DW_API_PUBLIC dwStatus dwPointCloudICP_getCUDAStream ( cudaStream_t *  stream,
dwPointCloudICPHandle_t  obj 
)

Gets CUDA stream of point cloud icp.

Parameters
[out]streamPointer to CUDA stream handle
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_getDefaultParams()

DW_API_PUBLIC dwStatus dwPointCloudICP_getDefaultParams ( dwPointCloudICPParams params)

Gets default point cloud icp parameters.

Parameters
[out]paramsPointer to point cloud icp parameters
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_getLastResultStats()

DW_API_PUBLIC dwStatus dwPointCloudICP_getLastResultStats ( dwPointCloudICPResultStats resultStats,
dwPointCloudICPHandle_t  obj 
)

Get stats about latest point cloud ICP run, returns the costs for last pose.

Parameters
[out]resultStatsStruct with stats about latest ICP run
[in]objHandle to point cloud icp
Returns
DW_BAD_CAST - if the provided ICP handle is invalid.
DW_INVALID_ARGUMENT - if provided parameters are null or invalid
DW_SUCCESS

◆ dwPointCloudICP_getMaximumDepthMapSize()

DW_API_PUBLIC dwStatus dwPointCloudICP_getMaximumDepthMapSize ( uint32_t *  maxDepthMapSize)

Get the maximum size of the depth map in number of points supported by the ICP implementation.

Width x height of the depth map has to be less than this number.

Parameters
[out]maxDepthMapSize- return maximal size in number of points supported by the ICP implementation.
Returns
DW_INVALID_ARGUMENT - if provided parameters are null or invalid
DW_SUCCESS

◆ dwPointCloudICP_initialize()

DW_API_PUBLIC dwStatus dwPointCloudICP_initialize ( dwPointCloudICPHandle_t obj,
const dwPointCloudICPParams params,
dwContextHandle_t  ctx 
)

Initializes point cloud icp.

Parameters
[out]objHandle to point cloud icp
[in]paramsPointer to point cloud icp parameters
[in]ctxHandle to the context
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_process()

DW_API_PUBLIC dwStatus dwPointCloudICP_process ( dwPointCloudICPHandle_t  obj)

Estimates the transformation aligns two PointClouds.

Parameters
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT
DW_CALL_NOT_ALLOWED - input and out buffers are not bound

◆ dwPointCloudICP_release()

DW_API_PUBLIC dwStatus dwPointCloudICP_release ( dwPointCloudICPHandle_t  obj)

Releases point cloud icp.

Parameters
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_reset()

DW_API_PUBLIC dwStatus dwPointCloudICP_reset ( dwPointCloudICPHandle_t  obj)

Resets point cloud icp.

Parameters
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_setConvergenceCriteriaCallback()

DW_API_PUBLIC dwStatus dwPointCloudICP_setConvergenceCriteriaCallback ( dwPointCloudICPConvergenceCheck  callback,
void *  userData,
dwPointCloudICPHandle_t  obj 
)

Set callback to be executed to test convergence.

If nullptr, the default test will be used.

Parameters
[in]callbackMethod to execute to test for convergence
[in]userDataUser data to be passed to the convergence callback
[in]objHandle to point cloud icp
Returns
DW_BAD_CAST - if the provided ICP handle is invalid.
DW_SUCCESS

◆ dwPointCloudICP_setConvergenceTolerance()

DW_API_PUBLIC dwStatus dwPointCloudICP_setConvergenceTolerance ( float32_t  angleTol,
float32_t  distanceTol,
dwPointCloudICPHandle_t  obj 
)

Set tolerances used by the default ICP convergence criteria method.

Parameters
[in]angleTolChange in radians between two consecutive iteration steps
[in]distanceTolChange in units between two consecutive iteration steps
[in]objThe initialized pointcloud ICP Module.
Returns
DW_BAD_CAST - if the provided point cloud ICP handle is invalid.
DW_SUCCESS
Note
both tolerances has to be fulfilled, to declare convergence (i.e. it is a binary AND).

◆ dwPointCloudICP_setCUDAStream()

DW_API_PUBLIC dwStatus dwPointCloudICP_setCUDAStream ( const cudaStream_t  stream,
dwPointCloudICPHandle_t  obj 
)

Sets CUDA stream of point cloud icp.

Parameters
[in]streamHandle to CUDA stream
[in]objHandle to point cloud icp
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudICP_setMaxIterations()

DW_API_PUBLIC dwStatus dwPointCloudICP_setMaxIterations ( uint16_t  maxIterations,
dwPointCloudICPHandle_t  obj 
)

Set maximum number of iterations which need to be executed.

Note that ICP might converge earlier, due to the tolerances set in dwPointCloudICP_setConvergenceTolerance().

Parameters
[in]maxIterationsMaximal number of iterations to execute.
[in]objThe initialized pointcloud ICP Module.
Returns
DW_BAD_CAST - if the provided ICP handle is invalid.
DW_SUCCESS