Visual Servoing Platform
version 3.2.0 under development (2019-01-22)
|
#include <visp3/vision/vpPoseFeatures.h>
Public Types | |
enum | vpPoseFeaturesMethodType { VIRTUAL_VS, ROBUST_VIRTUAL_VS } |
Public Member Functions | |
vpPoseFeatures () | |
virtual | ~vpPoseFeatures () |
void | addFeaturePoint (const vpPoint &) |
void | addFeaturePoint3D (const vpPoint &) |
void | addFeatureVanishingPoint (const vpPoint &) |
void | addFeatureVanishingPoint (const vpLine &, const vpLine &) |
void | addFeatureEllipse (const vpCircle &) |
void | addFeatureEllipse (const vpSphere &) |
void | addFeatureLine (const vpLine &) |
void | addFeatureLine (const vpCylinder &, const int &line) |
void | addFeatureSegment (vpPoint &, vpPoint &) |
template<typename RetType , typename... ArgsFunc, typename... Args> | |
void | addSpecificFeature (RetType(*fct_ptr)(ArgsFunc...), Args &&...args) |
template<typename ObjType , typename RetType , typename... ArgsFunc, typename... Args> | |
void | addSpecificFeature (ObjType *obj, RetType(ObjType::*fct_ptr)(ArgsFunc...), Args &&...args) |
void | clear () |
void | computePose (vpHomogeneousMatrix &cMo, const vpPoseFeaturesMethodType &type=VIRTUAL_VS) |
vpMatrix | getCovarianceMatrix () const |
double | getLambda () |
unsigned int | getVVSIterMax () |
void | setCovarianceComputation (const bool &flag) |
void | setLambda (const double &val) |
void | setVVSIterMax (const unsigned int &val) |
void | setVerbose (const bool &mode) |
Tools for pose computation from any feature.
This class allows to estimate a pose by virtual visual servoing from visual features. The features that are considered are points, segments, lines, ellipses. If the compiler is compatible with C++ 11, it is possible to introduce specific features that are not directly implemented in ViSP.
Definition at line 376 of file vpPoseFeatures.h.
Method that will be used to estimate the pose from visual features.
Enumerator | |
---|---|
VIRTUAL_VS |
Virtual visual servoing approach. |
ROBUST_VIRTUAL_VS |
Robust virtual visual servoing approach. |
Definition at line 382 of file vpPoseFeatures.h.
vpPoseFeatures::vpPoseFeatures | ( | ) |
Default constructor.
Definition at line 45 of file vpPoseFeatures.cpp.
|
virtual |
Destructor that deletes the array of features and projections.
Definition at line 56 of file vpPoseFeatures.cpp.
References clear().
void vpPoseFeatures::addFeatureEllipse | ( | const vpCircle & | c | ) |
Add an ellipse feature to the list of features to be considered in the pose computation.
c | : Ellipse projection expressed as a vpCircle. |
Definition at line 207 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addFeatureEllipse | ( | const vpSphere & | s | ) |
Add an ellipse feature to the list of features to be considered in the pose computation.
s | : Ellipse projection expressed as a vpSphere. |
Definition at line 189 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addFeatureLine | ( | const vpLine & | l | ) |
Add a line feature to the list of features to be considered in the pose computation.
l | : Line projection expressed as a vpLine. |
Definition at line 225 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addFeatureLine | ( | const vpCylinder & | c, |
const int & | line | ||
) |
Add a line feature to the list of features to be considered in the pose computation.
c | : Line projection expressed as a vpCylinder. |
line | : Integer id that indicates which limb of the cylinder is to consider. It can be vpCylinder::line1 or vpCylinder::line2. |
Definition at line 245 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addFeaturePoint | ( | const vpPoint & | p | ) |
Add a point feature to the list of features to be considered in the pose computation.
p | : Point projection expressed as a vpPoint. |
Definition at line 115 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addFeaturePoint3D | ( | const vpPoint & | p | ) |
Add a point 3D feature to the list of features to be considered in the pose computation.
p | : Projection expressed as a vpPoint. |
Definition at line 133 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
Add a segment feature to the list of features to be considered in the pose computation.
P1 | : First extremity projection. |
P2 | : Second extremity projection. |
Definition at line 265 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create(), vpFeatureSegment::error(), vpFeatureVanishingPoint::error(), vpFeatureEllipse::error(), vpFeaturePoint::error(), vpFeatureLine::error(), vpFeaturePoint3D::error(), vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureSegment::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpMatrix::stack(), vpColVector::stack(), and vpForwardProjection::track().
void vpPoseFeatures::addFeatureVanishingPoint | ( | const vpPoint & | p | ) |
Add a vanishing point feature to the list of features to be considered in the pose computation.
p | : Projection expressed as a vpPoint. |
Definition at line 151 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
Add a vanishing point feature to the list of features to be considered in the pose computation.
l1 | : First line used to create the feature. |
l2 | : Second line used to create the feature. |
Definition at line 170 of file vpPoseFeatures.cpp.
References vpFeatureBuilder::create().
void vpPoseFeatures::addSpecificFeature | ( | RetType(*)(ArgsFunc...) | fct_ptr, |
Args &&... | args | ||
) |
Add a specific feature for the pose computation.
fct_ptr | : pointer on the function used to create the feature. |
args | : List of function parameters; First argument supposed to be derived from vpBasicFeature (redefine interaction() and error() functions), others are supposed to be derived from vpForwardProjection (redefine track() function) |
Definition at line 593 of file vpPoseFeatures.h.
void vpPoseFeatures::addSpecificFeature | ( | ObjType * | obj, |
RetType(ObjType::*)(ArgsFunc...) | fct_ptr, | ||
Args &&... | args | ||
) |
Add a specific feature for the pose computation.
obj | : object used to call the function defined by fct_ptr. |
fct_ptr | : pointer on the function used to create the feature. |
args | : List of function parameters; First argument supposed to be derived from vpBasicFeature (redefine interaction() and error() functions), others are supposed to be derived from vpForwardProjection (redefine track() function) |
Definition at line 675 of file vpPoseFeatures.h.
void vpPoseFeatures::clear | ( | ) |
Clear all the features
Definition at line 61 of file vpPoseFeatures.cpp.
Referenced by ~vpPoseFeatures().
void vpPoseFeatures::computePose | ( | vpHomogeneousMatrix & | cMo, |
const vpPoseFeaturesMethodType & | type = VIRTUAL_VS |
||
) |
Compute the pose according to the desired method (virtual visual servoing, or robust virtual visual servoing approach).
cMo | : Computed pose. |
type | : Method to use for the pose computation. |
Definition at line 413 of file vpPoseFeatures.cpp.
References vpMatrix::computeCovarianceMatrix(), vpExponentialMap::direct(), vpArray2D< Type >::getRows(), vpHomogeneousMatrix::inverse(), vpRobust::MEstimator(), vpMatrix::pseudoInverse(), vpArray2D< Type >::resize(), vpColVector::resize(), ROBUST_VIRTUAL_VS, vpRobust::setIteration(), vpRobust::setThreshold(), vpMath::sqr(), vpColVector::sumSquare(), vpRobust::TUKEY, VIRTUAL_VS, vpERROR_TRACE, and vpTRACE.
|
inline |
Get the covariance matrix of the pose parameters computed by virtual visual servoing.
Definition at line 475 of file vpPoseFeatures.h.
References vpTRACE.
|
inline |
Get the gain that is used to compute the pose with the control law .
Definition at line 490 of file vpPoseFeatures.h.
|
inline |
Get the maximum number of iterations of the virtual visual servoing (VVS) scheme implemented in computePose().
Definition at line 498 of file vpPoseFeatures.h.
|
inline |
Enable or disable covariance computation of the pose parameters.
flag | : True if the covariance has to be computed, false otherwise. |
Definition at line 505 of file vpPoseFeatures.h.
|
inline |
Set the gain used in the virtual visual servoing scheme : .
val | : Value of the gain . |
Definition at line 513 of file vpPoseFeatures.h.
|
inline |
Turn the verbose mode ON / OFF.
mode | : new verbose state. True to turn ON, false otherwise. |
Definition at line 527 of file vpPoseFeatures.h.
|
inline |
Set the maximum number of iterations used in computePose().
val | : Maximum number of iteration used in the VVS scheme. |
Definition at line 520 of file vpPoseFeatures.h.