Visual Servoing Platform  version 3.2.0

#include <vpFeatureThetaU.h>

+ Inheritance diagram for vpFeatureThetaU:

Public Types

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

Public Member Functions

 vpFeatureThetaU ()
 
 vpFeatureThetaU (vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpThetaUVector &tu, vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpRotationMatrix &R, vpFeatureThetaURotationRepresentationType r)
 
 vpFeatureThetaU (vpHomogeneousMatrix &M, vpFeatureThetaURotationRepresentationType r)
 
virtual ~vpFeatureThetaU ()
 
void buildFrom (vpThetaUVector &tu)
 
void buildFrom (const vpRotationMatrix &R)
 
void buildFrom (const vpHomogeneousMatrix &M)
 
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
 
vpFeatureThetaUduplicate () const
 
vpColVector error (const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
 
vpFeatureThetaURotationRepresentationType getFeatureThetaURotationType () const
 
double get_TUx () const
 
double get_TUy () const
 
double get_TUz () const
 
void init ()
 
vpMatrix interaction (const unsigned int select=FEATURE_ALL)
 
void print (const unsigned int select=FEATURE_ALL) const
 
void set_TUx (const double tu_x)
 
void set_TUy (const double tu_y)
 
void set_TUz (const double tu_z)
 
void setFeatureThetaURotationType (const vpFeatureThetaURotationRepresentationType r)
 

Static Public Member Functions

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

Static Public Attributes

static const unsigned int FEATURE_LINE [32]
 

Protected Attributes

vpColVector s
 
unsigned int dim_s
 
bool * flags
 
unsigned int nbParameters
 

Inherited functionalities from vpBasicFeature

unsigned int dimension_s ()
 
vpColVector get_s (unsigned int select=FEATURE_ALL) const
 
vpBasicFeatureDeallocatorType getDeallocate ()
 
unsigned int getDimension (const unsigned int select=FEATURE_ALL) const
 
virtual double operator[] (const unsigned int i) const
 
void setDeallocate (vpBasicFeatureDeallocatorType d)
 
void setFlags ()
 
static unsigned int selectAll ()
 
vpBasicFeatureDeallocatorType deallocate
 
void resetFlags ()
 

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 <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/visual_features/vpFeatureThetaU.h>
#include <visp3/vs/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 <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/core/vpMatrix.h>
#include <visp3/visual_features/vpFeatureThetaU.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, servoFrankaPBVS.cpp, servoSimu3D_cdMc_CamVelocity.cpp, servoSimu3D_cMcd_CamVelocity.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuThetaUCamVelocity.cpp, and testFeature.cpp.

Definition at line 223 of file vpFeatureThetaU.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
Enumerator
FEATURE_ALL 

Definition at line 81 of file vpBasicFeature.h.

◆ vpBasicFeatureDeallocatorType

Indicates who should deallocate the feature.

Enumerator
user 
vpServo 

Definition at line 87 of file vpBasicFeature.h.

◆ vpFeatureThetaURotationRepresentationType

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 234 of file vpFeatureThetaU.h.

◆ vpFeatureThetaUType

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 226 of file vpFeatureThetaU.h.

Constructor & Destructor Documentation

◆ vpFeatureThetaU() [1/5]

vpFeatureThetaU::vpFeatureThetaU ( )

Constructor that builds a visual feature and initialize it to zero. The rotation representation of the $ \theta u$ visual feature will be vpFeatureThetaU::cdRc by default. Use the function setFeatureThetaURotationType() to set the desired type of feature.

Definition at line 87 of file vpFeatureThetaU.cpp.

◆ vpFeatureThetaU() [2/5]

vpFeatureThetaU::vpFeatureThetaU ( vpFeatureThetaURotationRepresentationType  r)
explicit

Constructor that builds a visual feature and initialize it to zero.

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

Definition at line 100 of file vpFeatureThetaU.cpp.

◆ vpFeatureThetaU() [3/5]

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 128 of file vpFeatureThetaU.cpp.

◆ vpFeatureThetaU() [4/5]

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.

◆ vpFeatureThetaU() [5/5]

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 179 of file vpFeatureThetaU.cpp.

◆ ~vpFeatureThetaU()

virtual vpFeatureThetaU::~vpFeatureThetaU ( )
inlinevirtual

Destructor. Does nothing.

Definition at line 257 of file vpFeatureThetaU.h.

Member Function Documentation

◆ buildFrom() [1/3]

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 252 of file vpFeatureThetaU.cpp.

◆ buildFrom() [2/3]

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 228 of file vpFeatureThetaU.cpp.

◆ buildFrom() [3/3]

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, servoFrankaPBVS.cpp, and testFeature.cpp.

Definition at line 204 of file vpFeatureThetaU.cpp.

◆ dimension_s()

unsigned int vpBasicFeature::dimension_s ( )
inlineinherited

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

Definition at line 109 of file vpBasicFeature.h.

◆ display() [1/2]

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 664 of file vpFeatureThetaU.cpp.

◆ display() [2/2]

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 681 of file vpFeatureThetaU.cpp.

◆ duplicate()

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 648 of file vpFeatureThetaU.cpp.

◆ error()

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
vpMatrix L_z = s.interaction( vpFeatureThetaU::selectTUz() );
// Compute the error vector (s-s*) for the ThetaU_z feature
s.error(s_star, vpFeatureThetaU::selectTUz());

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
vpMatrix L_yz = s.interaction( vpFeatureThetaU::selectTUy() |
// 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.

◆ get_s()

vpColVector vpBasicFeature::get_s ( unsigned int  select = FEATURE_ALL) const
inherited

Get the feature vector $\bf s$.

Examples
servoAfma6Ellipse2DCamVelocity.cpp.

Definition at line 113 of file vpBasicFeature.cpp.

◆ get_TUx()

double vpFeatureThetaU::get_TUx ( ) const

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

Definition at line 329 of file vpFeatureThetaU.cpp.

◆ get_TUy()

double vpFeatureThetaU::get_TUy ( ) const

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

Definition at line 336 of file vpFeatureThetaU.cpp.

◆ get_TUz()

double vpFeatureThetaU::get_TUz ( ) const

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

Definition at line 343 of file vpFeatureThetaU.cpp.

◆ getDeallocate()

vpBasicFeatureDeallocatorType vpBasicFeature::getDeallocate ( )
inlineinherited

Definition at line 122 of file vpBasicFeature.h.

◆ getDimension()

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

Get the feature vector dimension.

Definition at line 99 of file vpBasicFeature.cpp.

◆ getFeatureThetaURotationType()

vpFeatureThetaU::vpFeatureThetaURotationRepresentationType vpFeatureThetaU::getFeatureThetaURotationType ( ) const

Get the type of rotation feature.

Returns
Type of rotation feature. It can be vpFeatureThetaU::cdRc or vpFeatureThetaU::cRcd.
See also
setFeatureThetaURotationType()

Definition at line 318 of file vpFeatureThetaU.cpp.

◆ init()

void vpFeatureThetaU::init ( void  )
virtual

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

Implements vpBasicFeature.

Definition at line 66 of file vpFeatureThetaU.cpp.

◆ interaction()

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);
vpMatrix L_x = s.interaction( vpFeatureThetaU::selectTUx() );

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:

vpMatrix L_xyz = s.interaction( vpBasicFeature::FEATURE_ALL );

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 407 of file vpFeatureThetaU.cpp.

◆ operator[]()

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

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

Definition at line 129 of file vpBasicFeature.h.

◆ print()

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 622 of file vpFeatureThetaU.cpp.

◆ resetFlags()

void vpBasicFeature::resetFlags ( )
protectedinherited

Definition at line 130 of file vpBasicFeature.cpp.

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

◆ selectAll()

static unsigned int vpBasicFeature::selectAll ( )
inlinestaticinherited

Select all the features.

Definition at line 141 of file vpBasicFeature.h.

◆ selectTUx()

unsigned int vpFeatureThetaU::selectTUx ( )
static

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 718 of file vpFeatureThetaU.cpp.

◆ selectTUy()

unsigned int vpFeatureThetaU::selectTUy ( )
static

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 743 of file vpFeatureThetaU.cpp.

◆ selectTUz()

unsigned int vpFeatureThetaU::selectTUz ( )
static

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 768 of file vpFeatureThetaU.cpp.

◆ set_TUx()

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 278 of file vpFeatureThetaU.cpp.

◆ set_TUy()

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 291 of file vpFeatureThetaU.cpp.

◆ set_TUz()

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 304 of file vpFeatureThetaU.cpp.

◆ setDeallocate()

void vpBasicFeature::setDeallocate ( vpBasicFeatureDeallocatorType  d)
inlineinherited

Definition at line 136 of file vpBasicFeature.h.

◆ setFeatureThetaURotationType()

void vpFeatureThetaU::setFeatureThetaURotationType ( const vpFeatureThetaURotationRepresentationType  r)

Set the type of rotation feature.

Parameters
r: type of feature. It can be vpFeatureThetaU::cdRc or vpFeatureThetaU::cRcd.
See also
getFeatureThetaURotationType()

Definition at line 268 of file vpFeatureThetaU.cpp.

◆ setFlags()

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 140 of file vpBasicFeature.cpp.

Member Data Documentation

◆ deallocate

vpBasicFeatureDeallocatorType vpBasicFeature::deallocate
protectedinherited

Definition at line 147 of file vpBasicFeature.h.

◆ dim_s

unsigned int vpBasicFeature::dim_s
protectedinherited

Dimension of the visual feature.

Definition at line 93 of file vpBasicFeature.h.

Referenced by vpGenericFeature::duplicate(), vpFeatureVanishingPoint::init(), vpFeatureEllipse::init(), and vpFeatureLuminance::init().

◆ FEATURE_LINE

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 79 of file vpBasicFeature.h.

Referenced by vpFeatureEllipse::selectMu02(), vpFeatureEllipse::selectMu11(), vpFeatureEllipse::selectMu20(), vpFeatureVanishingPoint::selectY(), and vpFeatureEllipse::selectY().

◆ flags

bool* vpBasicFeature::flags
protectedinherited

◆ nbParameters

unsigned int vpBasicFeature::nbParameters
protectedinherited

◆ s

vpFeatureThetaU::selectTUz
static unsigned int selectTUz()
Definition: vpFeatureThetaU.cpp:768
vpFeatureThetaU::selectTUx
static unsigned int selectTUx()
Definition: vpFeatureThetaU.cpp:718
vpServo::CURRENT
Definition: vpServo.h:185
vpServo::EYEINHAND_CAMERA
Definition: vpServo.h:158
vpThetaUVector
Implementation of a rotation vector as axis-angle minimal representation.
Definition: vpThetaUVector.h:145
vpBasicFeature::FEATURE_ALL
Definition: vpBasicFeature.h:81
vpColVector
Implementation of column vector and the associated operations.
Definition: vpColVector.h:71
vpMatrix
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:103
vpServo::setServo
void setServo(const vpServoType &servo_type)
Definition: vpServo.cpp:222
vpFeatureThetaU::cdRc
Definition: vpFeatureThetaU.h:235
vpColVector::print
int print(std::ostream &s, unsigned int length, char const *intro=0) const
Definition: vpColVector.cpp:1304
vpRotationMatrix
Implementation of a rotation matrix and operations on such kind of matrices.
Definition: vpRotationMatrix.h:70
vpFeatureThetaU
Class that defines a 3D visual feature from a axis/angle parametrization that represent the rotatio...
Definition: vpFeatureThetaU.h:223
vpFeatureThetaU::selectTUy
static unsigned int selectTUy()
Definition: vpFeatureThetaU.cpp:743
vpBasicFeature::s
vpColVector s
State of the visual feature.
Definition: vpBasicFeature.h:91
vpServo::setInteractionMatrixType
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
Definition: vpServo.cpp:573
vpServo
Definition: vpServo.h:149
vpServo::computeControlLaw
vpColVector computeControlLaw()
Definition: vpServo.cpp:934
vpServo::addFeature
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
Definition: vpServo.cpp:496
vpHomogeneousMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition: vpHomogeneousMatrix.h:91
vpFeatureThetaU::cRcd
Definition: vpFeatureThetaU.h:239
vpBasicFeature
class that defines what is a visual feature
Definition: vpBasicFeature.h:76