![]() |
Visual Servoing Platform
version 3.3.0
|
#include <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.
As described in [Kermorgant14a], a varying gain
could be used in the visual servoing control law
with
where:
is the gain in 0, that is for very small values of 
is the gain to infinity, that is for very high values of 
is the slope of
at 
As described in Tutorial: How to boost your visual servo control law, the interest of Using an adaptive gain is to reduce the time to convergence in order to speed up the servo.
The following example shows how to use this class in order to use an adaptive gain with the following parameters
,
and
.
This other example shows how to use this class in order to set a constant gain
that will ensure an exponential decrease of the task error.
Definition at line 120 of file vpAdaptiveGain.h.
| vpAdaptiveGain::vpAdaptiveGain | ( | ) |
Basic constructor which initializes all the parameters with their default value:
using vpAdaptiveGain::DEFAULT_LAMBDA_ZERO
using vpAdaptiveGain::DEFAULT_LAMBDA_INFINITY
using vpAdaptiveGain::DEFAULT_LAMBDA_SLOPE Definition at line 70 of file vpAdaptiveGain.cpp.
|
explicit |
Constructor that initializes the gain as constant. In that case
.
| c | : Value of the constant gain. A typical value is 0.5. |
Definition at line 83 of file vpAdaptiveGain.cpp.
| 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 95 of file vpAdaptiveGain.cpp.
|
inline |
Gets the last adaptive gain value which was stored in the class.
Definition at line 194 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. A typical value is 0.5. |
Definition at line 114 of file vpAdaptiveGain.cpp.
| void vpAdaptiveGain::initFromVoid | ( | void | ) |
Initializes the parameters with the default value :
using vpAdaptiveGain::DEFAULT_LAMBDA_ZERO
using vpAdaptiveGain::DEFAULT_LAMBDA_INFINITY
using vpAdaptiveGain::DEFAULT_LAMBDA_SLOPE Definition at line 129 of file vpAdaptiveGain.cpp.
| 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 146 of file vpAdaptiveGain.cpp.
| 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 251 of file vpAdaptiveGain.cpp.
| double vpAdaptiveGain::limitValue_const | ( | void | ) | const |
Gets the value of the gain at infinity (ie the value of
). This function is similar to limitValue() except that here the value is not stored as a parameter of the class.
Definition at line 217 of file vpAdaptiveGain.cpp.
| double vpAdaptiveGain::operator() | ( | const vpColVector & | x | ) | const |
Operator which computes
where
| x | : Input vector to consider. |
Definition at line 302 of file vpAdaptiveGain.cpp.
| double vpAdaptiveGain::operator() | ( | double | x | ) | const |
Operator that computes
where
| 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 279 of file vpAdaptiveGain.cpp.
| double vpAdaptiveGain::operator() | ( | void | ) | const |
Gets the value of the gain at infinity (ie the value of
).
Definition at line 289 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 173 of file vpAdaptiveGain.cpp.
| 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 238 of file vpAdaptiveGain.cpp.
| 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 203 of file vpAdaptiveGain.cpp.
|
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 318 of file vpAdaptiveGain.cpp.
|
static |
Definition at line 124 of file vpAdaptiveGain.h.
|
static |
Definition at line 125 of file vpAdaptiveGain.h.
|
static |
Definition at line 123 of file vpAdaptiveGain.h.