Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.6.215 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Lidar.h
    Go to the documentation of this file.
    1
    2//
    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-2022 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
    56extern "C" {
    57#endif
    58
    66typedef enum {
    83
    87typedef enum {
    107
    111typedef enum {
    114
    116 DW_LIDAR_INVALIDITY_DW = 1 << 0,
    117
    120
    123
    125
    127#define DW_SENSORS_LIDAR_MAX_RETURNS 10
    128
    130typedef struct dwLidarPointXYZI
    131{
    132 alignas(16) float32_t x;
    137
    139typedef struct dwLidarPointRTHI
    140{
    141 alignas(16) float32_t theta;
    146
    147#define DW_SENSORS_LIDAR_MAX_ROWS 256
    150typedef struct dwLidarProperties
    151{
    152 char8_t deviceString[256];
    157 uint32_t packetsPerSpin;
    161 uint32_t pointsPerSpin;
    162 uint32_t pointStride;
    167 uint32_t numberOfRows;
    177
    180
    184
    187{
    190 uint32_t maxPoints;
    191 uint32_t numPoints;
    202
    204
    208{
    216 uint32_t maxPoints;
    217
    221 uint32_t nPoints;
    222
    234
    239
    243 uint8_t numReturns;
    246
    259
    272
    284
    302 dwSensorHandle_t const sensor);
    303
    317
    333dwStatus dwSensorLidar_processRawData(dwLidarDecodedPacket const** const data, uint8_t const* const rawData, size_t const size,
    334 dwSensorHandle_t const sensor);
    335
    347
    348/*
    349* Sends a message to Lidar sensor.
    350*
    351* @param[in] cmd Command identifier associated to the given message data.
    352* @param[in] data A pointer to the message data.
    353* @param[in] size Size in bytes of the \p data.
    354* @param[in] sensor Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'.
    355*
    356* @return DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_SUPPORTED, DW_FAILURE, DW_SUCCESS
    357*
    358*/
    360dwStatus dwSensorLidar_sendMessage(uint32_t const cmd, uint8_t const* const data,
    361 size_t const size, dwSensorHandle_t const sensor);
    362
    363#ifdef __cplusplus
    364}
    365#endif
    366
    368#endif // DW_SENSORS_LIDAR_LIDAR_H_
    NVIDIA DriveWorks API: Sensors
    NVIDIA DriveWorks API: Core Types
    #define DW_API_PUBLIC
    Definition: Exports.h:54
    dwStatus
    Status definition.
    Definition: Status.h:170
    float float32_t
    Specifies POD types.
    Definition: Types.h:70
    int64_t dwTime_t
    Specifies a timestamp unit, in microseconds.
    Definition: Types.h:82
    dwTime_t hostTimestamp
    Definition: Lidar.h:209
    float32_t azimuthOffsetRad
    Definition: Lidar.h:241
    float32_t theta
    Definition: Lidar.h:141
    uint32_t packetsPerSecond
    Definition: Lidar.h:156
    dwTime_t sensorTimestamp
    Definition: Lidar.h:210
    float32_t minHorizontalAngleRad
    Definition: Lidar.h:223
    uint32_t maxPoints
    Definition: Lidar.h:190
    dwLidarPointRTHI const * pointsRTHI
    Pointer to the array of points in polar coordinates.
    Definition: Lidar.h:233
    float32_t x
    Definition: Lidar.h:132
    float32_t elevationOffsetRad
    Definition: Lidar.h:240
    float32_t y
    Definition: Lidar.h:133
    dwLidarPointXYZI const * pointsXYZI
    Pointer to the array of points in cartesian coordinates.
    Definition: Lidar.h:238
    float32_t intensity
    Definition: Lidar.h:135
    uint32_t pointStride
    Definition: Lidar.h:162
    dwLidarPointRTHI const * pointsRTHI
    Definition: Lidar.h:193
    uint32_t pointsPerPacket
    Definition: Lidar.h:160
    float32_t intensity
    Definition: Lidar.h:144
    uint32_t maxPoints
    Maximum number of points in the pointsRTHI and pointsXYZI arrays in the packet.
    Definition: Lidar.h:216
    char8_t deviceString[256]
    Definition: Lidar.h:152
    float32_t verticalAngles[DW_SENSORS_LIDAR_MAX_ROWS]
    Lidar right-handed polar coord system, vertical angles in spin frame, in rads, length of array with v...
    Definition: Lidar.h:176
    float32_t radius
    Definition: Lidar.h:143
    uint32_t pointsPerSpin
    Definition: Lidar.h:161
    float32_t verticalFOVEnd
    Definition: Lidar.h:170
    uint8_t numReturns
    Definition: Lidar.h:243
    dwLidarDecodedReturn returnData[DW_SENSORS_LIDAR_MAX_RETURNS]
    Definition: Lidar.h:244
    uint32_t packetsPerSpin
    Definition: Lidar.h:157
    uint32_t numPoints
    Definition: Lidar.h:191
    dwLidarReturnType availableReturns
    Bitmask of return types the lidar is configured to.
    Definition: Lidar.h:179
    float32_t phi
    Definition: Lidar.h:142
    uint32_t pointsPerSecond
    Definition: Lidar.h:159
    float32_t maxHorizontalAngleRad
    Definition: Lidar.h:224
    void const * auxData[DW_LIDAR_AUX_DATA_TYPE_COUNT]
    Array of pointers to auxiliary data Supported aux data types are listed in lidar properties.
    Definition: Lidar.h:201
    float32_t horizontalFOVStart
    Definition: Lidar.h:164
    float32_t spinFrequency
    Definition: Lidar.h:154
    float32_t maxVerticalAngleRad
    Definition: Lidar.h:226
    dwTime_t duration
    Definition: Lidar.h:211
    dwLidarReturnType type
    Definition: Lidar.h:188
    uint32_t nPoints
    Current number of valid points in the pointsRTHI and pointsXYZI arrays in the packet.
    Definition: Lidar.h:221
    uint32_t numberOfRows
    Definition: Lidar.h:167
    float32_t z
    Definition: Lidar.h:134
    float32_t verticalFOVStart
    Definition: Lidar.h:169
    float32_t minVerticalAngleRad
    Definition: Lidar.h:225
    float32_t horizontalFOVEnd
    Definition: Lidar.h:165
    uint64_t validAuxInfos
    Bitmask of valid aux info fields based on enum dwLidarAuxDataType.
    Definition: Lidar.h:182
    DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding(dwSensorHandle_t const sensor)
    Enables the decoding of the Lidar packets, which incurs an additional CPU load.
    DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled(bool *const enable, dwSensorHandle_t const sensor)
    Retrieves the state of packet decoding.
    DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(dwLidarDecodedPacket const *const data, dwSensorHandle_t const sensor)
    Returns the data read to the internal pool.
    DW_API_PUBLIC dwStatus dwSensorLidar_getProperties(dwLidarProperties *const lidarProperties, dwSensorHandle_t const sensor)
    Gets information about the Lidar sensor.
    #define DW_SENSORS_LIDAR_MAX_RETURNS
    Maximum number of distinct lidar returns a point cloud can contain.
    Definition: Lidar.h:127
    dwLidarAuxDataType
    An enum for every data element we could possibly return.
    Definition: Lidar.h:87
    #define DW_SENSORS_LIDAR_MAX_ROWS
    Definition: Lidar.h:147
    DW_API_PUBLIC dwStatus dwSensorLidar_sendMessage(uint32_t const cmd, uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
    dwLidarInvalidityFlag
    An enum for specifying invalidity flags.
    Definition: Lidar.h:111
    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.
    DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding(dwSensorHandle_t const sensor)
    Disable the decoding of the Lidar packets, which frees additional CPU load.
    DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const **const data, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
    Reads one scan packet.
    dwLidarReturnType
    Enum to indicate a single return type.
    Definition: Lidar.h:66
    @ DW_LIDAR_AUX_DATA_TYPE_LINEID
    Definition: Lidar.h:98
    @ DW_LIDAR_AUX_DATA_TYPE_BLOCKAGEFLAG
    Definition: Lidar.h:101
    @ DW_LIDAR_AUX_DATA_TYPE_EXISTENCEPROB
    Definition: Lidar.h:93
    @ DW_LIDAR_AUX_DATA_TYPE_COUNT
    Definition: Lidar.h:105
    @ DW_LIDAR_AUX_DATA_TYPE_DATAQUALITY
    Definition: Lidar.h:99
    @ DW_LIDAR_AUX_DATA_TYPE_SENSORID
    Definition: Lidar.h:102
    @ DW_LIDAR_AUX_DATA_TYPE_CROSSTALKPROB
    Definition: Lidar.h:94
    @ DW_LIDAR_AUX_DATA_TYPE_SNR
    Definition: Lidar.h:88
    @ DW_LIDAR_AUX_DATA_TYPE_DETECTORID
    Definition: Lidar.h:97
    @ DW_LIDAR_AUX_DATA_TYPE_V_MPS
    Definition: Lidar.h:92
    @ DW_LIDAR_AUX_DATA_TYPE_VALIDITY
    Definition: Lidar.h:103
    @ DW_LIDAR_AUX_DATA_TYPE_SCANCHECKPOINT
    Definition: Lidar.h:100
    @ DW_LIDAR_AUX_DATA_TYPE_ZONEID
    Definition: Lidar.h:96
    @ DW_LIDAR_AUX_DATA_TYPE_SIGNALWIDTH
    Definition: Lidar.h:89
    @ DW_LIDAR_AUX_DATA_TYPE_SIGNALHEIGHT
    Definition: Lidar.h:90
    @ DW_LIDAR_AUX_DATA_TYPE_TIME
    Definition: Lidar.h:91
    @ DW_LIDAR_AUX_DATA_TYPE_NOISELEVEL
    Definition: Lidar.h:95
    @ DW_LIDAR_AUX_DATA_TYPE_INVALIDITYFLAG
    Definition: Lidar.h:104
    @ DW_LIDAR_INVALIDITY_VEND
    Definition: Lidar.h:119
    @ DW_LIDAR_INVALIDITY_INVALID
    Definition: Lidar.h:122
    @ DW_LIDAR_INVALIDITY_DW
    Definition: Lidar.h:116
    @ DW_LIDAR_INVALIDITY_NONE
    Definition: Lidar.h:113
    @ DW_LIDAR_RETURN_TYPE_5
    Definition: Lidar.h:80
    @ DW_LIDAR_RETURN_TYPE_FIRST
    Definition: Lidar.h:69
    @ DW_LIDAR_RETURN_TYPE_6
    Definition: Lidar.h:81
    @ DW_LIDAR_RETURN_TYPE_1
    Definition: Lidar.h:76
    @ DW_LIDAR_RETURN_TYPE_ANY
    Definition: Lidar.h:67
    @ DW_LIDAR_RETURN_TYPE_STRONGEST
    Definition: Lidar.h:71
    @ DW_LIDAR_RETURN_TYPE_4
    Definition: Lidar.h:79
    @ DW_LIDAR_RETURN_TYPE_LAST
    Definition: Lidar.h:70
    @ DW_LIDAR_RETURN_TYPE_2
    Definition: Lidar.h:77
    @ DW_LIDAR_RETURN_TYPE_ABS_STRONGEST
    Definition: Lidar.h:72
    @ DW_LIDAR_RETURN_TYPE_3
    Definition: Lidar.h:78
    Defines the structure for a decoded lidar packet.
    Definition: Lidar.h:208
    Defines the return structure for an extended decoded lidar packet.
    Definition: Lidar.h:187
    Holds a Lidar point cloud RTHI and the associated intensity.
    Definition: Lidar.h:140
    Holds a Lidar point cloud XYZ and the associated intensity.
    Definition: Lidar.h:131
    Defines the properties of the lidar.
    Definition: Lidar.h:151
    struct dwSensorObject * dwSensorHandle_t
    Handle representing a sensor.
    Definition: Sensors.h:86
    人人超碰97caoporen国产