Public Member Functions | Private Attributes | Friends | List of all members
shadow_robot::JointCalibration Class Reference

#include <calibration.hpp>

Public Member Functions

double compute (double raw_reading)
 
 JointCalibration (std::vector< joint_calibration::Point > calibration_table)
 

Private Attributes

std::vector< joint_calibration::Pointcalibration_table_
 
unsigned int calibration_table_size_
 

Friends

std::ostream & operator<< (std::ostream &out, const JointCalibration &calib)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ JointCalibration()

shadow_robot::JointCalibration::JointCalibration ( std::vector< joint_calibration::Point calibration_table)
explicit

Definition at line 41 of file calibration.cpp.

Member Function Documentation

◆ compute()

double shadow_robot::JointCalibration::compute ( double  raw_reading)

Computes the calibrated joint position from the ADC raw reading.

Parameters
raw_readingthe reading from the ADC
Returns
the calibrated joint position in radians.

the two points from the calibration which we'll use to do the linear interpolation.

Definition at line 69 of file calibration.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const JointCalibration calib 
)
friend

Overload the << operator, for easier debugging.

Definition at line 86 of file calibration.hpp.

Member Data Documentation

◆ calibration_table_

std::vector<joint_calibration::Point> shadow_robot::JointCalibration::calibration_table_
private

The calibration table. The vector is ordered by growing values of the raw_data

Definition at line 97 of file calibration.hpp.

◆ calibration_table_size_

unsigned int shadow_robot::JointCalibration::calibration_table_size_
private

The size of the calibration table, used for quick access

Definition at line 108 of file calibration.hpp.


The documentation for this class was generated from the following files:


sr_utilities
Author(s): Ugo Cupcic
autogenerated on Mon Feb 28 2022 23:52:19