DriveWorks SDK Reference
4.0.0 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 
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 
60 typedef struct dwLidarPointXYZI
61 {
62  alignas(16) float32_t x;
67 
68 typedef struct dwLidarPointRTHI
69 {
70  alignas(16) float32_t theta;
75 
76 typedef struct dwLidarDecodedPacket
77 {
82  uint32_t maxPoints;
83  uint32_t nPoints;
90  bool scanComplete;
94 
95 #define DW_SENSORS_LIDAR_MAX_ROWS 256
96 
97 typedef struct dwLidarProperties
98 {
99  char8_t deviceString[256];
103  uint32_t packetsPerSecond;
104  uint32_t packetsPerSpin;
106  uint32_t pointsPerSecond;
107  uint32_t pointsPerPacket;
108  uint32_t pointsPerSpin;
109  uint32_t pointStride;
114  uint32_t numberOfRows;
125 
138 
151 
163 
180  dwSensorHandle_t sensor);
181 
194 
209 dwStatus dwSensorLidar_processRawData(dwLidarDecodedPacket const** data, uint8_t const* rawData, size_t size,
210  dwSensorHandle_t sensor);
211 
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
229 #endif // DW_SENSORS_LIDAR_LIDAR_H_
float32_t x
Definition: Lidar.h:62
NVIDIA DriveWorks API: Core Types
uint32_t pointStride
Definition: Lidar.h:109
dwTime_t sensorTimestamp
Definition: Lidar.h:79
DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding(dwSensorHandle_t sensor)
Enables the decoding of the Lidar packets, which incurs an additional CPU load.
float float32_t
Specifies POD types.
Definition: Types.h:70
uint32_t packetsPerSecond
Definition: Lidar.h:103
float32_t intensity
Definition: Lidar.h:65
float32_t minVerticalAngleRad
Definition: Lidar.h:87
float32_t horizontalFOVStart
Definition: Lidar.h:111
float32_t radius
Definition: Lidar.h:72
float32_t intensity
Definition: Lidar.h:73
uint32_t pointsPerPacket
Definition: Lidar.h:107
uint32_t numberOfRows
Definition: Lidar.h:114
float32_t verticalFOVStart
Definition: Lidar.h:116
float32_t z
Definition: Lidar.h:64
dwLidarPointRTHI const * pointsRTHI
Definition: Lidar.h:91
#define DW_SENSORS_LIDAR_MAX_ROWS
maximal number of rows in dwLidarProperties
Definition: Lidar.h:95
Holds a Lidar point cloud XYZ and the associated intensity.
Definition: Lidar.h:60
float32_t maxHorizontalAngleRad
Definition: Lidar.h:86
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:84
uint32_t pointsPerSecond
Definition: Lidar.h:106
dwStatus
Status definition.
Definition: Status.h:180
NVIDIA DriveWorks API: Sensors
float32_t minHorizontalAngleRad
Definition: Lidar.h:85
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *lidarProperties, dwSensorHandle_t sensor)
Gets information about the Lidar sensor.
float32_t horizontalFOVEnd
Definition: Lidar.h:112
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
float32_t spinFrequency
Definition: Lidar.h:101
uint32_t packetsPerSpin
Definition: Lidar.h:104
uint32_t pointsPerSpin
Definition: Lidar.h:108
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const **data, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads one scan packet.
dwLidarPointXYZI const * pointsXYZI
Definition: Lidar.h:92
dwTime_t hostTimestamp
Definition: Lidar.h:78
uint32_t nPoints
Definition: Lidar.h:83
float32_t verticalFOVEnd
Definition: Lidar.h:117
char char8_t
Definition: Types.h:72
DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(dwLidarDecodedPacket const *scan, dwSensorHandle_t sensor)
Returns the data read to the internal pool.
float32_t maxVerticalAngleRad
Definition: Lidar.h:88
uint32_t maxPoints
Definition: Lidar.h:82
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:71
DW_API_PUBLIC dwStatus dwSensorLidar_processRawData(dwLidarDecodedPacket const **data, uint8_t const *rawData, size_t size, dwSensorHandle_t sensor)
Decodes RAW data previously read and returns a pointer to it.
#define DW_API_PUBLIC
Definition: Exports.h:54
dwTime_t duration
Definition: Lidar.h:80
float32_t y
Definition: Lidar.h:63
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(bool *enable, dwSensorHandle_t sensor)
Retrieves the state of packet decoding.