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.
|
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...
|
|
◆ 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. |
◆ dwPointCloudICPConvergenceCheck
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
◆ 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.
◆ dwPointCloudICP_bindInput()
Binds Input buffers to point cloud icp.
- Parameters
-
[in] | sourcePCD | Pointer to source point cloud input buffer. Must be in cartesian coordinate space. |
[in] | targetPCD | Pointer to target point cloud input buffer. Must be in cartesian coordinate space. |
[in] | sourceToTarget | Pointer to the initial transformation
that transforms from source to target point cloud |
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_bindOutput()
Binds output buffer to point cloud icp.
- Parameters
-
[out] | pose | Pointer to the transformation that aligns
the source point cloud with target point cloud |
[in] | obj | Handle to point cloud icp module |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_getCUDAStream()
Gets CUDA stream of point cloud icp.
- Parameters
-
[out] | stream | Pointer to CUDA stream handle |
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_getDefaultParams()
Gets default point cloud icp parameters.
- Parameters
-
[out] | params | Pointer to point cloud icp parameters |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_getLastResultStats()
Get stats about latest point cloud ICP run, returns the costs for last pose.
- Parameters
-
[out] | resultStats | Struct with stats about latest ICP run |
[in] | obj | Handle 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()
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()
Initializes point cloud icp.
- Parameters
-
[out] | obj | Handle to point cloud icp |
[in] | params | Pointer to point cloud icp parameters |
[in] | ctx | Handle to the context |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_process()
Estimates the transformation aligns two PointClouds.
- Parameters
-
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
DW_CALL_NOT_ALLOWED - input and out buffers are not bound
◆ dwPointCloudICP_release()
Releases point cloud icp.
- Parameters
-
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_reset()
Resets point cloud icp.
- Parameters
-
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_setConvergenceCriteriaCallback()
Set callback to be executed to test convergence.
If nullptr, the default test will be used.
- Parameters
-
[in] | callback | Method to execute to test for convergence |
[in] | userData | User data to be passed to the convergence callback |
[in] | obj | Handle to point cloud icp |
- Returns
- DW_BAD_CAST - if the provided ICP handle is invalid.
DW_SUCCESS
◆ dwPointCloudICP_setConvergenceTolerance()
Set tolerances used by the default ICP convergence criteria method.
- Parameters
-
[in] | angleTol | Change in radians between two consecutive iteration steps |
[in] | distanceTol | Change in units between two consecutive iteration steps |
[in] | obj | The 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()
Sets CUDA stream of point cloud icp.
- Parameters
-
[in] | stream | Handle to CUDA stream |
[in] | obj | Handle to point cloud icp |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
◆ dwPointCloudICP_setMaxIterations()
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] | maxIterations | Maximal number of iterations to execute. |
[in] | obj | The initialized pointcloud ICP Module. |
- Returns
- DW_BAD_CAST - if the provided ICP handle is invalid.
DW_SUCCESS