NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
PointCloudICP.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
29 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
30 #define DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
31 #include <dw/core/context/Context.h>
32 #include <dw/pointcloudprocessing/pointcloud/PointCloud.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 typedef struct dwPointCloudICPObject* dwPointCloudICPHandle_t;
39 
43 typedef enum dwPointCloudICPType {
47 
49 
53 typedef struct dwPointCloudICPParams
54 {
57 
59  uint32_t maxPoints;
60 
63 
66 
69 
71  uint16_t maxIterations;
72 
74  bool usePriors;
76 
79 typedef bool (*dwPointCloudICPConvergenceCheck)(const dwTransformation3f* prevSrc2Tgt, const dwTransformation3f* newSrc2Tgt, void* userData);
80 
87 {
96 
98 
127 
140 
153 
167 dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t* stream,
169 
182 dwStatus dwPointCloudICP_setCUDAStream(cudaStream_t const stream,
184 
202  const dwPointCloud* targetPCD,
203  const dwTransformation3f* sourceToTarget,
205 
222 
245 
260 
277 
296 
313 
330 
344 dwStatus dwPointCloudICP_getMaximumDepthMapSize(uint32_t* maxDepthMapSize);
345 
346 #ifdef __cplusplus
347 }
348 #endif
349 
350 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
dwPointCloudICP_process
DW_API_PUBLIC dwStatus dwPointCloudICP_process(dwPointCloudICPHandle_t obj)
Estimates the transformation aligns two PointClouds.
dwPointCloudICPParams
Defines point cloud icp parameter.
Definition: PointCloudICP.h:53
dwPointCloudICP_bindInput
DW_API_PUBLIC dwStatus dwPointCloudICP_bindInput(const dwPointCloud *sourcePCD, const dwPointCloud *targetPCD, const dwTransformation3f *sourceToTarget, dwPointCloudICPHandle_t obj)
Binds input buffers of a source and a target point clouds as well as a buffer with an initial transfo...
dwPointCloud
Defines point cloud data structure.
Definition: PointCloud.h:80
ctx
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const const dwContextHandle_t ctx
Definition: PointCloudRangeImageCreator.h:293
dwPointCloudICPConvergenceCheck
bool(* dwPointCloudICPConvergenceCheck)(const dwTransformation3f *prevSrc2Tgt, const dwTransformation3f *newSrc2Tgt, void *userData)
Callback function to be executed by ICP module allowing user to overwrite default convergence criteri...
Definition: PointCloudICP.h:79
dwPointCloudICPParams::depthmapSize
dwVector2ui depthmapSize
If icpType is DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP, this defines the size of depthmap.
Definition: PointCloudICP.h:62
dwVector2ui
Defines a two-element unsigned-integer vector.
Definition: MatrixTypes.h:63
dwPointCloudICPHandle_t
struct dwPointCloudICPObject * dwPointCloudICPHandle_t
Definition: PointCloudICP.h:38
dwPointCloudICPResultStats
struct dwPointCloudICPResultStats dwPointCloudICPResultStats
Resulting statistics about the latest ICP run.
dwPointCloudICPResultStats::inlierFraction
float32_t inlierFraction
Fraction of points which are inliers to the final ICP pose.
Definition: PointCloudICP.h:93
dwPointCloudICPResultStats
Resulting statistics about the latest ICP run.
Definition: PointCloudICP.h:86
dwPointCloudICP_release
DW_API_PUBLIC dwStatus dwPointCloudICP_release(dwPointCloudICPHandle_t obj)
Releases a handle of a point cloud icp created using 'dwPointCloudICP_initialize'.
dwPointCloudICP_dryrunEstimation
DW_API_PUBLIC dwStatus dwPointCloudICP_dryrunEstimation(dwPointCloudICPHandle_t obj)
Dryrun the point cloud estimation on GPU to record CUDAGraph.
dwPointCloudICPParams::angleConvergenceTol
float32_t angleConvergenceTol
Angle convergence tolerance, change in radians between two consecutive iteration steps.
Definition: PointCloudICP.h:65
dwPointCloudICPParams::maxIterations
uint16_t maxIterations
Maximum number of iterations which need to be executed.
Definition: PointCloudICP.h:71
float32_t
float float32_t
Specifies POD types.
Definition: BasicTypes.h:41
dwPointCloudICP_setConvergenceCriteriaCallback
DW_API_PUBLIC dwStatus dwPointCloudICP_setConvergenceCriteriaCallback(dwPointCloudICPConvergenceCheck callback, void *userData, dwPointCloudICPHandle_t obj)
Allows to set a user-defined callback to be executed for ICP convergence test.
dwPointCloudICP_getLastResultStats
DW_API_PUBLIC dwStatus dwPointCloudICP_getLastResultStats(dwPointCloudICPResultStats *resultStats, dwPointCloudICPHandle_t obj)
Get statistics about latest point cloud ICP run, returns the costs for last pose (see a description o...
dwPointCloudICP_setCUDAStream
DW_API_PUBLIC dwStatus dwPointCloudICP_setCUDAStream(cudaStream_t const stream, dwPointCloudICPHandle_t obj)
Sets CUDA stream of point cloud icp.
dwPointCloudICPParams::usePriors
bool usePriors
Controls whether or not ICP uses the initialization pose as a prior in the optimization.
Definition: PointCloudICP.h:74
dwPointCloudICP_reset
DW_API_PUBLIC dwStatus dwPointCloudICP_reset(dwPointCloudICPHandle_t obj)
Resets pointers to the source, target point clouds and an output pose to a null pointer value.
dwPointCloudICP_getMaximumDepthMapSize
DW_API_PUBLIC dwStatus dwPointCloudICP_getMaximumDepthMapSize(uint32_t *maxDepthMapSize)
Get the maximum allowed size of the depth map in number of points supported by the ICP implementation...
dwPointCloudICP_initialize
DW_API_PUBLIC dwStatus dwPointCloudICP_initialize(dwPointCloudICPHandle_t *obj, const dwPointCloudICPParams *params, dwContextHandle_t ctx)
Initializes point cloud icp.
dwPointCloudICPResultStats::actualNumIterations
uint16_t actualNumIterations
How many iterations were actually performed.
Definition: PointCloudICP.h:89
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.
dwPointCloudICPParams
struct dwPointCloudICPParams dwPointCloudICPParams
Defines point cloud icp parameter.
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwPointCloudICP_getDefaultParams
DW_API_PUBLIC dwStatus dwPointCloudICP_getDefaultParams(dwPointCloudICPParams *params)
Gets default values of dwPointCloudICPParams object.
dwPointCloudICPParams::icpType
dwPointCloudICPType icpType
Type of the ICP implementation to be used.
Definition: PointCloudICP.h:56
DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP
@ DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP
Grid based depthmap representation for the lidar point cloud.
Definition: PointCloudICP.h:46
dwPointCloudICP_getCUDAStream
DW_API_PUBLIC dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t *stream, dwPointCloudICPHandle_t obj)
Gets CUDA stream of point cloud icp.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwTransformation3f
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:226
dwPointCloudICPResultStats::rmsCost
float32_t rmsCost
Weighted root mean square (RMS) cost after last ICP iteration.
Definition: PointCloudICP.h:91
dwPointCloudICP_setMaxIterations
DW_API_PUBLIC dwStatus dwPointCloudICP_setMaxIterations(uint16_t maxIterations, dwPointCloudICPHandle_t obj)
Set maximum number of iterations which need to be executed.
params
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
Definition: PointCloudRangeImageCreator.h:292
dwPointCloudICPResultStats::numCorrespondences
uint32_t numCorrespondences
Number of 3D points which qualify as valid correspondences.
Definition: PointCloudICP.h:95
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
dwPointCloudICPParams::distanceConvergenceTol
float32_t distanceConvergenceTol
Distance convergence tolerance, change in units between two consecutive iteration steps.
Definition: PointCloudICP.h:68
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwPointCloudICPType
dwPointCloudICPType
Defines a type of the Iterative Closest Point (ICP) algorithm.
Definition: PointCloudICP.h:43
dwPointCloudICP_bindOutput
DW_API_PUBLIC dwStatus dwPointCloudICP_bindOutput(dwTransformation3f *pose, dwPointCloudICPHandle_t obj)
Binds an output buffer to the resulting transformation between a source and a target point clouds.
dwPointCloudICPParams::maxPoints
uint32_t maxPoints
Maximum number of points that will be pushed to ICP optimization.
Definition: PointCloudICP.h:59