DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

PointCloudICP.h
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
47 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
48 #define DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 typedef struct dwPointCloudICPObject* dwPointCloudICPHandle_t;
57 
61 typedef enum dwPointCloudICPType {
65 
67 
71 typedef struct dwPointCloudICPParams
72 {
74  dwPointCloudICPType icpType;
75 
77  uint32_t maxPoints;
78 
81 
84 
87 
89  uint16_t maxIterations;
90 
92  bool usePriors;
94 
97 typedef bool (*dwPointCloudICPConvergenceCheck)(const dwTransformation3f* prevSrc2Tgt, const dwTransformation3f* newSrc2Tgt, void* userData);
98 
105 {
114 
116 
126 dwStatus dwPointCloudICP_initialize(dwPointCloudICPHandle_t* obj,
127  const dwPointCloudICPParams* params,
128  dwContextHandle_t ctx);
136 dwStatus dwPointCloudICP_reset(dwPointCloudICPHandle_t obj);
137 
145 dwStatus dwPointCloudICP_release(dwPointCloudICPHandle_t obj);
146 
155 
165 dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t* stream,
166  dwPointCloudICPHandle_t obj);
167 
176 dwStatus dwPointCloudICP_setCUDAStream(cudaStream_t const stream,
177  dwPointCloudICPHandle_t obj);
178 
192  const dwPointCloud* targetPCD,
193  const dwTransformation3f* sourceToTarget,
194  dwPointCloudICPHandle_t obj);
195 
207  dwPointCloudICPHandle_t obj);
208 
218 dwStatus dwPointCloudICP_process(dwPointCloudICPHandle_t obj);
219 
231 dwStatus dwPointCloudICP_setConvergenceCriteriaCallback(dwPointCloudICPConvergenceCheck callback, void* userData, dwPointCloudICPHandle_t obj);
232 
246 dwStatus dwPointCloudICP_setConvergenceTolerance(float32_t angleTol, float32_t distanceTol, dwPointCloudICPHandle_t obj);
247 
259 dwStatus dwPointCloudICP_setMaxIterations(uint16_t maxIterations, dwPointCloudICPHandle_t obj);
260 
272 dwStatus dwPointCloudICP_getLastResultStats(dwPointCloudICPResultStats* resultStats, dwPointCloudICPHandle_t obj);
273 
283 dwStatus dwPointCloudICP_getMaximumDepthMapSize(uint32_t* maxDepthMapSize);
284 
285 #ifdef __cplusplus
286 }
287 #endif
288 
289 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
DW_API_PUBLIC dwStatus dwPointCloudICP_process(dwPointCloudICPHandle_t obj)
Estimates the transformation aligns two PointClouds.
float float32_t
Specifies POD types.
Definition: Types.h:70
Defines point cloud data structure.
Definition: PointCloud.h:98
float32_t rmsCost
Weighted root mean square (RMS) cost after last ICP iteration.
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...
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:97
float32_t distanceConvergenceTol
Distance convergence tolerance, change in units between two consecutive iteration steps...
Definition: PointCloudICP.h:86
struct dwPointCloudICPObject * dwPointCloudICPHandle_t
Definition: PointCloudICP.h:56
float32_t angleConvergenceTol
Angle convergence tolerance, change in radians between two consecutive iteration steps.
Definition: PointCloudICP.h:83
Resulting statistics about the latest ICP run.
Specifies a 3D rigid transformation.
Definition: Types.h:467
DW_API_PUBLIC dwStatus dwPointCloudICP_release(dwPointCloudICPHandle_t obj)
Releases a handle of a point cloud icp created using 'dwPointCloudICP_initialize'.
float32_t inlierFraction
Fraction of points which are inliers to the final ICP pose.
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...
dwStatus
Status definition.
Definition: Status.h:180
DW_API_PUBLIC dwStatus dwPointCloudICP_setCUDAStream(cudaStream_t const stream, dwPointCloudICPHandle_t obj)
Sets CUDA stream of point cloud icp.
dwVector2ui depthmapSize
If icpType is DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP, this defines the size of depthmap.
Definition: PointCloudICP.h:80
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...
uint16_t maxIterations
Maximum number of iterations which need to be executed.
Definition: PointCloudICP.h:89
DW_API_PUBLIC dwStatus dwPointCloudICP_initialize(dwPointCloudICPHandle_t *obj, const dwPointCloudICPParams *params, dwContextHandle_t ctx)
Initializes point cloud icp.
Grid based depthmap representation for the lidar point cloud.
Definition: PointCloudICP.h:64
uint32_t numCorrespondences
Number of 3D points which qualify as valid correspondences.
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.
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...
NVIDIA DriveWorks API: Point Cloud Processing
dwPointCloudICPType icpType
Type of the ICP implementation to be used.
Definition: PointCloudICP.h:74
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.
Defines a two-element unsigned-integer vector.
Definition: Types.h:315
DW_API_PUBLIC dwStatus dwPointCloudICP_getDefaultParams(dwPointCloudICPParams *params)
Gets default values of dwPointCloudICPParams object.
Defines point cloud icp parameter.
Definition: PointCloudICP.h:71
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
DW_API_PUBLIC dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t *stream, dwPointCloudICPHandle_t obj)
Gets CUDA stream of point cloud icp.
NVIDIA DriveWorks API: Core Methods
bool usePriors
Controls whether or not ICP uses the initialization pose as a prior in the optimization.
Definition: PointCloudICP.h:92
uint16_t actualNumIterations
How many iterations were actually performed.
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...
DW_API_PUBLIC dwStatus dwPointCloudICP_setMaxIterations(uint16_t maxIterations, dwPointCloudICPHandle_t obj)
Set maximum number of iterations which need to be executed.
uint32_t maxPoints
Maximum number of points that will be pushed to ICP optimization.
Definition: PointCloudICP.h:77
#define DW_API_PUBLIC
Definition: Exports.h:54
dwPointCloudICPType
Defines a type of the Iterative Closest Point (ICP) algorithm.
Definition: PointCloudICP.h:61