Brian Silverman | 2ccf8c5 | 2016-03-15 00:22:26 -0400 | [diff] [blame] | 1 | #include "y2016/vision/stereo_geometry.h" |
| 2 | |
| 3 | namespace y2016 { |
| 4 | namespace vision { |
| 5 | |
| 6 | Calibration 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 Schuh | f257f3c | 2019-10-27 21:00:43 -0700 | [diff] [blame] | 13 | AOS_LOG(FATAL, "no calibration for %s found in %s\n", robot_name.c_str(), |
| 14 | calibration_file.ShortDebugString().c_str()); |
Brian Silverman | 2ccf8c5 | 2016-03-15 00:22:26 -0400 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | } // namespace vision |
| 18 | } // namespace y2016 |