Visual Servoing Platform
version 3.0.1
|
#include <visp3/vs/vpAdaptiveGain.h>
Public Member Functions | |
vpAdaptiveGain () | |
vpAdaptiveGain (double c) | |
vpAdaptiveGain (double gain_at_zero, double gain_at_infinity, double slope_at_zero) | |
void | initFromConstant (double c) |
void | initFromVoid (void) |
void | initStandard (double gain_at_zero, double gain_at_infinity, double slope_at_zero) |
double | setConstant (void) |
double | value_const (double x) const |
double | value (double x) const |
double | limitValue_const (void) const |
double | limitValue (void) const |
double | getLastValue (void) const |
double | operator() (double x) const |
double | operator() (const vpColVector &x) const |
double | operator() (void) const |
Static Public Attributes | |
static const double | DEFAULT_LAMBDA_ZERO = 1.666 |
static const double | DEFAULT_LAMBDA_INFINITY = 0.1666 |
static const double | DEFAULT_LAMBDA_SLOPE = 1.666 |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpAdaptiveGain &lambda) |
Adaptive gain computation.
The formula used to compute the gain is the following :
where , and are constant parameters and is the entry to consider.
The parameters are not set directly. They are computed from three other parameters that are more intuitive to tune:
where represents the gain when , represents the gain when and represents the slope of when .
Definition at line 73 of file vpAdaptiveGain.h.
vpAdaptiveGain::vpAdaptiveGain | ( | ) |
Basic constructor which initializes all the parameters with their default value:
Definition at line 65 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
vpAdaptiveGain::vpAdaptiveGain | ( | double | c | ) |
Constructor that initializes the gain as constant. In that case .
c | : Value of the constant gain. |
Definition at line 84 of file vpAdaptiveGain.cpp.
References initFromConstant().
vpAdaptiveGain::vpAdaptiveGain | ( | double | gain_at_zero, |
double | gain_at_infinity, | ||
double | slope_at_zero | ||
) |
Constructor that initializes the gain as adaptive.
gain_at_zero | : the expected gain when : . |
gain_at_infinity | : the expected gain when : . |
slope_at_zero | : the expected slope of when : . |
Definition at line 102 of file vpAdaptiveGain.cpp.
References initStandard().
|
inline |
Gets the last adaptive gain value which was stored in the class.
Definition at line 155 of file vpAdaptiveGain.h.
void vpAdaptiveGain::initFromConstant | ( | double | c | ) |
Initializes the parameters to have a constant gain. In that case .
c | : Value of the constant gain. |
Definition at line 121 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
Referenced by vpAdaptiveGain().
void vpAdaptiveGain::initFromVoid | ( | void | ) |
Initializes the parameters with the default value :
Definition at line 140 of file vpAdaptiveGain.cpp.
References DEFAULT_LAMBDA_INFINITY, DEFAULT_LAMBDA_SLOPE, DEFAULT_LAMBDA_ZERO, and vpDEBUG_TRACE.
void vpAdaptiveGain::initStandard | ( | double | gain_at_zero, |
double | gain_at_infinity, | ||
double | slope_at_zero | ||
) |
Set the parameters used to compute .
gain_at_zero | : the expected gain when : . |
gain_at_infinity | : the expected gain when : . |
slope_at_zero | : the expected slope of when : . |
Definition at line 160 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
Referenced by vpAdaptiveGain().
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.
Definition at line 278 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 ). Similar to limitValue() except that here the value is not stored as a parameter of the class.
Definition at line 239 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
double vpAdaptiveGain::operator() | ( | double | x | ) | const |
Operator that computes .
x | : Input value to consider. During a visual servo this value can be the euclidian norm or the infinity norm of the task function. |
Definition at line 310 of file vpAdaptiveGain.cpp.
double vpAdaptiveGain::operator() | ( | const vpColVector & | x | ) | const |
Operator which computes .
x | : Input vector to consider. |
Definition at line 334 of file vpAdaptiveGain.cpp.
double vpAdaptiveGain::operator() | ( | void | ) | const |
Gets the value of the gain at infinity (ie the value of ).
Definition at line 322 of file vpAdaptiveGain.cpp.
double vpAdaptiveGain::setConstant | ( | void | ) |
Sets the internal parameters in order to obtain a constant gain equal to the gain in 0 set through the parameter .
Definition at line 195 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
double vpAdaptiveGain::value | ( | double | x | ) | const |
Computes the value of the adaptive gain using:
This value is stored as a parameter of the class.
x | : Input value to consider. During a visual servo this value can be the euclidian norm or the infinity norm of the task function. |
Definition at line 261 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
double vpAdaptiveGain::value_const | ( | double | x | ) | const |
Computes the value of the adaptive gain using:
x | : Input value to consider. During a visual servo this value can be the euclidian norm or the infinity norm of the task function. |
Definition at line 223 of file vpAdaptiveGain.cpp.
References vpDEBUG_TRACE.
|
friend |
Prints the adaptive gain parameters .
os | : The stream where to print the adaptive gain parameters. |
lambda | : The adaptive gain containing the parameters to print. |
Definition at line 355 of file vpAdaptiveGain.cpp.
|
static |
Definition at line 79 of file vpAdaptiveGain.h.
Referenced by initFromVoid().
|
static |
Definition at line 80 of file vpAdaptiveGain.h.
Referenced by initFromVoid().
|
static |
Definition at line 78 of file vpAdaptiveGain.h.
Referenced by initFromVoid().