Function ouster::sensor::parse_metadata

Function Documentation

sensor_info ouster::sensor::parse_metadata(const std::string &metadata)

Parse metadata text blob from the sensor into a sensor_info struct.

String and vector fields will have size 0 if the parameter cannot be found or parsed, while lidar_mode will be set to 0 (invalid).

Throws:

runtime_error – if the text is not valid json

Parameters:

metadata – a text blob returned by get_metadata from client.h

Returns:

a sensor_info struct populated with a subset of the metadata