Class ScanBatcher

Class Documentation

class ScanBatcher

Parse lidar packets into a LidarScan.

Make a function that batches a single scan (revolution) of data to a LidarScan.

Public Functions

ScanBatcher(size_t w, const sensor::packet_format &pf)

Create a batcher given information about the scan and packet format.

Parameters:
  • w – number of columns in the lidar scan. One of 512, 1024, or 2048

  • pf – expected format of the incoming packets used for parsing

bool operator()(const uint8_t *packet_buf, LidarScan &ls)

Add a packet to the scan.

Parameters:
  • packet_buf – the lidar packet

  • lidar – scan to populate

Returns:

true when the provided lidar scan is ready to use

Public Members

sensor::packet_format pf