DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Lidar.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) 2016-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_SENSORS_LIDAR_LIDAR_H_
50 #define DW_SENSORS_LIDAR_LIDAR_H_
51 
52 #include <dw/core/Types.h>
53 
54 #include <dw/sensors/Sensors.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
61 typedef struct dwLidarPointXYZI
62 {
63  alignas(16) float32_t x;
68 
69 typedef struct dwLidarPointRTHI
70 {
71  alignas(16) float32_t theta;
76 
77 typedef struct dwLidarDecodedPacket
78 {
83  uint32_t maxPoints;
84  uint32_t nPoints;
91  bool scanComplete;
95 
96 #define DW_SENSORS_LIDAR_MAX_ROWS 256
97 
98 typedef struct dwLidarProperties
99 {
100  char8_t deviceString[256];
104  uint32_t packetsPerSecond;
105  uint32_t packetsPerSpin;
107  uint32_t pointsPerSecond;
108  uint32_t pointsPerPacket;
109  uint32_t pointsPerSpin;
110  uint32_t pointStride;
115  uint32_t numberOfRows;
126 
139 
152 
164 
181  dwSensorHandle_t sensor);
182 
195 
210 dwStatus dwSensorLidar_processRawData(const dwLidarDecodedPacket** data, const uint8_t* rawData, size_t size,
211  dwSensorHandle_t sensor);
212 
224 
225 #ifdef __cplusplus
226 }
227 #endif
228 
230 #endif // DW_SENSORS_LIDAR_LIDAR_H_
float32_t x
Definition: Lidar.h:63
uint32_t pointStride
Definition: Lidar.h:110
dwTime_t sensorTimestamp
Definition: Lidar.h:80
DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding(dwSensorHandle_t sensor)
Enables the decoding of the Lidar packets, which incurs an additional CPU load.
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
uint32_t packetsPerSecond
Definition: Lidar.h:104
float32_t intensity
Definition: Lidar.h:66
float32_t minVerticalAngleRad
Definition: Lidar.h:88
DW_API_PUBLIC dwStatus dwSensorLidar_processRawData(const dwLidarDecodedPacket **data, const uint8_t *rawData, size_t size, dwSensorHandle_t sensor)
Decodes RAW data previously read and returns a pointer to it.
float32_t horizontalFOVStart
Definition: Lidar.h:112
float32_t radius
Definition: Lidar.h:73
float32_t intensity
Definition: Lidar.h:74
uint32_t pointsPerPacket
Definition: Lidar.h:108
uint32_t numberOfRows
Definition: Lidar.h:115
float32_t verticalFOVStart
Definition: Lidar.h:117
float32_t z
Definition: Lidar.h:65
#define DW_SENSORS_LIDAR_MAX_ROWS
maximal number of rows in dwLidarProperties
Definition: Lidar.h:96
Holds a Lidar point cloud XYZ and the associated intensity.
Definition: Lidar.h:61
float32_t maxHorizontalAngleRad
Definition: Lidar.h:87
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:88
uint32_t pointsPerSecond
Definition: Lidar.h:107
dwStatus
Status definition.
Definition: Status.h:178
NVIDIA DriveWorks API: Sensors
float32_t minHorizontalAngleRad
Definition: Lidar.h:86
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *lidarProperties, dwSensorHandle_t sensor)
Gets information about the Lidar sensor.
float32_t horizontalFOVEnd
Definition: Lidar.h:113
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(const dwLidarDecodedPacket **data, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads one scan packet.
float32_t spinFrequency
Definition: Lidar.h:102
const dwLidarPointRTHI * pointsRTHI
Definition: Lidar.h:92
uint32_t packetsPerSpin
Definition: Lidar.h:105
uint32_t pointsPerSpin
Definition: Lidar.h:109
const dwLidarPointXYZI * pointsXYZI
Definition: Lidar.h:93
DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(const dwLidarDecodedPacket *scan, dwSensorHandle_t sensor)
Returns the data read to the internal pool.
dwTime_t hostTimestamp
Definition: Lidar.h:79
uint32_t nPoints
Definition: Lidar.h:84
float32_t verticalFOVEnd
Definition: Lidar.h:118
char char8_t
Definition: Types.h:72
float32_t maxVerticalAngleRad
Definition: Lidar.h:89
uint32_t maxPoints
Definition: Lidar.h:83
DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding(dwSensorHandle_t sensor)
Disable the decoding of the Lidar packets, which frees additional CPU load.
float32_t phi
Definition: Lidar.h:72
#define DW_API_PUBLIC
Definition: Exports.h:56
dwTime_t duration
Definition: Lidar.h:81
float32_t y
Definition: Lidar.h:64
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(bool *enable, dwSensorHandle_t sensor)
Retrieves the state of packet decoding.