DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

PointCloudICP.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2018-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
49 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
50 #define DW_POINTCLOUDPROCESSING_POINTCLOUDICP_H_
51 #include <dw/core/Context.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 typedef struct dwPointCloudICPObject* dwPointCloudICPHandle_t;
59 
63 typedef enum dwPointCloudICPType {
67 
69 
73 typedef struct dwPointCloudICPParams
74 {
76  dwPointCloudICPType icpType;
77 
79  uint32_t maxPoints;
80 
83 
86 
89 
91  uint16_t maxIterations;
92 
94  bool usePriors;
96 
99 typedef bool (*dwPointCloudICPConvergenceCheck)(const dwTransformation3f* prevSrc2Tgt, const dwTransformation3f* newSrc2Tgt, void* userData);
100 
107 {
116 
118 
128 dwStatus dwPointCloudICP_initialize(dwPointCloudICPHandle_t* obj,
129  const dwPointCloudICPParams* params,
130  dwContextHandle_t ctx);
138 dwStatus dwPointCloudICP_reset(dwPointCloudICPHandle_t obj);
139 
147 dwStatus dwPointCloudICP_release(dwPointCloudICPHandle_t obj);
148 
157 
166 dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t* stream,
167  dwPointCloudICPHandle_t obj);
168 
177 dwStatus dwPointCloudICP_setCUDAStream(const cudaStream_t stream,
178  dwPointCloudICPHandle_t obj);
179 
192  const dwPointCloud* targetPCD,
193  const dwTransformation3f* sourceToTarget,
194  dwPointCloudICPHandle_t obj);
195 
206  dwPointCloudICPHandle_t obj);
207 
217 dwStatus dwPointCloudICP_process(dwPointCloudICPHandle_t obj);
218 
230 dwStatus dwPointCloudICP_setConvergenceCriteriaCallback(dwPointCloudICPConvergenceCheck callback, void* userData, dwPointCloudICPHandle_t obj);
231 
245 dwStatus dwPointCloudICP_setConvergenceTolerance(float32_t angleTol, float32_t distanceTol, dwPointCloudICPHandle_t obj);
246 
258 dwStatus dwPointCloudICP_setMaxIterations(uint16_t maxIterations, dwPointCloudICPHandle_t obj);
259 
271 dwStatus dwPointCloudICP_getLastResultStats(dwPointCloudICPResultStats* resultStats, dwPointCloudICPHandle_t obj);
272 
282 dwStatus dwPointCloudICP_getMaximumDepthMapSize(uint32_t* maxDepthMapSize);
283 
284 #ifdef __cplusplus
285 }
286 #endif
287 
288 #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:70
float32_t rmsCost
RMS (weighted) 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 to point cloud icp.
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:99
float32_t distanceConvergenceTol
Distance convergence tolerance, change in units between two consecutive iteration steps...
Definition: PointCloudICP.h:88
struct dwPointCloudICPObject * dwPointCloudICPHandle_t
Definition: PointCloudICP.h:58
NVIDIA DriveWorks API: Core Methods
float32_t angleConvergenceTol
Angle convergence tolerance, change in radians between two consecutive iteration steps.
Definition: PointCloudICP.h:85
Some result stats about the most recent ICP run.
Specifies a 3D rigid transformation.
Definition: Types.h:462
DW_API_PUBLIC dwStatus dwPointCloudICP_release(dwPointCloudICPHandle_t obj)
Releases point cloud icp.
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 stats about latest point cloud ICP run, returns the costs for last pose.
dwStatus
Status definition.
Definition: Status.h:178
dwVector2ui depthmapSize
If icpType is DW_POINT_CLOUD_ICP_TYPE_DEPTH_MAP, this defines the size of depthmap.
Definition: PointCloudICP.h:82
DW_API_PUBLIC dwStatus dwPointCloudICP_reset(dwPointCloudICPHandle_t obj)
Resets point cloud icp.
uint16_t maxIterations
Maximum number of iterations which need to be executed.
Definition: PointCloudICP.h:91
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:66
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)
Set callback to be executed to test convergence.
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.
NVIDIA DriveWorks API: Point Cloud Processing
dwPointCloudICPType icpType
Type of the ICP implementation to be used.
Definition: PointCloudICP.h:76
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:312
DW_API_PUBLIC dwStatus dwPointCloudICP_getDefaultParams(dwPointCloudICPParams *params)
Gets default point cloud icp parameters.
Defines point cloud icp parameter.
Definition: PointCloudICP.h:73
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
DW_API_PUBLIC dwStatus dwPointCloudICP_getCUDAStream(cudaStream_t *stream, dwPointCloudICPHandle_t obj)
Gets CUDA stream of point cloud icp.
bool usePriors
Controls whether or not ICP uses the initialization pose as a prior in the optimization.
Definition: PointCloudICP.h:94
uint16_t actualNumIterations
How many iterations were actually performed.
DW_API_PUBLIC dwStatus dwPointCloudICP_bindOutput(dwTransformation3f *pose, dwPointCloudICPHandle_t obj)
Binds output buffer to point cloud icp.
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:79
#define DW_API_PUBLIC
Definition: Exports.h:56
dwPointCloudICPType
Defines point cloud icp type.
Definition: PointCloudICP.h:63
DW_API_PUBLIC dwStatus dwPointCloudICP_setCUDAStream(const cudaStream_t stream, dwPointCloudICPHandle_t obj)
Sets CUDA stream of point cloud icp.