ViSP  2.8.0

#include <vpAdaptiveGain.h>

## Public Member Functions

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 vpAdaptiveGain &lambda)

## Detailed Description

The formula used to compute the gain is the following :

where , and are parameters which must be set and is the vector error of the task.

By default, the parameters are set with default values:

with , and .

represents the gain in 0, represents the gain to infinity and represents the slope in 0.

Examples:
servoAfma4Point2DCamVelocityKalman.cpp, and servoViper850Point2DCamVelocityKalman.cpp.

Definition at line 78 of file vpAdaptiveGain.h.

## Constructor & Destructor Documentation

Basic constructor which initializes the parameters with a default value.

Definition at line 66 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

## Member Function Documentation

 double vpAdaptiveGain::getLastValue ( void ) const
inline

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

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

Definition at line 155 of file vpAdaptiveGain.h.

 void vpAdaptiveGain::initFromConstant ( double lambda )

Initializes the parameters to have a constant gain. Thus , and

Parameters
 lambda : the expected constant gain.
Examples:
servoAfma4Point2DCamVelocityKalman.cpp.

Definition at line 90 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

Initializes the parameters with the default value :

Definition at line 110 of file vpAdaptiveGain.cpp.

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

Computes the parameters thanks to the given , and .

represents the gain in 0, represents the gain to infinity and 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.
Examples:
servoAfma4Point2DCamVelocityKalman.cpp, and servoViper850Point2DCamVelocityKalman.cpp.

Definition at line 133 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

 double vpAdaptiveGain::limitValue ( void ) const

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

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

Definition at line 256 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

 double vpAdaptiveGain::limitValue_const ( void ) const

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

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

Definition at line 214 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

 double vpAdaptiveGain::operator() ( double val_e ) const

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

Parameters
 val_e : Norm of the task function .
Returns
It returns the value of the computed gain.

Definition at line 287 of file vpAdaptiveGain.cpp.

 double vpAdaptiveGain::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 adaptive gain corresponding to .

Parameters
 e : the task function .
Returns
It returns the value of the computed gain.

Definition at line 312 of file vpAdaptiveGain.cpp.

 double vpAdaptiveGain::operator() ( void ) const

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

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

Definition at line 298 of file vpAdaptiveGain.cpp.

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 168 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

 double vpAdaptiveGain::value ( double val_e ) const

Computes the value of the adaptive gain 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:

Parameters
 val_e : Norm of the task function .
Returns
It returns the value of the computed gain.

Definition at line 238 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

 double vpAdaptiveGain::value_const ( double val_e ) const

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

Parameters
 val_e : Norm of the task function .
Returns
It returns the value of the computed gain.

Definition at line 197 of file vpAdaptiveGain.cpp.

References vpDEBUG_TRACE.

## Friends And Related Function Documentation

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

Prints the adaptive 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 adaptive gain parameters. lambda : The adaptive gain containing the parameters to print.

Definition at line 335 of file vpAdaptiveGain.cpp.

## Member Data Documentation

static

Definition at line 84 of file vpAdaptiveGain.h.

Referenced by initFromVoid().