ViSP  2.8.0

#include <vpAdaptativeGain.h>

Public Member Functions

vp_deprecated vpAdaptativeGain (void)
 
void initFromConstant (double lambda)
 
void initFromVoid (void)
 
void initStandard (double en_zero, double en_infini, double pente_en_zero)
 
double setConstant (void)
 
double value_const (double val_e) const
 
double value (double val_e) const
 
double limitValue_const (void) const
 
double limitValue (void) const
 
double getLastValue (void) const
 
double operator() (double val_e) const
 
double operator() (const vpColVector &e) const
 
double operator() (void) const
 

Static Public Attributes

static const double DEFAULT_LAMBDA_ZERO = 1.666
 
static const double DEFAULT_LAMBDA_INFINI = 0.1666
 
static const double DEFAULT_LAMBDA_PENTE = 1.666
 

Friends

VISP_EXPORT std::ostream & operator<< (std::ostream &os, const vpAdaptativeGain &lambda)
 

Detailed Description

Adaptative gain computation.

Deprecated:
This class is deprecated. You should use vpAdaptive class instead.

The formula used to compute the gain is the following :

\[ lambda (x) = a * exp (-b*x) + c \]

where $ a $, $ b $ and $ c $ are parameters which must be set and $ x $ is the vector error of the task.

By default, the parameters are set with default values:

\[ a = lambda(0) - lambda(inf) \]

\[ b = lambda'(0) / a \]

\[ c = lambda(inf) \]

with $ lambda(0) = 1.666 $, $ lambda(inf) = 0.1666 $ and $ lambda'(0) = 1.666 $.

$ lambda(0)$ represents the gain in 0, $ lambda(inf)$ represents the gain to infinity and $ lambda'(0)$ represents the slope in 0.

Definition at line 85 of file vpAdaptativeGain.h.

Constructor & Destructor Documentation

vpAdaptativeGain::vpAdaptativeGain ( void  )
Deprecated:
This class is deprecated. You should use vpAdaptive class instead. Basic constructor which initializes the parameters with a default value.

Definition at line 76 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

Member Function Documentation

double vpAdaptativeGain::getLastValue ( void  ) const
inline

Gets the last adaptative gain value which was stored in the class.

Returns
It returns the last adaptative gain value which was stored in the class.

Definition at line 162 of file vpAdaptativeGain.h.

void vpAdaptativeGain::initFromConstant ( double  lambda)

Initializes the parameters to have a constant gain. Thus $ a = 0 $, $ b = 1 $ and $ c = lambda $

Parameters
lambda: the expected constant gain.

Definition at line 100 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

void vpAdaptativeGain::initFromVoid ( void  )

Initializes the parameters with the default value :

  • $ lambda(0) = 1.666 $
  • $ lambda(inf) = 0.1666 $
  • $ lambda'(0) = 1.666 $

Definition at line 120 of file vpAdaptativeGain.cpp.

References DEFAULT_LAMBDA_INFINI, DEFAULT_LAMBDA_PENTE, DEFAULT_LAMBDA_ZERO, and vpDEBUG_TRACE.

void vpAdaptativeGain::initStandard ( double  en_zero,
double  en_infini,
double  pente_en_zero 
)

Computes the parameters thanks to the given $ lambda(0)$, $ lambda(inf)$ and $ lambda'(0)$.

$ lambda(0)$ represents the gain in 0, $ lambda(inf)$ represents the gain to infinity and $ lambda'(0)$ represents the slope in 0.

Parameters
en_zero: the expected gain in 0.
en_infini: the expected gain to infinity.
pente_en_zero: the expected slope in 0.

Definition at line 143 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

double vpAdaptativeGain::limitValue ( void  ) const

Gets the value of the gain at infinity (ie the value of $ c $)and stores it as a parameter of the class.

Returns
It returns the value of the gain at infinity (ie the value of $ c $).

Definition at line 266 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

double vpAdaptativeGain::limitValue_const ( void  ) const

Gets the value of the gain at infinity (ie the value of $ c $).

Returns
It returns the value of the gain at infinity (ie the value of $ c $).

Definition at line 224 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

double vpAdaptativeGain::operator() ( double  val_e) const

Operator which calls the value(double val_e) method with val_e in parameter in order to compute the adaptative gain corresponding to val_e.

Parameters
val_e: Norm of the task function $\mid s - s^*\mid$.
Returns
It returns the value of the computed gain.

Definition at line 297 of file vpAdaptativeGain.cpp.

double vpAdaptativeGain::operator() ( const vpColVector e) const

Operator which calls the value(double val_e) method with the infinity norm of e in parameter in order to compute the adaptative gain corresponding to $ |e| $.

Parameters
e: the task function $\mid s - s^*\mid$.
Returns
It returns the value of the computed gain.

Definition at line 322 of file vpAdaptativeGain.cpp.

double vpAdaptativeGain::operator() ( void  ) const

Gets the value of the gain at infinity (ie the value of $ c $).

Returns
It returns the value of the gain at infinity (ie the value of $ c $).

Definition at line 308 of file vpAdaptativeGain.cpp.

double vpAdaptativeGain::setConstant ( void  )

Sets the parameters in order to obtain a constant gain equal to the gain in 0.

Returns
It returns the value of the computed constant gain.

Definition at line 178 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

double vpAdaptativeGain::value ( double  val_e) const

Computes the value of the adaptive gain $\lambda$ corresponding to the norm of the task function and stores it as a parameter of the class. The formula used for the gain computation is the following:

\[\lambda = a * exp(-b*val_e) + c\]

Parameters
val_e: Norm of the task function $\mid s - s^*\mid$.
Returns
It returns the value of the computed gain.

Definition at line 248 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

double vpAdaptativeGain::value_const ( double  val_e) const

Computes the value of the adaptive gain $\lambda$ corresponding to the norm of the task function. The formula is the following:

\[\lambda = a * exp(-b*val_e) + c\]

Parameters
val_e: Norm of the task function $\mid s - s^*\mid$.
Returns
It returns the value of the computed gain.

Definition at line 207 of file vpAdaptativeGain.cpp.

References vpDEBUG_TRACE.

Friends And Related Function Documentation

VISP_EXPORT std::ostream& operator<< ( std::ostream &  os,
const vpAdaptativeGain lambda 
)
friend

Prints the adaptative gain coefficients. It prints the gain in 0, the gain to infinity and the slope in 0.

Parameters
os: The stream where to print the adaptative gain parameters.
lambda: The adaptative gain containing the parameters to print.

Definition at line 345 of file vpAdaptativeGain.cpp.

Member Data Documentation

const double vpAdaptativeGain::DEFAULT_LAMBDA_INFINI = 0.1666
static

Definition at line 91 of file vpAdaptativeGain.h.

Referenced by initFromVoid().

const double vpAdaptativeGain::DEFAULT_LAMBDA_PENTE = 1.666
static

Definition at line 92 of file vpAdaptativeGain.h.

Referenced by initFromVoid().

const double vpAdaptativeGain::DEFAULT_LAMBDA_ZERO = 1.666
static

Definition at line 90 of file vpAdaptativeGain.h.

Referenced by initFromVoid().