ViSP  2.8.0

#include <vpFeatureThetaU.h>

+ Inheritance diagram for vpFeatureThetaU:

Public Types

enum  vpFeatureThetaUType { TUx = 1, TUy = 2, TUz = 4 }
 
enum  vpFeatureThetaURotationRepresentationType { cdRc, cRcd }
 
enum  vpBasicFeatureDeallocatorType { user, vpServo }
 

Public Member Functions

void init ()
 
 vpFeatureThetaU (vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpThetaUVector &tu, vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpRotationMatrix &R, vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpHomogeneousMatrix &M, vpFeatureThetaURotationRepresentationType r)
 
void buildFrom (vpThetaUVector &tu)
 
void buildFrom (const vpRotationMatrix &R)
 
void buildFrom (const vpHomogeneousMatrix &M)
 
virtual ~vpFeatureThetaU ()
 
void set_TUx (const double tu_x)
 
void set_TUy (const double tu_y)
 
void set_TUz (const double tu_z)
 
double get_TUx () const
 
double get_TUy () const
 
double get_TUz () const
 
vpMatrix interaction (const unsigned int select=FEATURE_ALL)
 
vpColVector error (const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
 
void print (const unsigned int select=FEATURE_ALL) const
 
vpFeatureThetaUduplicate () const
 
void display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
 
void display (const vpCameraParameters &cam, const vpImage< vpRGBa > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
 
unsigned int dimension_s ()
 
virtual double operator[] (const unsigned int i) const
 
vpColVector get_s (unsigned int select=FEATURE_ALL) const
 
unsigned int getDimension (const unsigned int select=FEATURE_ALL) const
 
void setFlags ()
 
void setDeallocate (vpBasicFeatureDeallocatorType d)
 
vpBasicFeatureDeallocatorType getDeallocate ()
 

Static Public Member Functions

static unsigned int selectTUx ()
 
static unsigned int selectTUy ()
 
static unsigned int selectTUz ()
 
static unsigned int selectAll ()
 

Static Public Attributes

static const unsigned int FEATURE_LINE [32]
 
static const unsigned int FEATURE_ALL = 0xffff
 

Protected Member Functions

void resetFlags ()
 

Protected Attributes

vpColVector s
 
unsigned int dim_s
 
bool * flags
 
unsigned int nbParameters
 
vpBasicFeatureDeallocatorType deallocate
 

Detailed Description

Class that defines a 3D visual feature $ s$ from a $ \theta u $ axis/angle parametrization that represent the rotation between to frames.

Let us denote $ \theta u = (\theta u_x, \theta u_y, \theta u_z)$ .

It is convenient to consider two coordinate frames: the current camera frame $ {\cal{F}}_c $ and the desired camera frame $ {\cal{F}}_{c^*} $.

Let $^{c^*}R_c $ be the rotation matrix that gives the orientation of the current camera frame relative to the desired camera frame. Let $ \theta u_{^{c^*}R_c} $ to corresponding axis/angle representation of this rotation.

Furthermore, let $^{c}R_{c^*} $ the rotation matrix that gives the orientation of the desired camera frame relative to the current camera frame. Let $ \theta u_{^{c}R_{c^*}} $ to corresponding axis/angle representation of this rotation.

This class can be used to manipulate two kind of visual features:

  • $ s = \theta u_{^{c^*}R_c} $ if the orientation of current camera frame relative to the desired frame has to be considered. The desired visual feature $ s^* $ is equal to zero. The corresponding error is than equal to $ e=(s-s^*) = \theta u_{^{c^*}R_c} $. In this case, the interaction matrix related to $ s $ is given by

    \[ L = \left[ \begin{array}{cc} 0_3 & L_{\theta u} \end{array} \right] \]

    with

    \[ L_{\theta u} = I_3 + \frac{\theta}{2} \; [u]_\times + \left(1 - \frac{sinc \theta}{sinc^2 \frac{\theta}{2}}\right) [u]^2_\times \]

    where $ 0_3 $ is a $ 3 \times 3 $ nul matrix, $ I_3 $ is the $3 \times 3$ identity matrix, and for more readability $ \theta $ and $ u $ respectively the angle and the axis coordinates of the $ \theta u_{^{c^*}R_c} $ representation.
  • $ s = \theta u_{^{c}R_{c^*}} $ if it is more the orientation of the desired camera frame relative to the current frame that has to be considered. The desired visual feature $ s^* $ is equal to zero. The corresponding error is than equal to $e=(s-s^*) = \theta u_{^{c}R_{c^*}} $. In this case, the interaction matrix related to $ s $ is given by

    \[ L = \left[ \begin{array}{cc} 0_3 & L_{\theta u} \end{array} \right] \]

    with

    \[ L_{\theta u} = -I_3 + \frac{\theta}{2} \; [u]_\times - \left(1 - \frac{sinc \theta}{sinc^2 \frac{\theta}{2}}\right) [u]^2_\times \]

    where $ 0_3 $ is a $ 3 \times 3 $ nul matrix, $ I_3 $ is the $3 \times 3$ identity matrix, and for more readability $ \theta $ and $ u $ respectively the angle and the axis coordinates of the $ \theta u_{^{c}R_{c^*}} $ representation.

The kind of visual feature is to set during the construction of the vpFeatureThetaU() object by using the selector vpFeatureThetaU::vpFeatureThetaURotationRepresentationType.

To initialize the feature $(\theta u_x, \theta u_y, \theta u_z)$ you may use vpFeatureThetaU member fonctions like set_TUx(), set_TUy(), set_TUz(), or also buildFrom() fonctions.

Depending on the choice of the visual feature representation, the interaction() method allows to compute the interaction matrix $ L $ associated to the visual feature, while the error() method computes the error vector $(s - s^*)$ between the current visual feature and the desired one.

To know more on the $ \theta u $ axis/angle representation for a 3D rotation see the vpThetaUVector class.

The code below shows how to create a eye-in hand visual servoing task using a 3D $\theta u$ feature $(\theta u_x,\theta u_y, \theta u_z)$ that correspond to the 3D rotation between the current camera frame and the desired camera frame. To control six degrees of freedom, at least three other features must be considered like vpFeatureTranslation visual features. First we create a current ( $s$) 3D $\theta u$ feature, than set the task to use the interaction matrix associated to the current feature $L_s$ and than compute the camera velocity $v=-\lambda \; L_s^+ \; (s-s^*)$. The current feature $s$ is updated in the while() loop while $s^*$ is considered as zero.

#include <visp/vpFeatureThetaU.h>
#include <visp/vpHomogeneousMatrix.h>
#include <visp/vpServo.h>
int main()
{
vpServo task; // Visual servoing task
// ... cMcd need here to be initialized from for example a pose estimation.
// Creation of the current feature s that correspond to the rotation
// in angle/axis parametrization between the current camera frame
// and the desired camera frame
s.buildFrom(cMcd); // Initialization of the feature
// Set eye-in-hand control law.
// The computed velocities will be expressed in the camera frame
// Interaction matrix is computed with the current visual features s
// Add the 3D ThetaU feature to the task
task.addFeature(s); // s* is here considered as zero
// Control loop
for ( ; ; ) {
// ... cMcd need here to be initialized from for example a pose estimation.
// Update the current ThetaU visual feature
s.buildFrom(cMcd);
// compute the control law
vpColVector v = task.computeControlLaw(); // camera velocity
}
}

If you want to deal only with the $(\theta u_x,\theta u_y)$ subset feature from the 3D $\theta u$ , you have just to modify the addFeature() call in the previous example by the following line. In that case, the dimension of $s$ is two.

// Add the (ThetaU_x, ThetaU_y) subset features from the 3D ThetaU
// rotation to the task

If you want to build your own control law, this other example shows how to create a current ( $s$) and desired ( $s^*$) 3D $\theta u$ visual feature, compute the corresponding error vector $(s-s^*)$ and finally build the interaction matrix $L_s$.

#include <visp/vpFeatureThetaU.h>
#include <visp/vpHomogeneousMatrix.h>
#include <visp/vpMatrix.h>
int main()
{
// ... cdMc need here to be initialized from for example a pose estimation.
// Creation of the current feature s
s.buildFrom(cdMc); // Initialization of the feature
// Creation of the desired feature s*. By default this feature is
// initialized to zero
// Compute the interaction matrix L_s for the current ThetaU feature
vpMatrix L = s.interaction();
// Compute the error vector (s-s*) for the ThetaU feature
s.error(s_star);
}
Examples:
servoAfma62DhalfCamVelocity.cpp, servoSimu3D_cdMc_CamVelocity.cpp, servoSimu3D_cMcd_CamVelocity.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuThetaUCamVelocity.cpp, and testFeature.cpp.

Definition at line 229 of file vpFeatureThetaU.h.

Member Enumeration Documentation

Indicates who should deallocate the feature.

Enumerator
user 
vpServo 

Definition at line 152 of file vpBasicFeature.h.

Enumerator
cdRc 

Selector used to manipulate the visual feature $ s = \theta u_{^{c^*}R_c} $. This visual feature represent the orientation of the current camera frame relative to the desired camera frame.

cRcd 

Selector used to manipulate the visual feature $ s = \theta u_{^{c}R_{c^*}} $. This visual feature represent the orientation of the desired camera frame relative to the current camera frame.

Definition at line 241 of file vpFeatureThetaU.h.

Enumerator
TUx 

Select the subset $ \theta u_x $ visual feature from the $ \theta u$ angle/axis representation.

TUy 

Select the subset $ \theta u_y $ visual feature from the $ \theta u$ angle/axis representation.

TUz 

Select the subset $ \theta u_z $ visual feature from the $ \theta u$ angle/axis representation.

Definition at line 232 of file vpFeatureThetaU.h.

Constructor & Destructor Documentation

vpFeatureThetaU::vpFeatureThetaU ( vpFeatureThetaURotationRepresentationType  r)

Default constructor that build a visual feature and initialize it to zero.

Parameters
r[in] : The rotation representation of the $ \theta u$ visual feature.

Definition at line 94 of file vpFeatureThetaU.cpp.

References init().

Referenced by duplicate().

vpFeatureThetaU::vpFeatureThetaU ( vpThetaUVector tu,
vpFeatureThetaURotationRepresentationType  r 
)

Constructor that build a 3D visual feature from a $ \theta u $ vector that represent the rotation $ R $ the camera has to achieve.

Parameters
tu[in] : Rotation that the camera has to achieve in $ \theta u $ angle/axis representation. Depending on the rotation representation type (vpFeatureThetaU::vpFeatureThetaURotationRepresentationType) used to construct this object, the parameter tu represents either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).
r[in] : The rotation representation of $ \theta u $.

Definition at line 123 of file vpFeatureThetaU.cpp.

References buildFrom(), and init().

vpFeatureThetaU::vpFeatureThetaU ( vpRotationMatrix R,
vpFeatureThetaURotationRepresentationType  r 
)

Constructor that build a 3D $ \theta u $ visual feature from a rotation matrix $ R $ that represent the rotation that the camera has to achieve.

Parameters
R[in] : Rotation that the camera has to achieve. Depending on r this rotation represent either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).
r[in] : The rotation representation of R.

Definition at line 152 of file vpFeatureThetaU.cpp.

References buildFrom(), and init().

vpFeatureThetaU::vpFeatureThetaU ( vpHomogeneousMatrix M,
vpFeatureThetaURotationRepresentationType  r 
)

Constructor that build a 3D $ \theta u $ visual feature from an homogeneous matrix $ M $ that represent the displacement that the camera has to achieve.

Parameters
M[in] : Homogeneous transformation that describe the movement that the camera has to achieve. Only the rotational part of this homogeneous transformation is taken into consideration. Depending on r the rotation represent either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).
r[in] : The rotation representation of M.

Definition at line 184 of file vpFeatureThetaU.cpp.

References buildFrom(), vpHomogeneousMatrix::extract(), and init().

virtual vpFeatureThetaU::~vpFeatureThetaU ( )
inlinevirtual

Destructor. Does nothing.

Definition at line 276 of file vpFeatureThetaU.h.

References vpBasicFeature::flags.

Member Function Documentation

void vpFeatureThetaU::buildFrom ( vpThetaUVector tu)

Build a 3D visual feature from a $ \theta u $ vector that represent the rotation $ R $ the camera has to achieve.

Parameters
tu[in] : Rotation that the camera has to achieve in $ \theta u $ angle/axis representation. Depending on the rotation representation type (vpFeatureThetaU::vpFeatureThetaURotationRepresentationType) used to construct this object, the parameter tu represents either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).
Examples:
servoAfma62DhalfCamVelocity.cpp, and testFeature.cpp.

Definition at line 215 of file vpFeatureThetaU.cpp.

References vpBasicFeature::flags, vpBasicFeature::nbParameters, and vpBasicFeature::s.

Referenced by buildFrom(), and vpFeatureThetaU().

void vpFeatureThetaU::buildFrom ( const vpRotationMatrix R)

Build a 3D $ \theta u $ visual feature from a rotation matrix $ R $ that represent the rotation that the camera has to achieve.

Parameters
R[in] : Rotation that the camera has to achieve. Depending on the rotation representation type (vpFeatureThetaU::vpFeatureThetaURotationRepresentationType) used to construct this object, the parameter R represents either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).

Definition at line 239 of file vpFeatureThetaU.cpp.

References buildFrom().

void vpFeatureThetaU::buildFrom ( const vpHomogeneousMatrix M)

Build a 3D $ \theta u $ visual feature from an homogeneous matrix $ M $ that represent the displacement that the camera has to achieve.

Parameters
M[in] : Homogeneous transformation that describe the movement that the camera has to achieve. Only the rotational part of this homogeneous transformation is taken into consideration. Depending on the rotation representation type (vpFeatureThetaU::vpFeatureThetaURotationRepresentationType) used to construct this object, the parameter M represents either the rotation that the camera has to achieve to move from the desired camera frame to the current one ( $ ^{c^*}R_c$), or the rotation that the camera has to achieve to move from the current camera frame to the desired one ( $ ^{c}R_{c^*}$).

Definition at line 264 of file vpFeatureThetaU.cpp.

References buildFrom(), and vpHomogeneousMatrix::extract().

unsigned int vpBasicFeature::dimension_s ( )
inlineinherited

Return the dimension of the feature vector $\bf s$.

Definition at line 102 of file vpBasicFeature.h.

void vpFeatureThetaU::display ( const vpCameraParameters cam,
const vpImage< unsigned char > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Not implemented.

Implements vpBasicFeature.

Definition at line 673 of file vpFeatureThetaU.cpp.

References vpERROR_TRACE.

void vpFeatureThetaU::display ( const vpCameraParameters cam,
const vpImage< vpRGBa > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Not implemented.

Implements vpBasicFeature.

Definition at line 694 of file vpFeatureThetaU.cpp.

References vpERROR_TRACE.

vpFeatureThetaU * vpFeatureThetaU::duplicate ( ) const
virtual

Feature duplication.

Create an object with the same type.

s_star = s.duplicate(); // s_star is now a vpFeatureThetaU

Implements vpBasicFeature.

Definition at line 656 of file vpFeatureThetaU.cpp.

References cdRc, cRcd, and vpFeatureThetaU().

vpColVector vpFeatureThetaU::error ( const vpBasicFeature s_star,
const unsigned int  select = FEATURE_ALL 
)
virtual

Compute the error $ (s-s^*)$ between the current and the desired visual features from a subset of the possible features.

Since this visual feature $ s $ represent either the rotation from the desired camera frame to the current camera frame $^{c^*}R_{c} $, or the rotation from the current camera frame to the desired camera frame $^{c}R_{c^*} $, the desired visual feature $ s^* $ should be zero. Thus, the error is here equal to the current visual feature $ s $.

Parameters
s_star: Desired visual visual feature that should be equal to zero.
select: The error can be computed for a selection of a subset of the possible $ \theta u $ features.
  • To compute the error for all the three $ \theta u $ features use vpBasicFeature::FEATURE_ALL. In that case the error vector is a 3 dimension column vector.
  • To compute the error for only one of the $ \theta u $ component feature ( $ \theta u_x, \theta u_y, \theta u_z$) use one of the corresponding function selectTUx(), selectTUy() or selectTUz(). In that case the error vector is a 1 dimension column vector.
Returns
The error $ (s-s^*)$ between the current and the desired visual feature.
Exceptions
vpFeatureException::badInitializationError: If the desired visual feature $ s^* $ is not equal to zero.

The code below shows how to use this method to manipulate the $\theta u_z $ subset:

// Creation of the current feature s
s.set_TUz(0.3);
// Creation of the desired feature s^*. By default this feature is
// initialized to zero
// Compute the interaction matrix for the ThetaU_z feature
// Compute the error vector (s-s*) for the ThetaU_z feature

To manipulate the subset features $s=(\theta u_y, \theta u_z)$, the code becomes:

// Compute the interaction matrix for the ThetaU_y, ThetaU_z features
// Compute the error vector e = (s-s*) for the ThetaU_y, ThetaU_z feature

Reimplemented from vpBasicFeature.

Examples:
testFeature.cpp.

Definition at line 566 of file vpFeatureThetaU.cpp.

References vpFeatureException::badInitializationError, vpBasicFeature::get_s(), vpBasicFeature::s, selectTUx(), selectTUy(), selectTUz(), vpMatrix::stackMatrices(), vpMatrix::sumSquare(), and vpERROR_TRACE.

double vpFeatureThetaU::get_TUx ( ) const

Return the $\theta u_x $ subset value of the visual feature $s$.

Definition at line 319 of file vpFeatureThetaU.cpp.

References vpBasicFeature::s.

double vpFeatureThetaU::get_TUy ( ) const

Return the $\theta u_y $ subset value of the visual feature $s$.

Definition at line 329 of file vpFeatureThetaU.cpp.

References vpBasicFeature::s.

double vpFeatureThetaU::get_TUz ( ) const

Return the $\theta u_z $ subset value of the visual feature $s$.

Definition at line 341 of file vpFeatureThetaU.cpp.

References vpBasicFeature::s.

vpBasicFeatureDeallocatorType vpBasicFeature::getDeallocate ( )
inlineinherited

Definition at line 162 of file vpBasicFeature.h.

Referenced by vpServo::kill().

unsigned int vpBasicFeature::getDimension ( const unsigned int  select = FEATURE_ALL) const
inherited

Get the feature vector dimension.

Definition at line 90 of file vpBasicFeature.cpp.

References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpMatrix::getRows(), and vpBasicFeature::s.

Referenced by vpServo::getDimension().

void vpFeatureThetaU::init ( void  )
virtual

Initialise the memory space requested for 3D $ \theta u $ visual feature.

Implements vpBasicFeature.

Definition at line 74 of file vpFeatureThetaU.cpp.

References vpBasicFeature::dim_s, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpColVector::resize(), and vpBasicFeature::s.

Referenced by vpFeatureThetaU().

vpMatrix vpFeatureThetaU::interaction ( const unsigned int  select = FEATURE_ALL)
virtual

Compute and return the interaction matrix $ L $ from a subset ( $ \theta u_x, \theta u_y, \theta u_z$) of the possible $ \theta u $ features that represent the 3D rotation $^{c^*}R_c$ or $^{c}R_{c^*}$, with

\[ L = [ 0_3 \; L_{\theta u}] \]

See the vpFeatureThetaU class description for the equations of $L_{\theta u}$.

Parameters
select: Selection of a subset of the possible $ \theta u $ features.
  • To compute the interaction matrix for all the three $ \theta u $ features use vpBasicFeature::FEATURE_ALL. In that case the dimension of the interaction matrix is $ [3 \times 6] $
  • To compute the interaction matrix for only one of the $ \theta u $ component feature ( $\theta u_x, \theta u_y, \theta u_z$) use one of the corresponding function selectTUx(), selectTUy() or selectTUz(). In that case the returned interaction matrix is $ [1 \times 6] $ dimension.
Returns
The interaction matrix computed from the $ \theta u $ features that represent either the rotation $^{c^*}R_c$ or the rotation $^{c}R_{c^*}$.

The code below shows how to compute the interaction matrix associated to the visual feature $s = \theta u_x $.

// Creation of the current feature s
s.buildFrom(cdMc);

The code below shows how to compute the interaction matrix associated to the $s = (\theta u_x, \theta u_y) $ subset visual feature:

L_xy is here now a 2 by 6 matrix. The first line corresponds to the $ \theta u_x $ visual feature while the second one to the $ \theta u_y $ visual feature.

It is also possible to build the interaction matrix from all the $ \theta u $ components by:

In that case, L_xyz is a 3 by 6 interaction matrix where the last line corresponds to the $ \theta u_z $ visual feature.

Implements vpBasicFeature.

Examples:
testFeature.cpp.

Definition at line 411 of file vpFeatureThetaU.cpp.

References cdRc, vpBasicFeature::deallocate, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpBasicFeature::resetFlags(), vpMatrix::resize(), vpBasicFeature::s, selectTUx(), selectTUy(), selectTUz(), vpMatrix::setIdentity(), vpMath::sinc(), vpColVector::skew(), vpMath::sqr(), vpMatrix::stackMatrices(), vpMatrix::sumSquare(), vpBasicFeature::user, and vpTRACE.

virtual double vpBasicFeature::operator[] ( const unsigned int  i) const
inlinevirtualinherited

Return element i in the state vector (usage : x = s[i] )

Definition at line 111 of file vpBasicFeature.h.

void vpFeatureThetaU::print ( const unsigned int  select = FEATURE_ALL) const
virtual

Print to stdout the values of the current visual feature $ s $.

Parameters
select: Selection of a subset of the possible $ \theta u $ features.
vpThetaUVector tu; // Current visual feature s
tu[0] = 0.1;
tu[1] = 0.2;
tu[2] = 0.3;
// Creation of the current feature s
s.buildFrom(tu);
s.print(); // print all the 3 components of the feature
s.print(vpBasicFeature::FEATURE_ALL); // same behavior then previous line
s.print(vpFeatureThetaU::selectTUz()); // print only the ThetaU_z component

Implements vpBasicFeature.

Examples:
testFeature.cpp.

Definition at line 630 of file vpFeatureThetaU.cpp.

References vpBasicFeature::s, selectTUx(), selectTUy(), and selectTUz().

static unsigned int vpBasicFeature::selectAll ( )
inlinestaticinherited

Select all the features.

Definition at line 114 of file vpBasicFeature.h.

static unsigned int vpFeatureThetaU::selectTUx ( )
inlinestatic

Function used to select the $ \theta u_x$ subset of the $ \theta u $ visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ \theta u_x$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

vpServo task;
...
// Add the (ThetaU_x, ThetaU_y) subset features from the 3D ThetaU
// rotation to the task
See also
selectTUy(), selectTUz()

Definition at line 319 of file vpFeatureThetaU.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureThetaU::selectTUy ( )
inlinestatic

Function used to select the $ \theta u_y$ subset of the $ \theta u $ visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ \theta u_y$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

vpServo task;
...
// Add the (ThetaU_x, ThetaU_y) subset features from the 3D ThetaU
// rotation to the task
See also
selectTUx(), selectTUz()

Definition at line 344 of file vpFeatureThetaU.h.

Referenced by error(), interaction(), and print().

static unsigned int vpFeatureThetaU::selectTUz ( )
inlinestatic

Function used to select the $ \theta u_z$ subset of the $ \theta u $ visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ \theta u_z$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

vpServo task;
...
// Add the (ThetaU_z) subset feature from the 3D ThetaU
// rotation to the task
See also
selectTUx(), selectTUy()
Examples:
testFeature.cpp.

Definition at line 369 of file vpFeatureThetaU.h.

Referenced by error(), interaction(), and print().

void vpFeatureThetaU::set_TUx ( const double  tu_x)

Initialise the $\theta u_x $ subset value of the 3D visual feature $ s$.

Parameters
tu_x: $\theta u_x $ subset value to initialize.
See also
get_TUz()

Definition at line 280 of file vpFeatureThetaU.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpFeatureThetaU::set_TUy ( const double  tu_y)

Initialise the $\theta u_y $ subset value of the 3D visual feature $ s$.

Parameters
tu_y: $\theta u_y $ subset value to initialize.
See also
get_TUy()

Definition at line 293 of file vpFeatureThetaU.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpFeatureThetaU::set_TUz ( const double  tu_z)

Initialise the $\theta u_z $ subset value of the 3D visual feature $ s$.

Parameters
tu_z: $\theta u_z $ subset value to initialize.
See also
get_TUz()

Definition at line 307 of file vpFeatureThetaU.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

void vpBasicFeature::setDeallocate ( vpBasicFeatureDeallocatorType  d)
inlineinherited

Definition at line 161 of file vpBasicFeature.h.

Referenced by vpServo::addFeature().

void vpBasicFeature::setFlags ( )
inherited

Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.

Definition at line 133 of file vpBasicFeature.cpp.

References vpBasicFeature::flags, and vpBasicFeature::nbParameters.

Member Data Documentation

const unsigned int vpBasicFeature::FEATURE_ALL = 0xffff
staticinherited
const unsigned int vpBasicFeature::FEATURE_LINE
staticinherited
Initial value:
=
{
(unsigned int)(1 << 0), (unsigned int)(1 << 1),
(unsigned int)(1 << 2), (unsigned int)(1 << 3),
(unsigned int)(1 << 4), (unsigned int)(1 << 5),
(unsigned int)(1 << 6), (unsigned int)(1 << 7),
(unsigned int)(1 << 8), (unsigned int)(1 << 9),
(unsigned int)(1 << 10), (unsigned int)(1 << 11),
(unsigned int)(1 << 12), (unsigned int)(1 << 13),
(unsigned int)(1 << 14), (unsigned int)(1 << 15),
(unsigned int)(1 << 16), (unsigned int)(1 << 17),
(unsigned int)(1 << 18), (unsigned int)(1 << 19),
(unsigned int)(1 << 20), (unsigned int)(1 << 21),
(unsigned int)(1 << 22), (unsigned int)(1 << 23),
(unsigned int)(1 << 24), (unsigned int)(1 << 25),
(unsigned int)(1 << 26), (unsigned int)(1 << 27),
(unsigned int)(1 << 28), (unsigned int)(1 << 29),
(unsigned int)(1 << 30), (unsigned int)(1 << 31)
}

Definition at line 85 of file vpBasicFeature.h.

Referenced by vpBasicFeature::error(), vpGenericFeature::error(), vpBasicFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpFeatureMoment::interaction(), vpGenericFeature::interaction(), vpGenericFeature::print(), and vpFeatureMoment::print().

bool* vpBasicFeature::flags
protectedinherited

Ensure that all the parameters needed to compute the iteraction matrix are set.

Definition at line 96 of file vpBasicFeature.h.

Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureMoment::duplicate(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureVanishingPoint::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeaturePointPolar::interaction(), interaction(), vpFeatureTranslation::interaction(), vpBasicFeature::resetFlags(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePointPolar::set_theta(), set_TUx(), set_TUy(), set_TUz(), vpFeatureEllipse::set_x(), vpFeatureVanishingPoint::set_x(), vpFeatureDepth::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeatureDepth::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureLuminance::set_Z(), vpFeatureDepth::set_Z(), vpFeaturePoint::set_Z(), vpFeaturePoint3D::set_Z(), vpFeaturePointPolar::set_Z(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpBasicFeature::vpBasicFeature(), vpFeatureLuminance::vpFeatureLuminance(), vpFeatureDepth::~vpFeatureDepth(), vpFeatureEllipse::~vpFeatureEllipse(), vpFeatureLine::~vpFeatureLine(), vpFeatureLuminance::~vpFeatureLuminance(), vpFeatureMoment::~vpFeatureMoment(), vpFeaturePoint::~vpFeaturePoint(), vpFeaturePoint3D::~vpFeaturePoint3D(), vpFeaturePointPolar::~vpFeaturePointPolar(), vpFeatureSegment::~vpFeatureSegment(), ~vpFeatureThetaU(), vpFeatureTranslation::~vpFeatureTranslation(), and vpFeatureVanishingPoint::~vpFeatureVanishingPoint().

vpColVector vpBasicFeature::s
protectedinherited

State of the visual feature.

Definition at line 91 of file vpBasicFeature.h.

Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), buildFrom(), vpFeaturePointPolar::buildFrom(), vpFeatureTranslation::buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpBasicFeature::error(), vpFeatureEllipse::error(), vpFeatureVanishingPoint::error(), vpFeatureLuminance::error(), vpFeatureMomentAlpha::error(), vpGenericFeature::error(), vpFeatureDepth::error(), vpFeaturePoint::error(), vpFeatureLine::error(), vpFeaturePoint3D::error(), vpFeaturePointPolar::error(), error(), vpFeatureTranslation::error(), vpFeatureDepth::get_LogZoverZstar(), vpFeaturePointPolar::get_rho(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpFeaturePointPolar::get_theta(), get_TUx(), get_TUy(), get_TUz(), vpFeatureTranslation::get_Tx(), vpFeatureTranslation::get_Ty(), vpFeatureTranslation::get_Tz(), vpFeatureVanishingPoint::get_x(), vpFeaturePoint::get_x(), vpFeaturePoint3D::get_X(), vpFeatureVanishingPoint::get_y(), vpFeaturePoint::get_y(), vpFeaturePoint3D::get_Y(), vpFeaturePoint3D::get_Z(), vpBasicFeature::getDimension(), vpFeatureEllipse::init(), vpFeatureVanishingPoint::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpGenericFeature::init(), vpFeatureMoment::init(), vpFeaturePoint::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), init(), vpFeaturePointPolar::init(), vpFeatureTranslation::init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeaturePointPolar::interaction(), interaction(), vpFeatureTranslation::interaction(), vpFeatureEllipse::print(), vpFeatureSegment::print(), vpGenericFeature::print(), vpFeatureMoment::print(), vpFeatureLine::print(), print(), vpFeatureTranslation::print(), vpFeatureDepth::set_LogZoverZstar(), vpFeaturePointPolar::set_rho(), vpGenericFeature::set_s(), vpFeaturePointPolar::set_theta(), set_TUx(), set_TUy(), set_TUz(), vpFeatureTranslation::set_Tx(), vpFeatureTranslation::set_Ty(), vpFeatureTranslation::set_Tz(), vpFeatureEllipse::set_x(), vpFeatureVanishingPoint::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().