ouster.sdk.util.parsing module

R/W implementation of packet parsing.

Doesn’t rely on custom C++ extensions (just numpy). Provides writable view of packet data for testing and development.

tohex(data)[source]

Makes a hex string for debug print outs of buffers.

Selects the biggest devisor of np.uint32, np.uint16 or np.uint8 for making a hex output of the provided data. (clunky but usefull for debugging)

Return type:

str

scan_to_packets(ls, info)[source]

Converts LidarScan to a lidar_packet buffers

Parameters:
  • ls (LidarScan) – LidarScan; if LidarScan has RAW_HEADERS field, packet headers are recreated to how they were in the original packets

  • info (SensorInfo) – metadata of the ls scan

Return type:

List[Packet]

Returns:

A set of lidar packets that will produce the same LidarScan if passed through the ScanBatcher again (less fields data)

packets_to_scan(packets, info, *, fields=None)[source]

Batch buffers that belongs to a single scan into a LidarScan object.

Return type:

LidarScan

cut_raw32_words(ls)[source]
Return type:

LidarScan