Visual Servoing Platform
version 3.0.0
|
#include <visp3/core/vpVelocityTwistMatrix.h>
Public Member Functions | |
vpVelocityTwistMatrix () | |
vpVelocityTwistMatrix (const vpVelocityTwistMatrix &V) | |
vpVelocityTwistMatrix (const vpHomogeneousMatrix &M) | |
vpVelocityTwistMatrix (const vpTranslationVector &t, const vpThetaUVector &thetau) | |
vpVelocityTwistMatrix (const vpTranslationVector &t, const vpRotationMatrix &R) | |
vpVelocityTwistMatrix (const double tx, const double ty, const double tz, const double tux, const double tuy, const double tuz) | |
virtual | ~vpVelocityTwistMatrix () |
vpVelocityTwistMatrix | buildFrom (const vpTranslationVector &t, const vpRotationMatrix &R) |
vpVelocityTwistMatrix | buildFrom (const vpTranslationVector &t, const vpThetaUVector &thetau) |
vpVelocityTwistMatrix | buildFrom (const vpHomogeneousMatrix &M) |
void | extract (vpRotationMatrix &R) const |
void | extract (vpTranslationVector &t) const |
void | eye () |
vpVelocityTwistMatrix | inverse () const |
void | inverse (vpVelocityTwistMatrix &V) const |
vpVelocityTwistMatrix | operator* (const vpVelocityTwistMatrix &V) const |
vpMatrix | operator* (const vpMatrix &M) const |
vpColVector | operator* (const vpColVector &v) const |
vpVelocityTwistMatrix & | operator= (const vpVelocityTwistMatrix &V) |
int | print (std::ostream &s, unsigned int length, char const *intro=0) const |
void | resize (const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true) |
Deprecated functions | |
vp_deprecated void | init () |
vp_deprecated void | setIdentity () |
Inherited functionalities from vpArray2D | |
double | getMinValue () const |
double | getMaxValue () const |
unsigned int | getRows () const |
unsigned int | getCols () const |
unsigned int | size () const |
double * | operator[] (unsigned int i) |
double * | operator[] (unsigned int i) const |
Static Public Member Functions | |
Inherited I/O from vpArray2D with Static Public Member Functions | |
static bool | load (const std::string &filename, vpArray2D< double > &A, const bool binary=false, char *header=NULL) |
static bool | loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=NULL) |
static bool | save (const std::string &filename, const vpArray2D< double > &A, const bool binary=false, const char *header="") |
static bool | saveYAML (const std::string &filename, const vpArray2D< double > &A, const char *header="") |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | rowNum |
unsigned int | colNum |
double ** | rowPtrs |
unsigned int | dsize |
Friends | |
class | vpMatrix |
Related Functions | |
(Note that these are not member functions.) | |
enum | vpGEMMmethod |
Implementation of a velocity twist matrix and operations on such kind of matrices.
Class that consider the particular case of twist transformation matrix that allows to transform a velocity skew from one frame to an other.
The vpVelocityTwistMatrix class is derived from vpArray2D<double>.
A twist transformation matrix is a 6x6 matrix that express a velocity in frame a knowing velocity in b. This matrix is defined as:
where is a rotation matrix and is a translation vector.
The vpVelocityTwistMatrix is derived from vpArray2D.
The code belows shows for example how to convert a velocity skew from camera frame to a fix frame.
Definition at line 105 of file vpVelocityTwistMatrix.h.
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | ) |
Initialize a velocity twist transformation matrix as identity.
Definition at line 91 of file vpVelocityTwistMatrix.cpp.
References eye().
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | const vpVelocityTwistMatrix & | V | ) |
Initialize a velocity twist transformation matrix from another velocity twist matrix.
V | : Velocity twist matrix used as initializer. |
Definition at line 102 of file vpVelocityTwistMatrix.cpp.
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | const vpHomogeneousMatrix & | M | ) |
Initialize a velocity twist transformation matrix from an homogeneous matrix with
M | : Homogeneous matrix used to initialize the velocity twist transformation matrix. |
Definition at line 118 of file vpVelocityTwistMatrix.cpp.
References buildFrom().
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | const vpTranslationVector & | t, |
const vpThetaUVector & | thetau | ||
) |
Initialize a velocity twist transformation matrix from a translation vector t and a rotation vector with parametrization.
t | : Translation vector. |
thetau | : rotation vector. |
Definition at line 134 of file vpVelocityTwistMatrix.cpp.
References buildFrom().
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | const vpTranslationVector & | t, |
const vpRotationMatrix & | R | ||
) |
Initialize a velocity twist transformation matrix from a translation vector t and a rotation matrix M.
t | : Translation vector. |
R | : Rotation matrix. |
Definition at line 151 of file vpVelocityTwistMatrix.cpp.
References buildFrom().
vpVelocityTwistMatrix::vpVelocityTwistMatrix | ( | const double | tx, |
const double | ty, | ||
const double | tz, | ||
const double | tux, | ||
const double | tuy, | ||
const double | tuz | ||
) |
Initialize a velocity twist transformation matrix from a translation vector and a rotation vector with parametrization.
tx,ty,tz | : Translation vector in meters. |
tux,tuy,tuz | : rotation vector expressed in radians. |
Definition at line 168 of file vpVelocityTwistMatrix.cpp.
References buildFrom().
|
inlinevirtual |
Destructor.
Definition at line 126 of file vpVelocityTwistMatrix.h.
vpVelocityTwistMatrix vpVelocityTwistMatrix::buildFrom | ( | const vpTranslationVector & | t, |
const vpRotationMatrix & | R | ||
) |
Build a velocity twist transformation matrix from a translation vector t and a rotation matrix M.
t | : Translation vector. |
R | : Rotation matrix. |
Definition at line 319 of file vpVelocityTwistMatrix.cpp.
References vpTranslationVector::skew().
Referenced by buildFrom(), vpMbEdgeKltTracker::computeVVS(), vpMbKltTracker::computeVVS(), vpMbEdgeTracker::computeVVS(), vpUnicycle::get_cVe(), vpPtu46::get_cVe(), vpRobotPtu46::get_cVe(), vpViper::get_cVe(), vpAfma4::get_cVe(), vpAfma6::get_cVe(), vpRobotBiclops::get_cVe(), vpBiclops::get_cVe(), vpSimulatorAfma6::get_cVe(), vpSimulatorViper850::get_cVe(), vpRobotAfma4::get_cVe(), vpRobotAfma6::get_cVe(), vpRobotViper650::get_cVe(), vpRobotViper850::get_cVe(), vpAfma4::get_cVf(), inverse(), vpRobotAfma4::setVelocity(), and vpVelocityTwistMatrix().
vpVelocityTwistMatrix vpVelocityTwistMatrix::buildFrom | ( | const vpTranslationVector & | t, |
const vpThetaUVector & | thetau | ||
) |
Initialize a velocity twist transformation matrix from a translation vector t and a rotation vector with parametrization.
t | : Translation vector. |
thetau | : rotation vector. |
Definition at line 347 of file vpVelocityTwistMatrix.cpp.
References vpRotationMatrix::buildFrom(), and buildFrom().
vpVelocityTwistMatrix vpVelocityTwistMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Initialize a velocity twist transformation matrix from an homogeneous matrix with
M | : Homogeneous matrix used to initialize the twist transformation matrix. |
Definition at line 368 of file vpVelocityTwistMatrix.cpp.
References buildFrom(), and vpHomogeneousMatrix::extract().
void vpVelocityTwistMatrix::extract | ( | vpRotationMatrix & | R | ) | const |
Extract the rotation matrix from the velocity twist matrix.
Definition at line 404 of file vpVelocityTwistMatrix.cpp.
void vpVelocityTwistMatrix::extract | ( | vpTranslationVector & | t | ) | const |
Extract the translation vector from the velocity twist matrix.
Definition at line 413 of file vpVelocityTwistMatrix.cpp.
References extract(), and vpRotationMatrix::t().
void vpVelocityTwistMatrix::eye | ( | ) |
Initialize a 6x6 velocity twist matrix as identity.
Definition at line 78 of file vpVelocityTwistMatrix.cpp.
Referenced by setIdentity(), and vpVelocityTwistMatrix().
|
inlineinherited |
Return the number of columns of the 2D array.
Definition at line 154 of file vpArray2D.h.
References vpArray2D< Type >::colNum.
Referenced by vpMatrix::csvPrint(), vpRotationMatrix::getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::getRow(), vpMatrix::inverseByQRLapack(), vpMatrix::kernel(), vpMatrix::maplePrint(), vpRowVector::operator*(), vpRowVector::operator+(), vpRowVector::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), vpForceTwistMatrix::print(), print(), vpRowVector::print(), vpMatrix::print(), vpMatrix::pseudoInverse(), and vpMatrix::svd().
|
inherited |
Return the array max value.
|
inherited |
Return the array min value.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 152 of file vpArray2D.h.
References vpArray2D< Type >::rowNum.
Referenced by vpMatrix::cppPrint(), vpMatrix::csvPrint(), vpRotationMatrix::getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::getRow(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByQRLapack(), vpMatrix::kernel(), vpMatrix::maplePrint(), vpMatrix::matlabPrint(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), vpForceTwistMatrix::print(), print(), vpPoseVector::print(), vpColVector::print(), vpMatrix::print(), and vpMatrix::pseudoInverse().
|
inline |
Definition at line 175 of file vpVelocityTwistMatrix.h.
vpVelocityTwistMatrix vpVelocityTwistMatrix::inverse | ( | ) | const |
Invert the velocity twist matrix.
Definition at line 382 of file vpVelocityTwistMatrix.cpp.
References buildFrom(), extract(), and vpRotationMatrix::t().
Referenced by inverse().
void vpVelocityTwistMatrix::inverse | ( | vpVelocityTwistMatrix & | V | ) | const |
Invert the velocity twist matrix.
Definition at line 397 of file vpVelocityTwistMatrix.cpp.
References inverse().
|
inlinestaticinherited |
Load a matrix from a file.
filename | : Absolute file name. |
A | : Array to be loaded |
binary | : If true the matrix is loaded from a binary file, else from a text file. |
header | : Header of the file is loaded in this parameter. |
Definition at line 308 of file vpArray2D.h.
References vpException::badValue, and vpArray2D< Type >::resize().
|
inlinestaticinherited |
Load an array from a YAML-formatted file.
filename | : absolute file name. |
A | : array to be loaded from the file. |
header | : header of the file is loaded in this parameter. |
Definition at line 392 of file vpArray2D.h.
References vpArray2D< Type >::resize().
vpVelocityTwistMatrix vpVelocityTwistMatrix::operator* | ( | const vpVelocityTwistMatrix & | V | ) | const |
Operator that allows to multiply a velocity twist transformation matrix by an other velocity twist transformation matrix.
Definition at line 200 of file vpVelocityTwistMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpArray2D< Type >::rowPtrs.
Operator that allows to multiply a velocity twist transformation matrix by a matrix.
As shown in the example below, this operator can be used to compute the corresponding camera velocity skew from the joint velocities knowing the robot jacobian.
vpException::dimensionError | If M is not a 6 rows dimension matrix. |
Definition at line 252 of file vpVelocityTwistMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< double >::rowPtrs.
vpColVector vpVelocityTwistMatrix::operator* | ( | const vpColVector & | v | ) | const |
Operator that allows to multiply a twist transformation matrix by a 6-dimension column vector.
v | : Velocity skew vector. |
vpException::dimensionError | If v is not a 6 dimension column vector. |
Definition at line 283 of file vpVelocityTwistMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getRows(), and vpArray2D< double >::rowPtrs.
vpVelocityTwistMatrix & vpVelocityTwistMatrix::operator= | ( | const vpVelocityTwistMatrix & | V | ) |
Copy operator that allow to set a velocity twist matrix from an other one.
V | : Velocity twist matrix to copy. |
Definition at line 60 of file vpVelocityTwistMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpArray2D< Type >::rowPtrs.
|
inlineinherited |
Set element using A[i][j] = x.
Definition at line 259 of file vpArray2D.h.
|
inlineinherited |
Get element using x = A[i][j].
Definition at line 261 of file vpArray2D.h.
int vpVelocityTwistMatrix::print | ( | std::ostream & | s, |
unsigned int | length, | ||
char const * | intro = 0 |
||
) | const |
Pretty print a velocity twist matrix. The data are tabulated. The common widths before and after the decimal point are set with respect to the parameter maxlen.
s | Stream used for the printing. |
length | The suggested width of each matrix element. The actual width grows in order to accomodate the whole integral part, and shrinks if the whole extent is not needed for all the numbers. |
intro | The introduction which is printed before the matrix. Can be set to zero (or omitted), in which case the introduction is not printed. |
Definition at line 447 of file vpVelocityTwistMatrix.cpp.
References vpArray2D< double >::getCols(), vpArray2D< double >::getRows(), and vpMath::maximum().
|
inline |
This function is not applicable to a velocity twist matrix that is always a 6-by-6 matrix.
vpException::fatalError | When this function is called. |
Definition at line 157 of file vpVelocityTwistMatrix.h.
References vpException::fatalError.
|
inlinestaticinherited |
Save a matrix to a file.
filename | : Absolute file name. |
A | : Array to be saved. |
binary | : If true the matrix is saved in a binary file, else a text file. |
header | : Optional line that will be saved at the beginning of the file. |
Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.
Definition at line 468 of file vpArray2D.h.
References vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
|
inlinestaticinherited |
Save an array in a YAML-formatted file.
filename | : absolute file name. |
A | : array to be saved in the file. |
header | : optional lines that will be saved at the beginning of the file. Should be YAML-formatted and will adapt to the indentation if any. |
Here is an example of outputs.
Content of matrix.yml:
Content of matrixIndent.yml:
Definition at line 560 of file vpArray2D.h.
References vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
void vpVelocityTwistMatrix::setIdentity | ( | ) |
Set the velocity twist transformation matrix to identity.
Definition at line 187 of file vpVelocityTwistMatrix.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 156 of file vpArray2D.h.
References vpArray2D< Type >::rowNum.
Referenced by vpRowVector::insert(), vpColVector::insert(), and vpColVector::operator*().
|
related |
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
friend |
Definition at line 107 of file vpVelocityTwistMatrix.h.
|
protectedinherited |
Number of columns in the array.
Definition at line 76 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpColVector::clear(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::expm(), vpMatrix::eye(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpRowVector::insert(), vpMatrix::insert(), vpMatrix::inverseByCholesky(), vpMatrix::inverseByLU(), vpMatrix::inverseByQR(), vpRotationMatrix::operator*(), vpRowVector::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*=(), vpRowVector::operator*=(), vpMatrix::operator*=(), vpRowVector::operator+(), vpRowVector::operator+=(), vpMatrix::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), vpMatrix::operator-=(), vpRowVector::operator/(), vpMatrix::operator/(), vpRowVector::operator/=(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubRowVector::operator=(), vpSubMatrix::operator=(), vpRowVector::operator=(), vpMatrix::operator=(), vpRowVector::reshape(), vpMatrix::setIdentity(), vpMatrix::solveBySVD(), vpRowVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::sum(), vpRowVector::sumSquare(), vpMatrix::sumSquare(), vpRowVector::t(), vpMatrix::t(), and vpMatrix::transpose().
|
inherited |
Address of the first element of the data array.
Definition at line 84 of file vpArray2D.h.
Referenced by vpMatrix::AtA(), vpHomogeneousMatrix::buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpThetaUVector::buildFrom(), vpSubColVector::checkParentStatus(), vpSubRowVector::checkParentStatus(), vpSubMatrix::checkParentStatus(), vpColVector::clear(), vpHomogeneousMatrix::convert(), vpTranslationVector::euclideanNorm(), vpRowVector::euclideanNorm(), vpColVector::euclideanNorm(), vpMatrix::euclideanNorm(), vpMatrix::expm(), vpThetaUVector::extract(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpTranslationVector::operator*(), vpRowVector::operator*(), vpColVector::operator*(), vpHomography::operator*(), vpTranslationVector::operator-(), vpRowVector::operator-(), vpColVector::operator-(), vpTranslationVector::operator/(), vpRowVector::operator/(), vpColVector::operator/(), vpHomography::operator/(), vpHomography::operator/=(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpTranslationVector::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpRxyzVector::operator=(), vpMatrix::operator=(), vpThetaUVector::operator=(), vpColVector::operator[](), vpRowVector::reshape(), vpColVector::reshape(), vpQuaternionVector::set(), vpMatrix::stackRows(), vpRotationVector::t(), vpTranslationVector::t(), vpPoseVector::t(), vpRowVector::t(), vpColVector::t(), vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::y(), vpQuaternionVector::z(), vpSubColVector::~vpSubColVector(), vpSubMatrix::~vpSubMatrix(), and vpSubRowVector::~vpSubRowVector().
|
protectedinherited |
Current array size (rowNum * colNum)
Definition at line 80 of file vpArray2D.h.
Referenced by vpColVector::clear(), vpTranslationVector::euclideanNorm(), vpRowVector::euclideanNorm(), vpColVector::euclideanNorm(), vpMatrix::euclideanNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpTranslationVector::operator*(), vpRotationVector::operator*(), vpTranslationVector::operator-(), vpTranslationVector::operator/(), vpRzyzVector::operator=(), vpRzyxVector::operator=(), vpRxyzVector::operator=(), vpMatrix::operator=(), vpThetaUVector::operator=(), vpRowVector::reshape(), vpColVector::reshape(), vpMatrix::stackRows(), and vpRotationVector::t().
|
protectedinherited |
Number of rows in the array.
Definition at line 74 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpColVector::clear(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::expm(), vpColVector::extract(), vpMatrix::eye(), vpColVector::infinityNorm(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpMatrix::insert(), vpMatrix::inverseByCholesky(), vpMatrix::inverseByLU(), vpMatrix::inverseByQR(), vpRotationMatrix::operator*(), vpTranslationVector::operator*(), vpHomogeneousMatrix::operator*(), vpColVector::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*=(), vpTranslationVector::operator*=(), vpColVector::operator*=(), vpMatrix::operator*=(), vpColVector::operator+(), vpColVector::operator+=(), vpMatrix::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), vpMatrix::operator-=(), vpColVector::operator/(), vpMatrix::operator/(), vpTranslationVector::operator/=(), vpColVector::operator/=(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpSubMatrix::operator=(), vpTranslationVector::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpColVector::reshape(), vpMatrix::setIdentity(), vpMatrix::stack(), vpColVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::sum(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpColVector::sumSquare(), vpMatrix::sumSquare(), vpTranslationVector::t(), vpPoseVector::t(), vpColVector::t(), vpMatrix::t(), and vpMatrix::transpose().
|
protectedinherited |
Address of the first element of each rows.
Definition at line 78 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpColVector::clear(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpRowVector::init(), vpColVector::init(), vpMatrix::init(), vpRotationMatrix::operator*(), vpForceTwistMatrix::operator*(), operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*=(), vpMatrix::operator*=(), vpMatrix::operator+=(), vpMatrix::operator-=(), vpMatrix::operator/(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubMatrix::operator=(), vpRotationMatrix::operator=(), vpForceTwistMatrix::operator=(), operator=(), vpHomogeneousMatrix::operator=(), vpRowVector::operator=(), vpMatrix::operator=(), vpMatrix::stackColumns(), vpMatrix::sum(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpRowVector::sumSquare(), vpColVector::sumSquare(), vpMatrix::sumSquare(), and vpMatrix::transpose().