Function OS1::parse_metadata

Function Documentation

inline ros2_ouster::Metadata OS1::parse_metadata(const std::string &meta)

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 above

Returns:

a sensor_info struct populated with a subset of the metadata