The camera_calibration_parsers package provides C++ functions to read and write camera calibration data. For most use cases, you should use the high-level API provided in parse.hpp. This layer automatically detects whether a file is in YAML format (standard for ROS 2 camera_calibration) or Videre INI format (legacy) based on the file extension.
The API supports three types of operations:
- write: Serializes a
sensor_msgs/msg/CameraInfo to a stream or file. - read: Deserializes from a stream or file into a
CameraInfo. - parse: Deserializes from an in-memory string buffer.
// Use parse.hpp for automatic format detection
#include <camera_calibration_parsers/parse.hpp>
// Example logic (conceptual):
// camera_calibration_parsers::read(file_path, camera_info_msg);
// camera_calibration_parsers::write(file_path, camera_info_msg);