Visual Servoing Platform
version 3.0.1
|
#include <visp3/core/vpForceTwistMatrix.h>
Public Member Functions | |
vpForceTwistMatrix () | |
vpForceTwistMatrix (const vpForceTwistMatrix &F) | |
vpForceTwistMatrix (const vpHomogeneousMatrix &M) | |
vpForceTwistMatrix (const vpTranslationVector &t, const vpThetaUVector &thetau) | |
vpForceTwistMatrix (const vpTranslationVector &t, const vpRotationMatrix &R) | |
vpForceTwistMatrix (const double tx, const double ty, const double tz, const double tux, const double tuy, const double tuz) | |
virtual | ~vpForceTwistMatrix () |
vpForceTwistMatrix | buildFrom (const vpTranslationVector &t, const vpRotationMatrix &R) |
vpForceTwistMatrix | buildFrom (const vpTranslationVector &t, const vpThetaUVector &thetau) |
vpForceTwistMatrix | buildFrom (const vpHomogeneousMatrix &M) |
void | eye () |
vpForceTwistMatrix | operator* (const vpForceTwistMatrix &F) const |
vpMatrix | operator* (const vpMatrix &M) const |
vpColVector | operator* (const vpColVector &H) const |
vpForceTwistMatrix & | operator= (const vpForceTwistMatrix &H) |
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 |
Related Functions | |
(Note that these are not member functions.) | |
enum | vpGEMMmethod |
Implementation of a force/torque twist matrix and operations on such kind of matrices.
Class that consider the particular case of twist transformation matrix that allows to transform a force/troque vector from one frame to an other.
The vpForceTwistMatrix class is derived from vpArray2D<double>.
The twist transformation matrix that allows to transform the force/torque vector expressed at frame into the frame is a 6 by 6 matrix defined as
is a rotation matrix and is a translation vector.
The code belows shows for example how to convert a force/torque skew from probe frame to a sensor frame.
Definition at line 102 of file vpForceTwistMatrix.h.
vpForceTwistMatrix::vpForceTwistMatrix | ( | ) |
Initialize a force/torque twist transformation matrix to identity.
Definition at line 93 of file vpForceTwistMatrix.cpp.
References eye().
vpForceTwistMatrix::vpForceTwistMatrix | ( | const vpForceTwistMatrix & | F | ) |
Initialize a force/torque twist transformation matrix from another force/torque twist matrix.
F | : Force/torque twist matrix used as initializer. |
Definition at line 106 of file vpForceTwistMatrix.cpp.
vpForceTwistMatrix::vpForceTwistMatrix | ( | const vpHomogeneousMatrix & | M | ) |
Initialize a force/torque twist transformation matrix from an homogeneous matrix. Given the homogeneous transformation
the force/torque twist matrix is given by :
M | : Homogeneous matrix used to initialize the twist transformation matrix. |
Definition at line 136 of file vpForceTwistMatrix.cpp.
References buildFrom().
vpForceTwistMatrix::vpForceTwistMatrix | ( | const vpTranslationVector & | t, |
const vpThetaUVector & | thetau | ||
) |
Initialize a force/torque twist transformation matrix from a translation vector t and a rotation vector with parametrization.
t | : Translation vector. |
thetau | : rotation vector. |
Definition at line 152 of file vpForceTwistMatrix.cpp.
References buildFrom().
vpForceTwistMatrix::vpForceTwistMatrix | ( | const vpTranslationVector & | t, |
const vpRotationMatrix & | R | ||
) |
Initialize a force/torque twist transformation matrix from a translation vector t and a rotation matrix R.
t | : Translation vector. |
R | : Rotation matrix. |
Definition at line 169 of file vpForceTwistMatrix.cpp.
References buildFrom().
vpForceTwistMatrix::vpForceTwistMatrix | ( | const double | tx, |
const double | ty, | ||
const double | tz, | ||
const double | tux, | ||
const double | tuy, | ||
const double | tuz | ||
) |
Initialize a force/torque 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 185 of file vpForceTwistMatrix.cpp.
References buildFrom().
|
inlinevirtual |
Destructor.
Definition at line 121 of file vpForceTwistMatrix.h.
vpForceTwistMatrix vpForceTwistMatrix::buildFrom | ( | const vpTranslationVector & | t, |
const vpRotationMatrix & | R | ||
) |
Build a force/torque twist transformation matrix from a translation vector t and a rotation matrix R.
t | : Translation vector. |
R | : Rotation matrix. |
Definition at line 337 of file vpForceTwistMatrix.cpp.
References vpTranslationVector::skew().
Referenced by buildFrom(), and vpForceTwistMatrix().
vpForceTwistMatrix vpForceTwistMatrix::buildFrom | ( | const vpTranslationVector & | tv, |
const vpThetaUVector & | thetau | ||
) |
Initialize a force/torque twist transformation matrix from a translation vector t and a rotation vector with parametrization.
tv | : Translation vector. |
thetau | : rotation vector. |
Definition at line 364 of file vpForceTwistMatrix.cpp.
References vpRotationMatrix::buildFrom(), and buildFrom().
vpForceTwistMatrix vpForceTwistMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Initialize a force/torque twist transformation matrix from an homogeneous matrix with
M | : Homogeneous matrix used to initialize the force/torque twist transformation matrix. |
Definition at line 385 of file vpForceTwistMatrix.cpp.
References buildFrom(), and vpHomogeneousMatrix::extract().
void vpForceTwistMatrix::eye | ( | ) |
Initialize the force/torque 6 by 6 twist matrix to identity.
Definition at line 78 of file vpForceTwistMatrix.cpp.
Referenced by setIdentity(), and vpForceTwistMatrix().
|
inlineinherited |
Return the number of columns of the 2D array.
Definition at line 154 of file vpArray2D.h.
References vpArray2D< Type >::colNum.
Referenced by vpRowVector::csvPrint(), vpMatrix::csvPrint(), vpRotationMatrix::getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::getRow(), vpMatrix::inverseByQRLapack(), vpMatrix::kernel(), vpRowVector::maplePrint(), vpMatrix::maplePrint(), vpRowVector::operator*(), vpRowVector::operator+(), vpRowVector::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), print(), vpVelocityTwistMatrix::print(), vpRowVector::print(), vpMatrix::print(), vpMatrix::pseudoInverse(), vpMatrix::row(), 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::column(), vpColVector::cppPrint(), vpMatrix::cppPrint(), vpColVector::csvPrint(), vpMatrix::csvPrint(), vpRotationMatrix::getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::getRow(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByQRLapack(), vpMatrix::kernel(), vpColVector::maplePrint(), vpMatrix::maplePrint(), vpColVector::matlabPrint(), vpMatrix::matlabPrint(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), print(), vpVelocityTwistMatrix::print(), vpPoseVector::print(), vpColVector::print(), vpMatrix::print(), and vpMatrix::pseudoInverse().
|
inline |
Definition at line 165 of file vpForceTwistMatrix.h.
|
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 417 of file vpArray2D.h.
References vpArray2D< Type >::resize().
vpForceTwistMatrix vpForceTwistMatrix::operator* | ( | const vpForceTwistMatrix & | F | ) | const |
Operator that allows to multiply a skew transformation matrix by an other skew transformation matrix.
Definition at line 213 of file vpForceTwistMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpArray2D< Type >::rowPtrs.
Operator that allows to multiply a skew transformation matrix by a matrix.
vpException::dimensionError | If M is not a 6 rows dimension matrix. |
Definition at line 235 of file vpForceTwistMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< double >::rowPtrs.
vpColVector vpForceTwistMatrix::operator* | ( | const vpColVector & | H | ) | const |
Operator that allows to multiply a skew transformation matrix by a column vector.
H | : Force/torque skew vector . |
For example, this operator can be used to convert a force/torque skew from sensor frame into the probe frame :
The example below shows how to handle that transformation.
vpException::dimensionError | If is not a 6 dimension vector. |
Definition at line 304 of file vpForceTwistMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getRows(), and vpArray2D< double >::rowPtrs.
vpForceTwistMatrix & vpForceTwistMatrix::operator= | ( | const vpForceTwistMatrix & | M | ) |
Copy operator.
M | : Force/torque twist matrix to copy. |
Definition at line 62 of file vpForceTwistMatrix.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.
References vpArray2D< Type >::rowPtrs.
|
inlineinherited |
Get element using x = A[i][j].
Definition at line 261 of file vpArray2D.h.
References vpArray2D< Type >::rowPtrs.
int vpForceTwistMatrix::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 416 of file vpForceTwistMatrix.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 147 of file vpForceTwistMatrix.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 499 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 588 of file vpArray2D.h.
References vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
void vpForceTwistMatrix::setIdentity | ( | ) |
Set the twist transformation matrix to identity.
Definition at line 510 of file vpForceTwistMatrix.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 156 of file vpArray2D.h.
References vpArray2D< Type >::colNum, and 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 :
|
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(), vpRowVector::sum(), 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(), vpRzyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRxyzVector::buildFrom(), vpThetaUVector::buildFrom(), vpSubColVector::checkParentStatus(), vpSubRowVector::checkParentStatus(), vpSubMatrix::checkParentStatus(), vpColVector::clear(), vpHomogeneousMatrix::convert(), vpTranslationVector::euclideanNorm(), vpRowVector::euclideanNorm(), vpMatrix::euclideanNorm(), vpMatrix::expm(), vpThetaUVector::extract(), vpThetaUVector::getTheta(), vpThetaUVector::getU(), 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=(), vpQuaternionVector::operator=(), vpTranslationVector::operator=(), vpRowVector::operator=(), vpRzyzVector::operator=(), vpRzyxVector::operator=(), vpRxyzVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpThetaUVector::operator=(), vpColVector::operator[](), vpRowVector::reshape(), vpColVector::reshape(), vpQuaternionVector::set(), vpMatrix::stackRows(), vpColVector::sum(), vpColVector::sumSquare(), vpRotationVector::t(), vpTranslationVector::t(), vpPoseVector::t(), vpRowVector::t(), vpColVector::t(), vpQuaternionVector::vpQuaternionVector(), vpRxyzVector::vpRxyzVector(), vpRzyxVector::vpRzyxVector(), vpRzyzVector::vpRzyzVector(), vpThetaUVector::vpThetaUVector(), 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(), 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(), vpColVector::sum(), 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*(), operator*(), vpVelocityTwistMatrix::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=(), operator=(), vpVelocityTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpRowVector::operator=(), vpMatrix::operator=(), vpMatrix::stackColumns(), vpRowVector::sum(), vpMatrix::sum(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpRowVector::sumSquare(), vpMatrix::sumSquare(), and vpMatrix::transpose().