blob: a58675c5e32bd73ed6835345855e76a3273141ea [file] [log] [blame]
Brian Silverman2ccf8c52016-03-15 00:22:26 -04001#include "y2016/vision/stereo_geometry.h"
2
3namespace y2016 {
4namespace vision {
5
6Calibration FindCalibrationForRobotOrDie(
7 const ::std::string &robot_name, const CalibrationFile &calibration_file) {
8 for (const RobotCalibration &calibration : calibration_file.calibration()) {
9 if (calibration.robot() == robot_name) {
10 return calibration.calibration();
11 }
12 }
Austin Schuhf257f3c2019-10-27 21:00:43 -070013 AOS_LOG(FATAL, "no calibration for %s found in %s\n", robot_name.c_str(),
14 calibration_file.ShortDebugString().c_str());
Brian Silverman2ccf8c52016-03-15 00:22:26 -040015}
16
17} // namespace vision
18} // namespace y2016