DriveWorks SDK Reference
5.10.90 Release
For Test and Development only

Get Decoded Data

Get decoded lidar packet from live lidar sensor

dwSAL_initialize(&sal, sdk);
params.parameters = "ip=192.168.3.43,port=2368,device=VELO_HDL64E,scan-frequency=10.0";
params.protocol = "lidar.socket";
dwSAL_createSensor(&lidarSensor, params, sal);
// query lidar properties
dwLidarProperties lidarProperties;
dwSensorLidar_getProperties(&lidarProperties, lidarSensor);
while(loop) {
// CODE: use the lidar packets for other tasks
}
dwSAL_releaseSensor(&lidarSensor);
#define DW_NULL_HANDLE
Definition: Types.h:83
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.
DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const **const data, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads one scan packet.
Defines the properties of the lidar.
Definition: Lidar.h:152
const char8_t * parameters
Array of additional parameters provided to sensor creation.
Definition: Sensors.h:106
const char8_t * protocol
Name of the protocol.
Definition: Sensors.h:99
DW_API_PUBLIC dwStatus dwSAL_createSensor(dwSensorHandle_t *const sensor, dwSensorParams const params, dwSALHandle_t const sal)
Creates a new sensor managed by the SAL module with the given parameters.
DW_API_PUBLIC dwStatus dwSensor_start(dwSensorHandle_t const sensor)
Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t const sensor)
Stops the sensor.
DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *const sal, dwContextHandle_t const context)
Creates and initializes a SAL (sensor abstraction layer) module.
DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t const sensor)
Releases a sensor managed by the SAL module.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:86
Holds sets of parameters for sensor creation.
Definition: Sensors.h:95

Get decoded lidar packet from lidar recordings

dwSAL_initialize(&sal, sdk);
params.parameters = "file=lidar_recording.bin";
params.protocol = "lidar.virtual";
dwSAL_createSensor(&lidarSensor, params, sal);
// query lidar properties
dwLidarProperties lidarProperties;
dwSensorLidar_getProperties(&lidarProperties, lidarSensor);
while(loop) {
// CODE: use the lidar packets for other tasks
}
dwSAL_releaseSensor(&lidarSensor);

For more details see Lidar Replay Sample