DriveWorks SDK Reference
3.0.4260 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 
57 typedef struct
58 {
59  alignas(16) float32_t x;
64 
65 typedef struct
66 {
67  alignas(16) float32_t theta;
72 
73 typedef struct dwLidarDecodedPacket
74 {
79  uint32_t maxPoints;
80  uint32_t nPoints;
82  bool scanComplete;
86 
87 typedef struct
88 {
89  char8_t deviceString[256];
93  uint32_t packetsPerSecond;
94  uint32_t packetsPerSpin;
96  uint32_t pointsPerSecond;
97  uint32_t pointsPerPacket;
98  uint32_t pointsPerSpin;
99  uint32_t pointStride;
101 
102 #ifdef __cplusplus
103 extern "C" {
104 #endif
105 
118 
131 
143 
160  dwSensorHandle_t sensor);
161 
174 
189 dwStatus dwSensorLidar_processRawData(const dwLidarDecodedPacket** data, const uint8_t* rawData, size_t size,
190  dwSensorHandle_t sensor);
191 
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
209 #endif // DW_SENSORS_LIDAR_LIDAR_H_
uint32_t pointStride
Definition: Lidar.h:99
dwTime_t sensorTimestamp
Definition: Lidar.h:76
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:93
float32_t intensity
Definition: Lidar.h:62
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 radius
Definition: Lidar.h:69
float32_t intensity
Definition: Lidar.h:70
uint32_t pointsPerPacket
Definition: Lidar.h:97
float32_t z
Definition: Lidar.h:61
Holds a Lidar point cloud XYZ and the associated intensity.
Definition: Lidar.h:57
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:88
uint32_t pointsPerSecond
Definition: Lidar.h:96
dwStatus
Status definition.
Definition: Status.h:166
NVIDIA DriveWorks API: Sensors
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *lidarProperties, dwSensorHandle_t sensor)
Gets information about the Lidar sensor.
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:91
const dwLidarPointRTHI * pointsRTHI
Definition: Lidar.h:83
uint32_t packetsPerSpin
Definition: Lidar.h:94
uint32_t pointsPerSpin
Definition: Lidar.h:98
const dwLidarPointXYZI * pointsXYZI
Definition: Lidar.h:84
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:75
uint32_t nPoints
Definition: Lidar.h:80
char char8_t
Definition: Types.h:72
uint32_t maxPoints
Definition: Lidar.h:79
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:68
#define DW_API_PUBLIC
Definition: Exports.h:56
dwTime_t duration
Definition: Lidar.h:77
float32_t y
Definition: Lidar.h:60
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(bool *enable, dwSensorHandle_t sensor)
Retrieves the state of packet decoding.