Updated: May 06, 2022

Data payload format for data of type SENSOR_FORMAT_LIDAR_SPHERICAL


#include <sensor/sensor_lidar.h>
typedef struct sensor_lidar_spherical_t {
    uint32_t time_offset;
    uint8_t reflectivity;
    uint8_t laserId;
    uint16_t flag;
    uint16_t theta;
    uint16_t phi;
    uint32_t rho;
} sensor_lidar_spherical_t;


uint32_t time_offset
Offset from the timestamp in sensor_buffer_t to apply for this data point.
uint8_t reflectivity
A value from 0 to 255 that specifies the reflectivity value, where a higher number means a more reflective object was encountered.
uint8_t laserId
Identifier of the laser associated with this data point.
uint16_t flag
Bitfield with values based on the sensor_lidar_flag_t enumeration.
uint16_t theta
Angle, in hundredths of degrees measured downwards from the Z-axis.

The range is 0 to 17999.

uint16_t phi
Angle, in hundredths of degrees measured counterclockwise from the X-axis (the Y-axis is forwards with respect to the sensor).

The range is 0 to 35999.

uint32_t rho
Radial distance, in millimeters (mm) to the data point.




The data payload in the sensor_buffer_t data field is an array of these structures.