#include <calibration.hpp>
Public Member Functions | |
| double | compute (double raw_reading) |
| JointCalibration (std::vector< joint_calibration::Point > calibration_table) | |
| ~JointCalibration () | |
Private Attributes | |
| std::vector < joint_calibration::Point > | calibration_table_ |
| unsigned int | calibration_table_size_ |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const JointCalibration &calib) |
This class is used to compute the calibrated joint position, given a raw ADC sensor reading, using a N-point piecewise linear calibration table.
Definition at line 69 of file calibration.hpp.
| shadow_robot::JointCalibration::JointCalibration | ( | std::vector< joint_calibration::Point > | calibration_table | ) |
Definition at line 40 of file calibration.cpp.
Definition at line 57 of file calibration.cpp.
| double shadow_robot::JointCalibration::compute | ( | double | raw_reading | ) |
Computes the calibrated joint position from the ADC raw reading.
| raw_reading | the reading from the ADC |
the two points from the calibration which we'll use to do the linear interpolation.
Definition at line 67 of file calibration.cpp.
| std::ostream& operator<< | ( | std::ostream & | out, |
| const JointCalibration & | calib | ||
| ) | [friend] |
Overload the << operator, for easier debugging.
Definition at line 87 of file calibration.hpp.
The calibration table. The vector is ordered by growing values of the raw_data
Definition at line 98 of file calibration.hpp.
unsigned int shadow_robot::JointCalibration::calibration_table_size_ [private] |
The size of the calibration table, used for quick access
Definition at line 109 of file calibration.hpp.