Namespaces | |
internal | |
Classes | |
struct | indexes |
struct | indexes< quaternion > |
struct | indexes< rotationVector > |
struct | Kinematics |
Class facilitating the manipulation of the kinematics of a frame within another and the associated operations. More... | |
struct | LocalKinematics |
Class facilitating the manipulation of the local kinematics of a frame within another and the associated operations. More... | |
class | Orientation |
Enumerations | |
enum | rotationType { matrix = 0, rotationVector = 1, quaternion = 2, angleaxis = 3 } |
Functions | |
void | integrateKinematics (Vector3 &position, const Vector3 &velocity, double dt) |
void | integrateKinematics (Vector3 &position, Vector3 &velocity, const Vector3 &acceleration, double dt) |
void | integrateKinematics (Matrix3 &orientation, const Vector3 &rotationVelocity, double dt) |
void | integrateKinematics (Matrix3 &orientation, Vector3 &rotationVelocity, const Vector3 &rotationAcceleration, double dt) |
void | integrateKinematics (Quaternion &orientation, const Vector3 &rotationVelocity, double dt) |
void | integrateKinematics (Quaternion &orientation, Vector3 &rotationVelocity, const Vector3 &rotationAcceleration, double dt) |
void | integrateKinematics (Vector3 &position, Vector3 &velocity, const Vector3 &acceleration, Matrix3 &orientation, Vector3 &rotationVelocity, const Vector3 &rotationAcceleration, double dt) |
void | integrateKinematics (Vector3 &position, Vector3 &velocity, const Vector3 &acceleration, Quaternion &orientation, Vector3 &rotationVelocity, const Vector3 &rotationAcceleration, double dt) |
void | integrateKinematics (Vector3 &position, const Vector3 &velocity, Matrix3 &orientation, const Vector3 &rotationVelocity, double dt) |
integrates the postition/orientation given the velocities More... | |
void | integrateKinematics (Vector3 &position, const Vector3 &velocity, Quaternion &orientation, const Vector3 &rotationVelocity, double dt) |
integrates the postition/orientation given the velocities More... | |
Vector | regulateRotationVector (const Vector3 &v) |
AngleAxis | rotationVectorToAngleAxis (const Vector3 &v) |
Transforms the rotation vector into angle axis. More... | |
Matrix3 | rotationVectorToRotationMatrix (const Vector3 &v) |
Transforms the rotation vector into rotation matrix. More... | |
Quaternion | rotationVectorToQuaternion (const Vector3 &v) |
Transforms the rotation vector into quaternion. More... | |
Vector3 | rotationMatrixToRotationVector (const Matrix3 &R) |
Transforms the rotation matrix into rotation vector. More... | |
Vector3 | quaternionToRotationVector (const Quaternion &q) |
Tranbsform a quaternion into rotation vector. More... | |
Vector3 | quaternionToRotationVector (const Vector4 &v) |
Transforms a quaternion into rotation vector. More... | |
double | scalarComponent (const Quaternion &q) |
scalar component of a quaternion More... | |
Vector3 | vectorComponent (const Quaternion &q) |
vector part of the quaternion More... | |
Vector3 | rotationMatrixToRollPitchYaw (const Matrix3 &R, Vector3 &v) |
Vector3 | rotationMatrixToRollPitchYaw (const Matrix3 &R) |
Matrix3 | rollPitchYawToRotationMatrix (double roll, double pitch, double yaw) |
Matrix3 | rollPitchYawToRotationMatrix (const Vector3 &rpy) |
Quaternion | rollPitchYawToQuaternion (double roll, double pitch, double yaw) |
Quaternion | rollPitchYawToQuaternion (const Vector3 &rpy) |
Matrix3 | orthogonalizeRotationMatrix (const Matrix3 &M) |
Projects the Matrix to so(3) More... | |
Matrix3 | skewSymmetric (const Vector3 &v, Matrix3 &R) |
transform a 3d vector into a skew symmetric 3x3 matrix More... | |
Matrix3 | skewSymmetric (const Vector3 &v) |
transform a 3d vector into a skew symmetric 3x3 matrix More... | |
Matrix3 | skewSymmetric2 (const Vector3 &v, Matrix3 &R) |
transform a 3d vector into a squared skew symmetric 3x3 matrix More... | |
Matrix3 | skewSymmetric2 (const Vector3 &v) |
transform a 3d vector into a squared skew symmetric 3x3 matrix More... | |
Vector6 | homogeneousMatrixToVector6 (const Matrix4 &M) |
transforms a homogeneous matrix into 6d vector (position theta mu) More... | |
Matrix4 | vector6ToHomogeneousMatrix (const Vector6 &v) |
transforms a 6d vector (position theta mu) into a homogeneous matrix More... | |
Matrix3 | twoVectorsToRotationMatrix (const Vector3 &v1, const Vector3 Rv1) |
Builds the smallest angle matrix allowing to get from a NORMALIZED vector v1 to its imahe Rv1 This is based on Rodrigues formula. More... | |
bool | isPureYaw (const Matrix3 &R) |
checks if this matrix is a pure yaw matrix or not More... | |
Vector3 | getInvariantHorizontalVector (const Matrix3 &R) |
Gets a vector that remains horizontal with this rotation. This vector is NOT normalized. More... | |
Vector3 | getInvariantOrthogonalVector (const Matrix3 &Rhat, const Vector3 &Rtez) |
Gets a vector \(v\) that is orthogonal to \(e_z\) and such that \(\hat{R}^T e_z\) is orthogonal to the tilt \(R^T e_z\). This vector is NOT normalized. More... | |
Matrix3 | mergeTiltWithYaw (const Vector3 &Rtez, const Matrix3 &R2, const Vector3 &v=Vector3::UnitX()) noexcept(false) |
Merge the roll and pitch from the tilt (R^T e_z) with the yaw from a rotation matrix (minimizes the deviation of the v vector) More... | |
Matrix3 | mergeRoll1Pitch1WithYaw2 (const Matrix3 &R1, const Matrix3 &R2, const Vector3 &v=Vector3::UnitX()) |
Merge the roll and pitch with the yaw from a rotation matrix (minimizes the deviation of the v vector) More... | |
Matrix3 | mergeTiltWithYawAxisAgnostic (const Vector3 &Rtez, const Matrix3 &R2) |
Merge the roll and pitch from the tilt (R^T e_z) with the yaw from a rotation matrix (minimizes the deviation of the v vector) More... | |
Matrix3 | mergeRoll1Pitch1WithYaw2AxisAgnostic (const Matrix3 &R1, const Matrix3 &R2) |
Merge the roll and pitch with the yaw from a rotation matrix with optimal reference vector. More... | |
double | rotationMatrixToAngle (const Matrix3 &rotation, const Vector3 &axis, const Vector3 &v) |
take 3x3 matrix represeting a rotation and gives the angle that vector v turns around the axis with this rotation More... | |
double | rotationMatrixToYaw (const Matrix3 &rotation, const Vector2 &v) |
take 3x3 matrix represeting a rotation and gives the angle that vector v turns around the upward vertical axis with this rotation More... | |
double | rotationMatrixToYaw (const Matrix3 &rotation) |
take 3x3 matrix represeting a rotation and gives the yaw angle from roll pitch yaw representation More... | |
double | rotationMatrixToYawAxisAgnostic (const Matrix3 &rotation) |
take 3x3 matrix represeting a rotation and gives a corresponding angle around upward vertical axis More... | |
Quaternion | zeroRotationQuaternion () |
Get the Identity Quaternion. More... | |
Quaternion | randomRotationQuaternion () |
Get a uniformly random Quaternion. More... | |
double | randomAngle () |
get a randomAngle between -pi and pu More... | |
bool | isRotationMatrix (const Matrix3 &, double precision=2 *cst::epsilon1) |
Checks if it is a rotation matrix (right-hand orthonormal) or not. More... | |
void | fixedPointRotationToTranslation (const Matrix3 &R, const Vector3 &rotationVelocity, const Vector3 &rotationAcceleration, const Vector3 &fixedPoint, Vector3 &outputTranslation, Vector3 &outputLinearVelocity, Vector3 &outputLinearAcceleration) |
transforms a rotation into translation given a constraint of a fixed point More... | |
Vector3 | derivateRotationFD (const Quaternion &q1, const Quaternion &q2, double dt) |
derivates a quaternion using finite difference to get a angular velocity vector More... | |
Vector3 | derivateRotationFD (const Vector3 &o1, const Vector3 &o2, double dt) |
derivates a rotation vector using finite difference to get a angular velocity vector More... | |
Vector6 | derivateHomogeneousMatrixFD (const Matrix4 &m1, const Matrix4 &m2, double dt) |
Vector6 | derivatePoseThetaUFD (const Vector6 &v1, const Vector6 &v2, double dt) |
void | derivateRotationMultiplicative (const Vector3 &deltaR, Matrix3 &dRdR, Matrix3 &dRddeltaR) |
Matrix3 | derivateRtvMultiplicative (const Matrix3 &R, const Vector3 &v) |
IndexedVectorArray | reconstructStateTrajectory (const IndexedVectorArray &positionOrientation, double dt) |
Vector | invertState (const Vector &state) |
Matrix4 | invertHomoMatrix (const Matrix4 &m) |
Variables | |
constexpr double | quatNormTol = 1e-6 |
relative tolereance to the square of quaternion norm. More... | |
|
inline |
|
inline |
|
inline |
derivates a quaternion using finite difference to get a angular velocity vector
|
inline |
derivates a rotation vector using finite difference to get a angular velocity vector
|
inline |
Computes the "multiplicative Jacobian" for Kalman filtering for example orientation is the current orientation dR is the rotation delta between the current orientation and the orientation at the next step. dRdR is the "multiplicative" Jacobian with regard to variations of orientation dRddeltaR is the "multiplicative" Jacobian with regard to variations of deltaR
|
inline |
Computes the "multiplicative Jacobian" for a function R^T.v giving a vector v expressed in a local frame with regard to Rotations of this local frame
|
inline |
transforms a rotation into translation given a constraint of a fixed point
Gets a vector that remains horizontal with this rotation. This vector is NOT normalized.
There is a general version in getInvariantOrthogonalVector(). This can be used to extract yaw angle from a rotation matrix without needing to specify an order in the tils (e.g. roll then pich).
R | the input rotation |
|
inline |
Gets a vector \(v\) that is orthogonal to \(e_z\) and such that \(\hat{R}^T e_z\) is orthogonal to the tilt \(R^T e_z\). This vector is NOT normalized.
This is a generalization of getInvariantHorizontalVector() which corresponds to no tilt \(\hat{R}^T e_z=e_z\). This function is useful to merge the yaw from the rotation matrix with the tilt.
Rhat | the input rotation matrix \(\hat{R}^T\) |
Rtez | the input tilt \(\hat{R}^T e_z\) |
transforms a homogeneous matrix into 6d vector (position theta mu)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
integrates the postition/orientation given the velocities
|
inline |
integrates the postition/orientation given the velocities
|
inline |
|
inline |
integrates the position/orientation and their time derivatives, given the accelerations, and initial velocities and positions. The rotations are expressed by rotation matrix
|
inline |
integrates the position/orientation and their time derivatives, given the accelerations, and initial velocities and positions. The orientations are expressed by quaternions
|
inline |
checks if this matrix is a pure yaw matrix or not
R | the rotation matrix |
|
inline |
Checks if it is a rotation matrix (right-hand orthonormal) or not.
precision | the absolute precision of the test |
|
inline |
Merge the roll and pitch with the yaw from a rotation matrix (minimizes the deviation of the v vector)
R1 | is the first rotation to get the roll and pitch |
R2 | is the second rotation matrix from which the "yaw" needs to be extracted |
v | is the vector to use as reference (for a traditional yaw v is initialized to \(e_x\)) |
|
inline |
Merge the roll and pitch with the yaw from a rotation matrix with optimal reference vector.
R1 | is the first rotation to get the roll and pitch |
R2 | is the second rotation matrix from which the "yaw" needs to be extracted |
v | is the vector to use as reference (for a traditional yaw v is initialized to \(e_x\)) |
|
inlinenoexcept |
Merge the roll and pitch from the tilt (R^T e_z) with the yaw from a rotation matrix (minimizes the deviation of the v vector)
throws exception when the orientation is singlular (likely gimbal lock) to avoid these issues, we recommend to use mergeTiltWithYawAxisAgnostic()
Rtez | the tilt \(R_1^T e_z\) (the local image of \(e_z\) unit vector) |
R2 | is the second rotation matrix from which the "yaw" needs to be extracted |
v | is the vector to use as reference it must be horizontal and normalized (for a traditional yaw v is by deftault \(e_x\)) |
|
inline |
Merge the roll and pitch from the tilt (R^T e_z) with the yaw from a rotation matrix (minimizes the deviation of the v vector)
Rtez | the tilt \(R_1^T e_z\) (the local image of \(e_z\) unit vector) |
R2 | is the second rotation matrix from which the "yaw" needs to be extracted |
v | is the vector to use as reference (for a traditional yaw v is initialized to \(e_x\)) |
Projects the Matrix to so(3)
|
inline |
Tranbsform a quaternion into rotation vector.
Transforms a quaternion into rotation vector.
|
inline |
get a randomAngle between -pi and pu
|
inline |
Get a uniformly random Quaternion.
|
inline |
uses the derivation to reconstruct the velocities and accelerations given trajectories in positions and orientations only
Puts the orientation vector norm between 0 and Pi if it gets close to 2pi
|
inline |
|
inline |
Transform the roll pitch yaw into rotation matrix ( R = Ry*Rp*Rr)
|
inline |
Transform the roll pitch yaw into rotation matrix ( R = Ry*Rp*Rr)
|
inline |
take 3x3 matrix represeting a rotation and gives the angle that vector v turns around the axis with this rotation
rotation | The 3x3 rotation matrix |
axis | the axis of rotation (must be normalized) |
v | the vector that is rotated with the rotation (must be orthogonal to axis and normalized) |
|
inline |
Transforms the rotation matrix into roll pitch yaw (decompose R into Ry*Rp*Rr)
Transforms the rotation matrix into rotation vector.
|
inline |
take 3x3 matrix represeting a rotation and gives the yaw angle from roll pitch yaw representation
rotation | The 3x3 rotation matrix |
|
inline |
take 3x3 matrix represeting a rotation and gives the angle that vector v turns around the upward vertical axis with this rotation
this is a generalization of yaw extraction (yaw is equivalent to v = Matrix3::UnitX(), but it is more efficiant to calll the dedicated rotationMatrixToYaw() without vector parameter).
rotation | The 3x3 rotation matrix |
v | the rotated vector (expressed in the horizontal plane, must be normalized) |
|
inline |
take 3x3 matrix represeting a rotation and gives a corresponding angle around upward vertical axis
This is similar to yaw angle but here we identify a horizontal vector that stays horizontal after rotation. this can be called axis agnostic yaw extraction. and get the angle between them
rotation | The 3x3 rotation matrix |
Transforms the rotation vector into angle axis.
|
inline |
Transforms the rotation vector into quaternion.
Transforms the rotation vector into rotation matrix.
|
inline |
scalar component of a quaternion
transform a 3d vector into a skew symmetric 3x3 matrix
transform a 3d vector into a skew symmetric 3x3 matrix
transform a 3d vector into a squared skew symmetric 3x3 matrix
transform a 3d vector into a squared skew symmetric 3x3 matrix
|
inline |
Builds the smallest angle matrix allowing to get from a NORMALIZED vector v1 to its imahe Rv1 This is based on Rodrigues formula.
v1 | the NORMALIZED vector |
Rv1 | the NORMALIZED image of this vector by the rotation matrix R |
transforms a 6d vector (position theta mu) into a homogeneous matrix
|
inline |
vector part of the quaternion
|
inline |
Get the Identity Quaternion.
|
constexpr |
relative tolereance to the square of quaternion norm.