NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release

Detailed Description

Defines the Lidar sensor types.

Defines the Lidar sensor methods.

Data Structures

struct  dwLidarScanPatternRayValidity
 Holds validity flags for attributes of dwLidarRay. More...
 
struct  dwLidarScanPattern
 Holds a Lidar scan pattern. More...
 
struct  dwLidarPointXYZI
 Holds a Lidar point cloud XYZ and the associated intensity. More...
 
struct  dwLidarPointRTHI
 Holds a Lidar point cloud RTHI and the associated intensity. More...
 
struct  dwLidarProperties
 Defines the properties of the lidar. More...
 
struct  dwLidarDecodedReturn
 Defines the return structure for an extended decoded lidar packet. More...
 
struct  dwLidarDecodedPacket
 Defines the structure for a decoded lidar packet. More...
 

Macros

#define DW_SENSORS_LIDAR_MAX_RETURNS   10
 Maximum number of distinct lidar returns a point cloud can contain. More...
 
#define DW_SENSORS_LIDAR_MAX_ROWS   360
 maximal number of rows in dwLidarProperties More...
 

Typedefs

typedef struct dwLidarScanPatternRayValidity dwLidarScanPatternRayValidity
 Holds validity flags for attributes of dwLidarRay. More...
 
typedef struct dwLidarScanPattern dwLidarScanPattern
 Holds a Lidar scan pattern. More...
 
typedef struct dwLidarPointXYZI dwLidarPointXYZI
 Holds a Lidar point cloud XYZ and the associated intensity. More...
 
typedef struct dwLidarPointRTHI dwLidarPointRTHI
 Holds a Lidar point cloud RTHI and the associated intensity. More...
 
typedef struct dwLidarProperties dwLidarProperties
 Defines the properties of the lidar. More...
 
typedef struct dwLidarDecodedReturn dwLidarDecodedReturn
 Defines the return structure for an extended decoded lidar packet. More...
 
typedef struct dwLidarSSI dwLidarDecodedSSI
 Forward declearation since not available as of current release. Will be added in future release. More...
 
typedef struct dwLidarDecodedPacket dwLidarDecodedPacket
 Defines the structure for a decoded lidar packet. More...
 

Enumerations

enum  dwLidarReturnType {
  DW_LIDAR_RETURN_TYPE_ANY = 0,
  DW_LIDAR_RETURN_TYPE_FIRST = 1 << 0,
  DW_LIDAR_RETURN_TYPE_LAST = 1 << 1,
  DW_LIDAR_RETURN_TYPE_STRONGEST = 1 << 2,
  DW_LIDAR_RETURN_TYPE_ABS_STRONGEST = 1 << 3,
  DW_LIDAR_RETURN_TYPE_1 = 1 << 4,
  DW_LIDAR_RETURN_TYPE_2 = 1 << 5,
  DW_LIDAR_RETURN_TYPE_3 = 1 << 6,
  DW_LIDAR_RETURN_TYPE_4 = 1 << 7,
  DW_LIDAR_RETURN_TYPE_5 = 1 << 8,
  DW_LIDAR_RETURN_TYPE_6 = 1 << 9
}
 Enum to indicate a single return type. More...
 
enum  dwLidarAuxDataType {
  DW_LIDAR_AUX_DATA_TYPE_SNR = 0,
  DW_LIDAR_AUX_DATA_TYPE_PULSEWIDTH_PS = 1,
  DW_LIDAR_AUX_DATA_TYPE_TIME = 2,
  DW_LIDAR_AUX_DATA_TYPE_V_MPS = 3,
  DW_LIDAR_AUX_DATA_TYPE_EXISTENCEPROB = 4,
  DW_LIDAR_AUX_DATA_TYPE_CROSSTALKPROB = 5,
  DW_LIDAR_AUX_DATA_TYPE_NOISELEVEL = 6,
  DW_LIDAR_AUX_DATA_TYPE_ZONEID = 7,
  DW_LIDAR_AUX_DATA_TYPE_DETECTORID = 8,
  DW_LIDAR_AUX_DATA_TYPE_LINEID = 9,
  DW_LIDAR_AUX_DATA_TYPE_DATAQUALITY = 10,
  DW_LIDAR_AUX_DATA_TYPE_SCANCHECKPOINT = 11,
  DW_LIDAR_AUX_DATA_TYPE_BLOCKAGEFLAG = 12,
  DW_LIDAR_AUX_DATA_TYPE_SENSORID = 13,
  DW_LIDAR_AUX_DATA_TYPE_AZIMUTH = 14,
  DW_LIDAR_AUX_DATA_TYPE_ELEVATION = 15,
  DW_LIDAR_AUX_DATA_TYPE_DISTANCE = 16,
  DW_LIDAR_AUX_DATA_TYPE_ROI = 17,
  DW_LIDAR_AUX_DATA_TYPE_VALIDITY = 18,
  DW_LIDAR_AUX_DATA_TYPE_INVALIDITYFLAG = 19,
  DW_LIDAR_AUX_DATA_TYPE_DOWN_SELECTED_RETURN = 20,
  DW_LIDAR_AUX_DATA_TYPE_COUNT = 21,
  DW_LIDAR_AUX_DATA_TYPE_FORCE32 = 0x7FFFFFFF
}
 An enum for every data element we could possibly return. More...
 
enum  dwLidarInvalidityFlag {
  DW_LIDAR_INVALIDITY_NONE = 0,
  DW_LIDAR_INVALIDITY_DW = 1 << 0,
  DW_LIDAR_INVALIDITY_VEND = 1 << 1,
  DW_LIDAR_INVALIDITY_BLOCKAGE = 1 << 2,
  DW_LIDAR_INVALIDITY_INVALID
}
 An enum for specifying invalidity flags. More...
 

Functions

DW_API_PUBLIC dwStatus dwSensorLidar_getAuxElementSize (uint32_t *const sizeBytes, dwLidarAuxDataType const auxType)
 Returns size of auxiliary data element in bytes. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding (dwSensorHandle_t const sensor)
 Enables the decoding of the Lidar packets, which incurs an additional CPU load. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding (dwSensorHandle_t const sensor)
 Disable the decoding of the Lidar packets, which frees additional CPU load. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled (bool *const enable, dwSensorHandle_t const sensor)
 Retrieves the state of packet decoding. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket (dwLidarDecodedPacket const **const data, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
 Reads one scan packet. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket (dwLidarDecodedPacket const *const data, dwSensorHandle_t const sensor)
 Returns the data read to the internal pool. More...
 
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. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties (dwLidarProperties *const lidarProperties, dwSensorHandle_t const sensor)
 Gets information about the Lidar sensor. More...
 
DW_API_PUBLIC dwStatus dwSensorLidar_sendMessage (uint32_t const cmd, uint8_t const *const data, size_t const size, dwSensorHandle_t const sensor)
 Sends a message to Lidar sensor. More...
 

Macro Definition Documentation

◆ DW_SENSORS_LIDAR_MAX_RETURNS

#define DW_SENSORS_LIDAR_MAX_RETURNS   10

Maximum number of distinct lidar returns a point cloud can contain.

Definition at line 171 of file LidarTypes.h.

◆ DW_SENSORS_LIDAR_MAX_ROWS

#define DW_SENSORS_LIDAR_MAX_ROWS   360

maximal number of rows in dwLidarProperties

Definition at line 191 of file LidarTypes.h.

Typedef Documentation

◆ dwLidarDecodedPacket

Defines the structure for a decoded lidar packet.

◆ dwLidarDecodedReturn

Defines the return structure for an extended decoded lidar packet.

◆ dwLidarDecodedSSI

typedef struct dwLidarSSI dwLidarDecodedSSI

Forward declearation since not available as of current release. Will be added in future release.

Definition at line 271 of file LidarTypes.h.

◆ dwLidarPointRTHI

Holds a Lidar point cloud RTHI and the associated intensity.

◆ dwLidarPointXYZI

Holds a Lidar point cloud XYZ and the associated intensity.

◆ dwLidarProperties

Defines the properties of the lidar.

◆ dwLidarScanPattern

Holds a Lidar scan pattern.

◆ dwLidarScanPatternRayValidity

Holds validity flags for attributes of dwLidarRay.

Enumeration Type Documentation

◆ dwLidarAuxDataType

An enum for every data element we could possibly return.

Enumerator
DW_LIDAR_AUX_DATA_TYPE_SNR 

SNR type.

DW_LIDAR_AUX_DATA_TYPE_PULSEWIDTH_PS 

PULSEWIDTH_PS type.

DW_LIDAR_AUX_DATA_TYPE_TIME 

TIME type.

DW_LIDAR_AUX_DATA_TYPE_V_MPS 

V_MPS type.

DW_LIDAR_AUX_DATA_TYPE_EXISTENCEPROB 

EXISTENCEPROB type.

DW_LIDAR_AUX_DATA_TYPE_CROSSTALKPROB 

CROSSTALKPROB type.

DW_LIDAR_AUX_DATA_TYPE_NOISELEVEL 

NOISELEVEL type.

DW_LIDAR_AUX_DATA_TYPE_ZONEID 

ZONEID type.

DW_LIDAR_AUX_DATA_TYPE_DETECTORID 

DETECTORID type.

DW_LIDAR_AUX_DATA_TYPE_LINEID 

LINEID type.

DW_LIDAR_AUX_DATA_TYPE_DATAQUALITY 

DATAQUALITY type.

DW_LIDAR_AUX_DATA_TYPE_SCANCHECKPOINT 

SCANCHECKPOINT type.

DW_LIDAR_AUX_DATA_TYPE_BLOCKAGEFLAG 

BLOCKAGEFLAG type.

DW_LIDAR_AUX_DATA_TYPE_SENSORID 

SENSORID type.

DW_LIDAR_AUX_DATA_TYPE_AZIMUTH 

AZIMUTH type.

DW_LIDAR_AUX_DATA_TYPE_ELEVATION 

ELEVATION type.

DW_LIDAR_AUX_DATA_TYPE_DISTANCE 

DISTANCE type.

DW_LIDAR_AUX_DATA_TYPE_ROI 

ROI type.

DW_LIDAR_AUX_DATA_TYPE_VALIDITY 

VALIDITY type.

DW_LIDAR_AUX_DATA_TYPE_INVALIDITYFLAG 

INVALIDITYFLAG type.

DW_LIDAR_AUX_DATA_TYPE_DOWN_SELECTED_RETURN 

DOWN_SELECTED_RETURN type.

DW_LIDAR_AUX_DATA_TYPE_COUNT 

COUNT type.

DW_LIDAR_AUX_DATA_TYPE_FORCE32 

Definition at line 69 of file LidarTypes.h.

◆ dwLidarInvalidityFlag

An enum for specifying invalidity flags.

Enumerator
DW_LIDAR_INVALIDITY_NONE 

No flags are set.

DW_LIDAR_INVALIDITY_DW 

DriveWorks-specific validity flags.

DW_LIDAR_INVALIDITY_VEND 

Vendor-specific validity flags.

DW_LIDAR_INVALIDITY_BLOCKAGE 

Blockage validity flags.

DW_LIDAR_INVALIDITY_INVALID 

Point is not valid if any of flags are set.

Definition at line 98 of file LidarTypes.h.

◆ dwLidarReturnType

Enum to indicate a single return type.

Bitmasks of this enum can be used to specify return configurations of lidars, requested returns from the accumulator, or returns available in a point cloud

Enumerator
DW_LIDAR_RETURN_TYPE_ANY 

API default for whatever.

returns happen to be present

DW_LIDAR_RETURN_TYPE_FIRST 

First return.

DW_LIDAR_RETURN_TYPE_LAST 

Last return.

DW_LIDAR_RETURN_TYPE_STRONGEST 

Strongest return (vendor-specific)

DW_LIDAR_RETURN_TYPE_ABS_STRONGEST 

Derived type: if multiple.

returns are present, whichever is strongest

DW_LIDAR_RETURN_TYPE_1 

Generic enum to capture lidars for which an array of returns is present.

DW_LIDAR_RETURN_TYPE_2 

Generic enum to capture lidars for which an array of returns is present.

DW_LIDAR_RETURN_TYPE_3 

Generic enum to capture lidars for which an array of returns is present.

DW_LIDAR_RETURN_TYPE_4 

Generic enum to capture lidars for which an array of returns is present.

DW_LIDAR_RETURN_TYPE_5 

Generic enum to capture lidars for which an array of returns is present.

DW_LIDAR_RETURN_TYPE_6 

Generic enum to capture lidars for which an array of returns is present.

Definition at line 48 of file LidarTypes.h.

Function Documentation

◆ dwSensorLidar_disableDecoding()

DW_API_PUBLIC dwStatus dwSensorLidar_disableDecoding ( dwSensorHandle_t const  sensor)

Disable the decoding of the Lidar packets, which frees additional CPU load.

Method fails if the sensor has been started and is capturing data. Stop the sensor first. The default state is to have decoding on. If on, dwSensor_readRawData(see reference [15]) returns DW_CALL_NOT_ALLOWED.

Parameters
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEThe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDThe sensor is not stopped.
DW_SUCCESSSuccessful deal.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_enableDecoding()

DW_API_PUBLIC dwStatus dwSensorLidar_enableDecoding ( dwSensorHandle_t const  sensor)

Enables the decoding of the Lidar packets, which incurs an additional CPU load.

Method fails if the sensor has been started and is capturing data. Stop the sensor first. The default state is to have decoding on. If on, dwSensor_readRawData(see reference [15]) returns DW_CALL_NOT_ALLOWED.

Parameters
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEThe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDThe sensor is not stopped.
DW_SUCCESSSuccessful deal.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_getAuxElementSize()

DW_API_PUBLIC dwStatus dwSensorLidar_getAuxElementSize ( uint32_t *const  sizeBytes,
dwLidarAuxDataType const  auxType 
)

Returns size of auxiliary data element in bytes.

Parameters
[out]sizeByteselement size
[in]auxTypeauxiliary data type
Return values
DW_INVALID_ARGUMENTThe input parameter is invalid.
DW_SUCCESSSuccessful deal.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_getProperties()

DW_API_PUBLIC dwStatus dwSensorLidar_getProperties ( dwLidarProperties *const  lidarProperties,
dwSensorHandle_t const  sensor 
)

Gets information about the Lidar sensor.

Parameters
[out]lidarPropertiesA pointer to the struct containing the properties of the Lidar.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEthe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDconfig is not allowed to get in passive mode.
DW_SAL_SENSOR_ERRORfail to retrieve properties from the sensor.
DW_SUCCESSsuccessful deal.
Note
Other return value will depend on the lidar type due to the reason that different type lidar will have different internal implements.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_isDecodingEnabled()

DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled ( bool *const  enable,
dwSensorHandle_t const  sensor 
)

Retrieves the state of packet decoding.

Parameters
[out]enableContains the result of the query, which is true when decoding. False if RAW data.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_SUCCESSSuccessful deal.
DW_INVALID_HANDLEThe input handle is not a lidar handle.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_processRawData()

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.

This happens on the CPU thread where the function is called, incurring on additional load on that thread. The data is valid until the application calls dwSensor_returnRawData.

Parameters
[out]dataA pointer to the memory pool owned by the sensor.
[in]rawDataA pointer for the non-decoded Lidar packet, returned by 'dwSensor_readRawData(see reference [15])'.
[in]sizeSpecifies the size in bytes of the raw data.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEthe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDthe decoder is not working.
DW_SUCCESSsuccessful deal.
Note
Other return value will depend on the lidar type due to the reason that different type lidar will have different internal implements.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_readPacket()

DW_API_PUBLIC dwStatus dwSensorLidar_readPacket ( dwLidarDecodedPacket const **const  data,
dwTime_t const  timeoutUs,
dwSensorHandle_t const  sensor 
)

Reads one scan packet.

The pointer returned is to the internal data pool. DW guarantees that the data remains constant until returned by the application. The data must be explicitly returned by the application.

Parameters
[out]dataA pointer to a pointer that can read data from the sensor. The struct contains the numbers of points read, which depends on the sensor used.
[in]timeoutUsSpecifies the timeout in microseconds. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEthe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDthe decoder is not working.
DW_INVALID_ARGUMENTthe input argument is invalid.
DW_NOT_AVAILABLEdevice is disconneted or sensor is not working.
DW_TIME_OUTtimeout.
DW_SUCCESSsuccessful deal.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_returnPacket()

DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket ( dwLidarDecodedPacket const *const  data,
dwSensorHandle_t const  sensor 
)

Returns the data read to the internal pool.

At this point the pointer is still be valid, but data is change based on newer readings of the sensor.

Parameters
[in]dataA pointer to the scan data previously read from the Lidar to be returned to the pool.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEthe input handle is not a lidar handle.
DW_CALL_NOT_ALLOWEDthe decoder is not working.
DW_SUCCESSsuccessful deal.
Note
Other return value will depend on the lidar type due to the reason that different type lidar will have different internal implements.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensorLidar_sendMessage()

DW_API_PUBLIC dwStatus dwSensorLidar_sendMessage ( uint32_t const  cmd,
uint8_t const *const  data,
size_t const  size,
dwSensorHandle_t const  sensor 
)

Sends a message to Lidar sensor.

Parameters
[in]cmdCommand identifier associated to the given message data.
[in]dataA pointer to the message data.
[in]sizeSize in bytes of the data.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'.
Return values
DW_INVALID_HANDLEthe input handle is not a lidar handle.
Note
Other return value will depend on the lidar type due to the reason that different type lidar will have different internal implements.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes