Function opensw::parseLaserPoints
Defined in File protocol.h
Function Documentation
-
std::vector<LaserPoint> opensw::parseLaserPoints(const std::string &base64_data, bool fill_gaps = false)
Parse laser points from base64 encoded laser point data.
See documentation of
inflate
function.After the base64 encoded data is decoded and inflated, the memory layout of the data is 12 bytes per point:
[0 - 3] distance (float) [4 - 7] angle (float) [8] valid (uint8) [9 - 11] padding
- Parameters
base64_data – [in] The base64 encoded data string.
fill_gaps – [in] Whether or not to fill in any single point gaps with ‘invalid’ points.
- Returns
Parsed laser points, sorted by ascending angle, if successful, empty otherwise.