DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

Lidar.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) 2016-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_SENSORS_LIDAR_LIDAR_H_
48 #define DW_SENSORS_LIDAR_LIDAR_H_
49 
50 #include <dw/core/base/Types.h>
51 
52 #include <dw/sensors/Sensors.h>
53 #include <stdalign.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
66 typedef enum {
84 
86 #define DW_SENSORS_LIDAR_MAX_RETURNS 10
87 
89 typedef struct dwLidarPointXYZI
90 {
91  alignas(16) float32_t x;
96 
97 typedef struct dwLidarPointRTHI
98 {
99  alignas(16) float32_t theta;
104 
105 typedef struct dwLidarDecodedPacket
106 {
111  uint32_t maxPoints;
112  uint32_t nPoints;
123 
124 #define DW_SENSORS_LIDAR_MAX_ROWS 256
126 typedef struct dwLidarProperties
127 {
128  char8_t deviceString[256];
132  uint32_t packetsPerSecond;
133  uint32_t packetsPerSpin;
135  uint32_t pointsPerSecond;
136  uint32_t pointsPerPacket;
137  uint32_t pointsPerSpin;
138  uint32_t pointStride;
143  uint32_t numberOfRows;
153 
157 
170 
183 
194 dwStatus dwSensorLidar_isDecodingEnabled(bool* const enable, dwSensorHandle_t const sensor);
195 
211 dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const** const data, dwTime_t const timeoutUs,
212  dwSensorHandle_t const sensor);
213 
226 
241 dwStatus dwSensorLidar_processRawData(dwLidarDecodedPacket const** const data, uint8_t const* const rawData, size_t const size,
242  dwSensorHandle_t const sensor);
243 
254 dwStatus dwSensorLidar_getProperties(dwLidarProperties* const lidarProperties, dwSensorHandle_t const sensor);
255 
256 #ifdef __cplusplus
257 }
258 #endif
259 
261 #endif // DW_SENSORS_LIDAR_LIDAR_H_
float32_t x
Definition: Lidar.h:91
NVIDIA DriveWorks API: Core Types
uint32_t pointStride
Definition: Lidar.h:138
dwTime_t sensorTimestamp
Definition: Lidar.h:108
float float32_t
Specifies POD types.
Definition: Types.h:70
uint32_t packetsPerSecond
Definition: Lidar.h:132
float32_t intensity
Definition: Lidar.h:94
float32_t minVerticalAngleRad
Definition: Lidar.h:116
float32_t horizontalFOVStart
Definition: Lidar.h:140
DW_API_PUBLIC dwStatus dwSensorLidar_processRawData(dwLidarDecodedPacket const **const data, uint8_t const *const rawData, size_t const size, dwSensorHandle_t const sensor)
Decodes RAW data previously read and returns a pointer to it.
float32_t radius
Definition: Lidar.h:101
float32_t intensity
Definition: Lidar.h:102
uint32_t pointsPerPacket
Definition: Lidar.h:136
uint32_t numberOfRows
Definition: Lidar.h:143
float32_t verticalFOVStart
Definition: Lidar.h:145
float32_t z
Definition: Lidar.h:93
dwLidarPointRTHI const * pointsRTHI
Definition: Lidar.h:120
#define DW_SENSORS_LIDAR_MAX_ROWS
Definition: Lidar.h:124
Holds a Lidar point cloud XYZ and the associated intensity.
Definition: Lidar.h:89
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(bool *const enable, dwSensorHandle_t const sensor)
Retrieves the state of packet decoding.
float32_t maxHorizontalAngleRad
Definition: Lidar.h:115
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:85
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *const lidarProperties, dwSensorHandle_t const sensor)
Gets information about the Lidar sensor.
uint32_t pointsPerSecond
Definition: Lidar.h:135
dwStatus
Status definition.
Definition: Status.h:180
NVIDIA DriveWorks API: Sensors
float32_t minHorizontalAngleRad
Definition: Lidar.h:114
float32_t horizontalFOVEnd
Definition: Lidar.h:141
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
dwLidarReturnType
Enum to indicate a single return type.
Definition: Lidar.h:66
float32_t spinFrequency
Definition: Lidar.h:130
DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding(dwSensorHandle_t const sensor)
Disable the decoding of the Lidar packets, which frees additional CPU load.
uint32_t packetsPerSpin
Definition: Lidar.h:133
DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(dwLidarDecodedPacket const *const data, dwSensorHandle_t const sensor)
Returns the data read to the internal pool.
uint32_t pointsPerSpin
Definition: Lidar.h:137
dwLidarPointXYZI const * pointsXYZI
Definition: Lidar.h:121
dwTime_t hostTimestamp
Definition: Lidar.h:107
uint32_t nPoints
Definition: Lidar.h:112
float32_t verticalFOVEnd
Definition: Lidar.h:146
char char8_t
Definition: Types.h:72
float32_t maxVerticalAngleRad
Definition: Lidar.h:117
uint32_t maxPoints
Definition: Lidar.h:111
Generic enums to capture lidars for which an array of returns is present.
Definition: Lidar.h:77
float32_t phi
Definition: Lidar.h:100
dwLidarReturnType availableReturns
Bitmask of return types the lidar is configured to.
Definition: Lidar.h:155
#define DW_API_PUBLIC
Definition: Exports.h:54
dwTime_t duration
Definition: Lidar.h:109
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const **const data, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads one scan packet.
DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding(dwSensorHandle_t const sensor)
Enables the decoding of the Lidar packets, which incurs an additional CPU load.
float32_t y
Definition: Lidar.h:92