DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

PointCloud.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 
46 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUD_H_
47 #define DW_POINTCLOUDPROCESSING_POINTCLOUD_H_
48 
49 #include <dw/core/base/Types.h>
50 #include <dw/sensors/lidar/Lidar.h>
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
60 typedef enum {
64 
68 typedef struct
69 {
70  uint32_t layerIdx;
71  uint32_t size;
72  const void* points;
73 
75 
79 typedef struct
80 {
81  uint32_t elementSize;
82  uint32_t channelIdx;
83  uint32_t size;
84 
88  void* data;
89 
91 
92 #define DW_POINT_CLOUD_MAX_LAYERS 16U
93 #define DW_POINT_CLOUD_MAX_AUX_CHANNELS 16U
94 
98 typedef struct
99 {
102  bool organized;
103 
105 
106  void* points;
107  uint32_t capacity;
108  uint32_t size;
109 
112 
113  uint32_t maxPointsPerLayer;
114  uint32_t numLayers;
116 
117  uint32_t numAuxChannels;
119 
120 } dwPointCloud;
121 
140 
150 
168  dwPointCloudFormat const format,
169  dwMemoryType const memoryType,
170  uint32_t const maxPointsPerLayer,
171  uint32_t const numRequestedLayers,
172  uint32_t const* auxChannelsElemSize,
173  uint32_t const numRequestedAuxChannels);
174 
187 
188 #ifdef __cplusplus
189 }
190 #endif
191 
192 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUD_H_
NVIDIA DriveWorks API: Core Types
#define DW_POINT_CLOUD_MAX_AUX_CHANNELS
Definition: PointCloud.h:93
#define DW_POINT_CLOUD_MAX_LAYERS
Definition: PointCloud.h:92
Defines point cloud data structure.
Definition: PointCloud.h:98
NVIDIA DriveWorks API: Lidar
uint32_t elementSize
Size in bytes of an element in the aux buffer.
Definition: PointCloud.h:81
uint32_t channelIdx
Channel index the aux data refers to.
Definition: PointCloud.h:82
uint32_t size
Number of elements in a channel.
Definition: PointCloud.h:83
Struct holding information about a single point cloud layer.
Definition: PointCloud.h:68
DW_API_PUBLIC dwStatus dwPointCloud_destroy(dwPointCloud *pointCloud)
Destroy point cloud buffers.
DW_API_PUBLIC dwStatus dwPointCloud_create(dwPointCloud *pointCloud, dwPointCloudFormat const format, dwMemoryType const memoryType, uint32_t const maxPointsPerLayer, uint32_t const numRequestedLayers, uint32_t const *auxChannelsElemSize, uint32_t const numRequestedAuxChannels)
Create point cloud with layers and aux channel information.
dwTime_t hostStartTimestamp
Point cloud start timestamp.
Definition: PointCloud.h:110
const void * points
Pointer to the start of the data for this layer.
Definition: PointCloud.h:72
DW_API_PUBLIC dwStatus dwPointCloud_createBuffer(dwPointCloud *buffer)
Allocates memory for point cloud data structure.
dwTime_t timestamp
Time when the point cloud capturing is finished.
Definition: PointCloud.h:104
uint32_t capacity
numLayers * maxPointsPerLayer
Definition: PointCloud.h:107
dwPointCloudFormat
Defines point format.
Definition: PointCloud.h:60
uint32_t size
Number of points in the cloud including all layers.
Definition: PointCloud.h:108
dwMemoryType
Memory type definitions.
Definition: Types.h:179
void * points
Pointer to memory buffer of all points. Not compact, but contiguous with invalid points in between la...
Definition: PointCloud.h:106
dwStatus
Status definition.
Definition: Status.h:180
dwTime_t hostEndTimestamp
Point cloud end timestamp.
Definition: PointCloud.h:111
void * data
Pointer to the start of the data for this channel.
Definition: PointCloud.h:88
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
uint32_t layerIdx
Index of a layer within a point cloud.
Definition: PointCloud.h:70
bool organized
Flag indicating the data is ordered on the 3D grid.
Definition: PointCloud.h:102
Struct holding information about aux channel.
Definition: PointCloud.h:79
dwPointCloudFormat format
Format of a buffer.
Definition: PointCloud.h:101
dwMemoryType type
Defines type of a memory GPU or CPU.
Definition: PointCloud.h:100
uint32_t maxPointsPerLayer
Maximum number of points in layer (use even number of points to benefit from aligned memory access pe...
Definition: PointCloud.h:113
Polar 3D coordinate + intensity.
Definition: PointCloud.h:62
uint32_t numAuxChannels
Number of aux channels in a point cloud.
Definition: PointCloud.h:117
uint32_t numLayers
Number of layers in a point cloud.
Definition: PointCloud.h:114
#define DW_API_PUBLIC
Definition: Exports.h:54
Cartesian 3D coordinate + intensity.
Definition: PointCloud.h:61
DW_API_PUBLIC dwStatus dwPointCloud_destroyBuffer(dwPointCloud *buffer)
Destroys allocated memory for point cloud data structure.
uint32_t size
Number of points in a layer (.
Definition: PointCloud.h:71