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... | |
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... | |
#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.
#define DW_SENSORS_LIDAR_MAX_ROWS 360 |
maximal number of rows in dwLidarProperties
Definition at line 191 of file LidarTypes.h.
typedef struct dwLidarDecodedPacket dwLidarDecodedPacket |
Defines the structure for a decoded lidar packet.
typedef struct dwLidarDecodedReturn dwLidarDecodedReturn |
Defines the return structure for an extended decoded lidar packet.
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.
typedef struct dwLidarPointRTHI dwLidarPointRTHI |
Holds a Lidar point cloud RTHI and the associated intensity.
typedef struct dwLidarPointXYZI dwLidarPointXYZI |
Holds a Lidar point cloud XYZ and the associated intensity.
typedef struct dwLidarProperties dwLidarProperties |
Defines the properties of the lidar.
typedef struct dwLidarScanPattern dwLidarScanPattern |
Holds a Lidar scan pattern.
typedef struct dwLidarScanPatternRayValidity dwLidarScanPatternRayValidity |
Holds validity flags for attributes of dwLidarRay.
enum dwLidarAuxDataType |
An enum for every data element we could possibly return.
Definition at line 69 of file LidarTypes.h.
An enum for specifying invalidity flags.
Definition at line 98 of file LidarTypes.h.
enum 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
Definition at line 48 of file LidarTypes.h.
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.
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | The input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | The sensor is not stopped. |
DW_SUCCESS | Successful deal. |
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.
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | The input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | The sensor is not stopped. |
DW_SUCCESS | Successful deal. |
DW_API_PUBLIC dwStatus dwSensorLidar_getAuxElementSize | ( | uint32_t *const | sizeBytes, |
dwLidarAuxDataType const | auxType | ||
) |
Returns size of auxiliary data element in bytes.
[out] | sizeBytes | element size |
[in] | auxType | auxiliary data type |
DW_INVALID_ARGUMENT | The input parameter is invalid. |
DW_SUCCESS | Successful deal. |
DW_API_PUBLIC dwStatus dwSensorLidar_getProperties | ( | dwLidarProperties *const | lidarProperties, |
dwSensorHandle_t const | sensor | ||
) |
Gets information about the Lidar sensor.
[out] | lidarProperties | A pointer to the struct containing the properties of the Lidar. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | the input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | config is not allowed to get in passive mode. |
DW_SAL_SENSOR_ERROR | fail to retrieve properties from the sensor. |
DW_SUCCESS | successful deal. |
DW_API_PUBLIC dwStatus dwSensorLidar_isDecodingEnabled | ( | bool *const | enable, |
dwSensorHandle_t const | sensor | ||
) |
Retrieves the state of packet decoding.
[out] | enable | Contains the result of the query, which is true when decoding. False if RAW data. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_SUCCESS | Successful deal. |
DW_INVALID_HANDLE | The input handle is not a lidar handle. |
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.
[out] | data | A pointer to the memory pool owned by the sensor. |
[in] | rawData | A pointer for the non-decoded Lidar packet, returned by 'dwSensor_readRawData(see reference [15])'. |
[in] | size | Specifies the size in bytes of the raw data. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | the input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | the decoder is not working. |
DW_SUCCESS | successful deal. |
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.
[out] | data | A 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] | timeoutUs | Specifies the timeout in microseconds. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | the input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | the decoder is not working. |
DW_INVALID_ARGUMENT | the input argument is invalid. |
DW_NOT_AVAILABLE | device is disconneted or sensor is not working. |
DW_TIME_OUT | timeout. |
DW_SUCCESS | successful deal. |
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.
[in] | data | A pointer to the scan data previously read from the Lidar to be returned to the pool. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | the input handle is not a lidar handle. |
DW_CALL_NOT_ALLOWED | the decoder is not working. |
DW_SUCCESS | successful deal. |
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.
[in] | cmd | Command identifier associated to the given message data. |
[in] | data | A pointer to the message data. |
[in] | size | Size in bytes of the data . |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor(see reference [15])'. |
DW_INVALID_HANDLE | the input handle is not a lidar handle. |