ViSP
2.8.0
|
#include <vpThetaUVector.h>
Public Member Functions | |
vpThetaUVector () | |
vpThetaUVector (const vpThetaUVector &tu) | |
vpThetaUVector (const vpHomogeneousMatrix &M) | |
vpThetaUVector (const vpRotationMatrix &R) | |
vpThetaUVector (const vpRzyxVector &rzyx) | |
vpThetaUVector (const vpRzyzVector &rzyz) | |
vpThetaUVector (const vpRxyzVector &rxyz) | |
vpThetaUVector (const double tux, const double tuy, const double tuz) | |
vpThetaUVector | buildFrom (const vpHomogeneousMatrix &M) |
vpThetaUVector | buildFrom (const vpRotationMatrix &R) |
vpThetaUVector | buildFrom (const vpRzyxVector &rzyx) |
vpThetaUVector | buildFrom (const vpRzyzVector &zyz) |
vpThetaUVector | buildFrom (const vpRxyzVector &xyz) |
vpThetaUVector & | operator= (const vpThetaUVector &tu) |
vpThetaUVector & | operator= (double x) |
void | extract (double &theta, vpColVector &u) const |
double & | operator[] (unsigned int n) |
const double & | operator[] (unsigned int n) const |
unsigned int | size () const |
vpRowVector | t () const |
Protected Member Functions | |
void | init (const unsigned int size) |
Protected Attributes | |
double * | r |
unsigned int | _size |
Class that consider the case of the parameterization for the rotation.
The representation is one of the minimal representation of a rotation matrix, where is a unit vector representing the rotation axis and is the rotation angle.
From the representation it is possible to build the rotation matrix using the Rodrigues formula:
with the identity matrix of dimension and the skew matrix:
From the implementation point of view, it is nothing more than an array of three floats.
The code below shows first how to initialize a vector, than how to contruct a rotation matrix from a vpThetaUVector and finaly how to extract the theta U angles from the build rotation matrix.
Definition at line 140 of file vpThetaUVector.h.
|
inline |
Definition at line 152 of file vpThetaUVector.h.
vpThetaUVector::vpThetaUVector | ( | const vpThetaUVector & | m | ) |
Copy constructor.
Definition at line 74 of file vpThetaUVector.cpp.
vpThetaUVector::vpThetaUVector | ( | const vpHomogeneousMatrix & | M | ) |
Initialize a vector from an homogeneous matrix.
Definition at line 82 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector::vpThetaUVector | ( | const vpRotationMatrix & | R | ) |
Initialize a vector from a rotation matrix.
Definition at line 89 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector::vpThetaUVector | ( | const vpRzyxVector & | rzyx | ) |
Initialize a vector from an Euler z-y-x representation vector.
Definition at line 98 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector::vpThetaUVector | ( | const vpRzyzVector & | rzyz | ) |
Initialize a vector from an Euler z-y-z representation vector.
Definition at line 106 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector::vpThetaUVector | ( | const vpRxyzVector & | rxyz | ) |
Initialize a vector from an Euler x-y-z representation vector.
Definition at line 114 of file vpThetaUVector.cpp.
References buildFrom().
|
inline |
Build a vector from 3 angles in radian.
Definition at line 170 of file vpThetaUVector.h.
vpThetaUVector vpThetaUVector::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Converts an homogeneous matrix into a vector.
Definition at line 123 of file vpThetaUVector.cpp.
References vpHomogeneousMatrix::extract().
Referenced by vpPoseVector::buildFrom(), buildFrom(), vpHomogeneousMatrix::extract(), vpRobotAfma6::getVelocity(), vpRobotViper850::getVelocity(), vpRobotViper650::getVelocity(), vpExponentialMap::inverse(), vpSimulatorAfma6::setPosition(), and vpThetaUVector().
vpThetaUVector vpThetaUVector::buildFrom | ( | const vpRotationMatrix & | R | ) |
Converts a rotation matrix into a vector.
Definition at line 137 of file vpThetaUVector.cpp.
References vpRotationVector::r, and vpMath::sinc().
vpThetaUVector vpThetaUVector::buildFrom | ( | const vpRzyxVector & | rzyx | ) |
Build a vector from an Euler z-y-x representation vector.
Definition at line 242 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector vpThetaUVector::buildFrom | ( | const vpRzyzVector & | rzyz | ) |
Build a vector from an Euler z-y-z representation vector.
Definition at line 254 of file vpThetaUVector.cpp.
References buildFrom().
vpThetaUVector vpThetaUVector::buildFrom | ( | const vpRxyzVector & | rxyz | ) |
Build a vector from an Euler x-y-z representation vector.
Definition at line 266 of file vpThetaUVector.cpp.
References buildFrom().
void vpThetaUVector::extract | ( | double & | theta, |
vpColVector & | u | ||
) | const |
Extract the rotation angle and the unit vector from the representation.
theta | : Rotation angle . |
u | : Unit vector representing the rotation axis. |
Definition at line 315 of file vpThetaUVector.cpp.
References vpRotationVector::r, and vpColVector::resize().
Referenced by vpQuaternionVector::buildFrom().
|
protectedinherited |
Definition at line 113 of file vpRotationVector.cpp.
References vpRotationVector::_size, vpRotationVector::r, and vpRotationVector::size().
vpThetaUVector & vpThetaUVector::operator= | ( | const vpThetaUVector & | m | ) |
Affectation of two vector.
Definition at line 61 of file vpThetaUVector.cpp.
References vpRotationVector::r.
vpThetaUVector & vpThetaUVector::operator= | ( | double | v | ) |
Initialize each element of the vector to the same angle value v.
v | : Angle value to set for each element of the vector. |
Definition at line 295 of file vpThetaUVector.cpp.
References vpRotationVector::r.
|
inlineinherited |
Operator that allows to set the value of an element of the rotation vector: r[i] = value
Definition at line 120 of file vpRotationVector.h.
|
inlineinherited |
Operator that allows to get the value of an element of the rotation vector: value = r[i]
Definition at line 125 of file vpRotationVector.h.
|
inherited |
Returns the size of the rotation vector
Size of the rotation vector: number of double values describing the rotation. Common sizes are 4 for a quaternion and 3 for angle-based rotation vectors.
Definition at line 71 of file vpRotationVector.cpp.
References vpRotationVector::_size.
Referenced by vpRotationVector::init(), vpQuaternionVector::operator=(), and vpQuaternionVector::vpQuaternionVector().
|
inherited |
Return the transpose of the rotation vector.
Definition at line 57 of file vpRotationVector.cpp.
References vpRotationVector::_size, and vpRotationVector::r.
|
protectedinherited |
Definition at line 100 of file vpRotationVector.h.
Referenced by vpRotationVector::init(), vpRotationVector::size(), vpRotationVector::t(), and vpColVector::vpColVector().
|
protectedinherited |
Definition at line 99 of file vpRotationVector.h.
Referenced by buildFrom(), vpRzyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRxyzVector::buildFrom(), extract(), vpRotationVector::init(), vpQuaternionVector::operator=(), vpRzyzVector::operator=(), vpRzyxVector::operator=(), vpRxyzVector::operator=(), operator=(), vpQuaternionVector::set(), vpRotationVector::t(), vpColVector::vpColVector(), vpQuaternionVector::vpQuaternionVector(), vpRxyzVector::vpRxyzVector(), vpRzyxVector::vpRzyxVector(), vpRzyzVector::vpRzyzVector(), and vpRotationVector::~vpRotationVector().