Go to the documentation of this file.00001
00027 #ifndef CALIBRATION_PARSER_H_
00028 # define CALIBRATION_PARSER_H_
00029
00030 #include <iostream>
00031 #include <sstream>
00032 #include <string>
00033 #include <vector>
00034
00035 using namespace std;
00036
00040 class CalibrationParser {
00041 public:
00042
00048 CalibrationParser();
00049
00056 CalibrationParser(std::string path);
00057 ~CalibrationParser(){};
00058
00066 std::vector<double> get_remapped_vector(std::vector<double>);
00067
00068 private:
00069 static const std::string default_path;
00070
00078 int init(std::string path);
00079
00080 std::vector< std::vector<double> > calibration_matrix;
00081
00082 inline double convertToDouble(std::string const& s)
00083 {
00084 std::istringstream i(s);
00085 double x;
00086 if (!(i >> x))
00087 ROS_ERROR("Bad calibration file: %s", s.c_str());
00088 return x;
00089 }
00090 };
00091
00092
00093 #endif