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(const SensorInfo &info)

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

Parameters:

info[in] – sensor metadata returned from the client.

ScanBatcher(const std::shared_ptr<SensorInfo> &info)

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

Parameters:

info[in] – sensor metadata returned from the client.

bool operator()(const Packet &packet, LidarScan &ls)

Add a packet to the scan.

This will ignore legacy IMU packets.

Parameters:
  • packet[in] – an ouster data packet.

  • ls[in] – lidar scan to populate.

Returns:

true when the provided lidar scan is ready to use.

void reset()

Reset the batcher and clear any cached packets.

size_t batched_packets()

Get the number of packets batched into the scan so far.

Returns 0 if a scan was just released from operator().

Returns:

the number of packets batched into the scan so far

Public Members

PacketFormat pf

The packet format object used for decoding.