Function ouster::sdk::core::frame_to_packets

Function Documentation

std::vector<Packet> ouster::sdk::core::frame_to_packets(const LidarFrame &ls, const std::shared_ptr<ouster::sdk::core::PacketFormat> packet_format, uint32_t init_id, uint64_t prod_sn)

Convert a LidarFrame to the packets that would produce it.

Parameters:
  • ls[in] The lidar frame to produce packets from.

  • packet_format[in] The packet format to produce packets in.

  • init_id[in] Initialization id to write into packets.

  • prod_sn[in] Product serial number to write into packets.

Throws:
  • std::invalid_argument – if packet_format is null.

  • std::invalid_argument – if the frame width and columns_per_packet are inconsistent with receive_timestamp() length.

Returns:

the list of packets in the frame