DriveWorks SDK Reference

| 0.6.67 Release

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 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 
46 #ifndef DW_SENSORS_LIDAR_LIDAR_H__
47 #define DW_SENSORS_LIDAR_LIDAR_H__
48 
49 #include <dw/core/Config.h>
50 #include <dw/core/Types.h>
51 
52 #include <dw/sensors/Sensors.h>
53 
54 #pragma pack(push,1) // Make sure we have consistent structure packings
55 
57 typedef struct
58 {
64 
65 typedef struct
66 {
72 
73 typedef struct dwLidarDecodedPacket {
74  uint64_t hostTimestamp;
75  uint64_t sensorTimestamp;
76  uint64_t duration;
78  uint32_t maxPoints;
79  uint32_t nPoints;
80  uint32_t stride;
81  const void *points;
85 
86 typedef struct
87 {
88  char deviceString[256];
92  uint32_t packetsPerSecond;
93  uint32_t packetsPerSpin;
95  uint32_t pointsPerSecond;
96  uint32_t pointsPerPacket;
97  uint32_t pointsPerSpin;
98  uint32_t pointStride;
100 
101 #pragma pack(pop)
102 
103 typedef enum
104 {
108 
109 
110 #ifdef __cplusplus
111 extern "C" {
112 #endif
113 
126 
139 
152 
165 
177 
193  dwSensorHandle_t sensor);
194 
207 
222 dwStatus dwSensorLidar_processRawData(const dwLidarDecodedPacket **data, const uint8_t *rawData, size_t size,
223  dwSensorHandle_t sensor);
224 
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
242 #endif // DW_SENSORS_LIDAR_LIDAR_H__
float32_t x
Definition: Lidar.h:59
uint32_t pointStride
Definition: Lidar.h:98
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:77
uint32_t packetsPerSecond
Definition: Lidar.h:92
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.
DW_API_PUBLIC dwStatus dwSensorLidar_setDecodingFormat(dwLidarDecodeFormat format, dwSensorHandle_t sensor)
Sets decoding format of the point cloud.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:89
uint32_t pointsPerPacket
Definition: Lidar.h:96
float32_t theta
Definition: Lidar.h:67
float32_t z
Definition: Lidar.h:61
float32_t intensity
Definition: Lidar.h:70
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:80
uint32_t pointsPerSecond
Definition: Lidar.h:95
dwStatus
Status definition.
Definition: Status.h:167
NVIDIA DriveWorks API: Sensors
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *lidarProperties, dwSensorHandle_t sensor)
Gets information about the Lidar sensor.
uint64_t duration
Definition: Lidar.h:76
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(const dwLidarDecodedPacket **data, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads one scan packet.
uint64_t hostTimestamp
Definition: Lidar.h:74
dwLidarDecodeFormat
Definition: Lidar.h:103
float32_t spinFrequency
Definition: Lidar.h:90
uint32_t packetsPerSpin
Definition: Lidar.h:93
const void * points
Pointer to the array of points.
Definition: Lidar.h:81
uint32_t pointsPerSpin
Definition: Lidar.h:97
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(dwBool *enable, dwSensorHandle_t sensor)
Retrieves the state of packet decoding.
DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(const dwLidarDecodedPacket *scan, dwSensorHandle_t sensor)
Returns the data read to the internal pool.
uint8_t dwBool
Definition: Types.h:79
uint32_t nPoints
Definition: Lidar.h:79
float32_t radius
Definition: Lidar.h:69
uint64_t sensorTimestamp
Definition: Lidar.h:75
uint32_t maxPoints
Definition: Lidar.h:78
DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding(dwSensorHandle_t sensor)
Disable the decoding of the Lidar packets, which frees additional CPU load.
DW_API_PUBLIC dwStatus dwSensorLidar_getDecodingFormat(dwLidarDecodeFormat *format, dwSensorHandle_t sensor)
Gets the selected decoding format of the point cloud.
float32_t phi
Definition: Lidar.h:68
uint32_t stride
Definition: Lidar.h:80
#define DW_API_PUBLIC
Definition: Exports.h:76
float32_t y
Definition: Lidar.h:60