glove::calib::CyberGloveLinearCalibration Class Reference

#include <CyberGloveLinearCalibration.hpp>

Inheritance diagram for glove::calib::CyberGloveLinearCalibration:

glove::devices::CyberGlove::CyberGlove::Calibration

List of all members.

Public Member Functions

 CyberGloveLinearCalibration (std::string configFile="")
virtual ~CyberGloveLinearCalibration ()
void setGain (const glove::devices::CyberGlove::Finger f, const glove::devices::CyberGlove::Joint j, double d)
void setGain (const glove::devices::CyberGlove::Sensor s, double d)
void setGain (std::vector< double > v)
void setOffset (const glove::devices::CyberGlove::Finger f, const glove::devices::CyberGlove::Joint j, double d)
void setOffset (const glove::devices::CyberGlove::Sensor s, double d)
void setOffset (std::vector< double > v)
virtual void fromFile (std::string configFile)
virtual void toFile (std::string configFile)
virtual double map (const glove::devices::CyberGlove::Sensor s, const double value)

Protected Attributes

std::vector< double > gain
std::vector< double > offset


Detailed Description

Implements a linear calibration for the glove::devices::CyberGlove.

Author:
Christian Wressnegger
Date:
2010

Constructor & Destructor Documentation

glove::calib::CyberGloveLinearCalibration::CyberGloveLinearCalibration ( std::string  configFile = ""  ) 

The (default) constructor.

Parameters:
configFile The name of the configuration file to read the calibration from.

virtual glove::calib::CyberGloveLinearCalibration::~CyberGloveLinearCalibration (  )  [virtual]

The destructor.


Member Function Documentation

virtual void glove::calib::CyberGloveLinearCalibration::fromFile ( std::string  configFile  )  [virtual]

Read the calibration from the file with the given name.

Exceptions:
std::invalid_argument In case the given configuration file cannot be opened.
Parameters:
configFile The name of the file to write to.

virtual double glove::calib::CyberGloveLinearCalibration::map ( const glove::devices::CyberGlove::Sensor  s,
const double  value 
) [virtual]

See also:
CyberGlove::Calibration::map(const glove::devices::CyberGlove::Sensor, const double)

Reimplemented from glove::devices::CyberGlove::CyberGlove::Calibration.

void glove::calib::CyberGloveLinearCalibration::setGain ( std::vector< double >  v  ) 

Sets the gain values for the complete glove::devices::CyberGlove.

Parameters:
v The vector of gain values.

void glove::calib::CyberGloveLinearCalibration::setGain ( const glove::devices::CyberGlove::Sensor  s,
double  d 
)

Sets the gain for a particular glove::devices::CyberGlove::Sensor.

Exceptions:
std::invalid_argument If the given glove::devices::CyberGlove::Sensor id is invalid/ out of range.
Parameters:
s The glove::devices::CyberGlove::Sensor id according to the CGIU's internal representation
d The gain value to be used.

void glove::calib::CyberGloveLinearCalibration::setGain ( const glove::devices::CyberGlove::Finger  f,
const glove::devices::CyberGlove::Joint  j,
double  d 
)

Sets the gain for the given glove::devices::CyberGlove::Finger/ glove::devices::CyberGlove::Joint pair.

Parameters:
f The glove::devices::CyberGlove::Finger to be modified.
j The glove::devices::CyberGlove::Finger's glove::devices::CyberGlove::Joint to be modified.
d The gain value to be used.

void glove::calib::CyberGloveLinearCalibration::setOffset ( std::vector< double >  v  ) 

Sets the offset values for the complete glove::devices::CyberGlove.

Parameters:
v The vector of gain values.

void glove::calib::CyberGloveLinearCalibration::setOffset ( const glove::devices::CyberGlove::Sensor  s,
double  d 
)

Sets the offset for a particular glove::devices::CyberGlove::Sensor.

Exceptions:
std::invalid_argument If the given glove::devices::CyberGlove::Sensor id is invalid/ out of range.
Parameters:
s The sensor id according to the CGIU's internal representation
d The offset value to be used.

void glove::calib::CyberGloveLinearCalibration::setOffset ( const glove::devices::CyberGlove::Finger  f,
const glove::devices::CyberGlove::Joint  j,
double  d 
)

Sets the offset for the given glove::devices::CyberGlove::Finger/ glove::devices::CyberGlove::Joint pair.

Parameters:
f The glove::devices::CyberGlove::Finger to be modified.
j The glove::devices::CyberGlove::Finger's glove::devices::CyberGlove::Joint to be modified.
d The offset value to be used.

virtual void glove::calib::CyberGloveLinearCalibration::toFile ( std::string  configFile  )  [virtual]

Write this calibration to the file with the given name.

Exceptions:
std::invalid_argument In case the given configuration file cannot be opened.
Parameters:
configFile The name of the file to write to.


Member Data Documentation

std::vector<double> glove::calib::CyberGloveLinearCalibration::gain [protected]

The gain values of the corresponding glove::devices::CyberGlove.

std::vector<double> glove::calib::CyberGloveLinearCalibration::offset [protected]

The offset values of the corresponding glove::devices::CyberGlove.


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

Generated on Thu Feb 4 12:36:53 2010 for libglove by  doxygen 1.5.8