|
wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
|
A passive rotation from the coordinate system From to the coordinate system To, which have the same origin: the dimensionless passive linear transformation whose matrix R, which transforms the components v of a vector in From into its components R v in To, is orthogonal with determinant 1, R R^T = I and det(R) = 1. More...
#include <wuzp/trafo/PassiveSpatialRotation.hpp>
Public Types | |
| using | LinearTransformationT |
| The passive linear transformation with the matrix of the rotation, whose transformations the rotation shares. | |
| using | ValueT = ValueT_ |
| using | ValuesT = typename LinearTransformationT::ValuesT |
| using | UnitsT = typename LinearTransformationT::UnitsT |
| using | QuantitiesT = typename LinearTransformationT::QuantitiesT |
| using | QuaternionT = typename ParameterizationsT::QuaternionT |
| A unit quaternion (w, x, y, z) of the matrix (see ActiveSpatialRotation::QuaternionT), e.g. q_AB of the rotation from B to A. | |
| using | QuaternionDerivativeT = typename ParameterizationsT::QuaternionDerivativeT |
| The derivative dq/dt of a quaternion with respect to time, in the unit of an angular velocity. | |
| using | AngleT = typename ParameterizationsT::AngleT |
| An angle, e.g. of a rotation around its axis, or between two rotations. | |
| using | AxisT = typename ParameterizationsT::template AxisT<ToT_> |
| The unit axis of a rotation, expressed in To. The rotation leaves its axis unchanged, so its components in From are the same. | |
| using | AngleAxisT = std::pair<AngleT, AxisT> |
| The angle and the unit axis of a rotation. | |
| using | RotationVectorT = typename ParameterizationsT::template RotationVectorT<ToT_> |
| A rotation vector angle * axis, expressed in To, e.g. the logarithm of a rotation or an increment of boxPlus(). | |
| using | EulerAnglesT = typename ParameterizationsT::EulerAnglesT |
| Three Euler angles, in the order of the axes in their name, e.g. (yaw, pitch, roll) for ZYX. | |
| using | EulerAnglesDerivativeT = typename ParameterizationsT::EulerAnglesDerivativeT |
| The derivatives of three Euler angles with respect to time. | |
| using | AngularVelocityT = typename ParameterizationsT::template AngularVelocityT<ToT_> |
| The angular velocity of From relative to To, expressed in To. It may also be expressed in From. | |
| using | MatrixDerivativeT = typename ParameterizationsT::MatrixDerivativeT |
| The derivative dR/dt of the matrix of a rotation with respect to time. | |
| Public Types inherited from wuzp::PassiveTransformation< PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >, FromT_, ToT_ > | |
| using | From |
| using | To |
Public Member Functions | |
| PassiveSpatialRotation () | |
| The identity: From and To have the same axes. | |
| template<typename... Args> requires (sizeof...(Args) > 0 && !CopiesOrMoves<PassiveSpatialRotation, Args...>) | |
| PassiveSpatialRotation (Args &&... args) | |
| The rotation whose matrix is constructed from the arguments, e.g. its elements row by row, or its quantities. | |
| const QuantitiesT & | getQuantities () const |
| The matrix R, which transforms the components v of a vector in From into its components R v in To. | |
| auto | inverse () const |
| The inverse rotation, from To to From, whose matrix is the transpose R^T = R^-1: it needs no matrix inverse. | |
| bool | isValid (const ValueT tolerance=ValidityTolerance< ValueT >::value()) const |
| Whether the matrix is a rotation: max_ij |(R R^T - I)_ij| <= tolerance, and det(R) > 0 (see internal::isRotation()). | |
| template<template< typename, int, int > typename ValuesOtherT_, typename ValueOtherT_, typename FromOtherT_, typename ToOtherT_, int DimensionOtherV_> | |
| bool | isApprox (const PassiveSpatialRotation< ValuesOtherT_, ValueOtherT_, FromOtherT_, ToOtherT_, DimensionOtherV_ > &other, const ValueT precision=Precision< ValueT >::value()) const |
| Whether both rotations, which must transform between the same coordinate systems, are approximately equal: their matrices are compared like the components of tensors (see Tensor::isApprox()). | |
| QuaternionT | toQuaternion () const |
| The unique unit quaternion of the matrix (see ActiveSpatialRotation::toQuaternion()). | |
| AngleAxisT | toAngleAxis () const |
| The angle in [0, pi] and the unit axis of the matrix (see ActiveSpatialRotation::toAngleAxis()). | |
| RotationVectorT | toRotationVector () const |
| The logarithmic map Log(R) of the matrix, the rotation vector of the rotation, with an angle in [0, pi]. | |
| EulerAnglesT | toEulerAnglesZyx () const |
| The Euler angles ZYX of the matrix (see ActiveSpatialRotation::toEulerAnglesZyx()). | |
| EulerAnglesT | toEulerAnglesXyz () const |
| The Euler angles XYZ of the matrix (see ActiveSpatialRotation::toEulerAnglesXyz()). | |
| template<AnyTensor RotationVectorOtherT_> | |
| PassiveSpatialRotation | boxPlus (const RotationVectorOtherT_ &rotationVector) const |
| The rotation whose matrix R is rotated further by the rotation vector v: Exp(v) R for v in To, which equals R Exp(v) for v in From, so that the same rotation vector gives the same result in both, like kindr's boxPlus() of C_TF with v in To. | |
| template<typename CoordinateSystemT_ = ToT_, typename FromOtherT_, typename ToOtherT_> | |
| auto | boxMinus (const PassiveSpatialRotation< ValuesT_, ValueT_, FromOtherT_, ToOtherT_, DimensionV_ > &other) const |
| The rotation vector Log(R S^T) of the matrices R of this rotation and S of the other one, expressed in To or, with the template argument From, in From: other.boxPlus(boxMinus(other)) is this rotation, like kindr's boxMinus() of C_TF in To. | |
| template<typename FromOtherT_, typename ToOtherT_> | |
| AngleT | angularDistance (const PassiveSpatialRotation< ValuesT_, ValueT_, FromOtherT_, ToOtherT_, DimensionV_ > &other) const |
| The angle in [0, pi] of the rotation between this and the other rotation, the norm of boxMinus(other), like kindr's getDisparityAngle(). | |
| template<AnyTensor AngularVelocityOtherT_> | |
| MatrixDerivativeT | matrixDerivative (const AngularVelocityOtherT_ &angularVelocity) const |
| The derivative dR/dt = [w]x R of the matrix for the angular velocity w in To, which equals R [w]x for w in From, like kindr's RotationMatrixDiff. | |
| template<typename CoordinateSystemT_ = ToT_, AnyQuantities MatrixDerivativeOtherT_> | |
| auto | angularVelocityFromMatrixDerivative (const MatrixDerivativeOtherT_ &derivative) const |
| The angular velocity of the derivative dR/dt of the matrix, [w]x = dR/dt R^T in To, expressed in To or, with the template argument From, in From, the inverse of matrixDerivative(). | |
| Public Member Functions inherited from wuzp::PassiveTransformation< PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >, FromT_, ToT_ > | |
| auto | transform (ObjectT_ &&object) const |
| The object in To. | |
Static Public Member Functions | |
| template<typename... Args> | |
| static PassiveSpatialRotation | makeUnchecked (Args &&... args) |
| The rotation whose matrix is constructed from the arguments, without checking it, like Drake's RotationMatrix::MakeUnchecked(): the caller guarantees that the matrix is a rotation, e.g. a product of rotations. | |
| template<typename... Args> | |
| static PassiveSpatialRotation | projectToRotation (Args &&... args) |
| The rotation nearest to the matrix constructed from the arguments, e.g. to a rotation whose rounding errors accumulated, by the Newton-Schulz iteration (see internal::projectToRotation()). | |
| template<AnyQuantities QuaternionOtherT_> | |
| static PassiveSpatialRotation | fromQuaternion (const QuaternionOtherT_ &quaternion) |
| The rotation of the unit quaternion q, whose matrix is that of ActiveSpatialRotation::fromQuaternion(): e.g. the quaternion q_AB of the passive rotation from B to A gives R_AB, like Drake's RotationMatrix(q_AB) and kindr's C_AB. | |
| template<AnyQuantities AngleOtherT_, AnyTensor AxisOtherT_> | |
| static PassiveSpatialRotation | fromAngleAxis (const AngleOtherT_ &angle, const AxisOtherT_ &axis) |
| The rotation whose matrix rotates by an angle around a unit axis, right-handed, which is expressed in To or in From, where its components are the same. | |
| template<AnyTensor RotationVectorOtherT_> | |
| static PassiveSpatialRotation | fromRotationVector (const RotationVectorOtherT_ &rotationVector) |
| The rotation whose matrix is the exponential map Exp(v) of the rotation vector v, which is expressed in To or in From, where its components are the same, since it is along the axis of the rotation. | |
| template<AnyQuantities EulerAnglesOtherT_> | |
| static PassiveSpatialRotation | fromEulerAnglesZyx (const EulerAnglesOtherT_ &angles) |
| The rotation whose matrix has the Euler angles ZYX (yaw, pitch, roll), R = R_z(yaw) R_y(pitch) R_x(roll) (see ActiveSpatialRotation::fromEulerAnglesZyx()), like kindr's EulerAnglesZyx. | |
| template<AnyQuantities EulerAnglesOtherT_> | |
| static PassiveSpatialRotation | fromEulerAnglesXyz (const EulerAnglesOtherT_ &angles) |
| The rotation whose matrix has the Euler angles XYZ (a0, a1, a2), R = R_x(a0) R_y(a1) R_z(a2) (see ActiveSpatialRotation::fromEulerAnglesXyz()), like kindr's EulerAnglesXyz. | |
| template<AnyTensor FromVectorT_, AnyTensor ToVectorT_> | |
| static PassiveSpatialRotation | fromTwoVectors (const FromVectorT_ &from, const ToVectorT_ &to) |
| The rotation with the smallest angle under which the direction of the vector from, expressed in From, has the direction of the vector to, expressed in To: transform(from) has the direction of to, e.g. the gravity measured by an accelerometer in From and the gravity in To. | |
| template<AnyTensor RotationVectorOtherT_> | |
| static auto | exponentialMapJacobian (const RotationVectorOtherT_ &rotationVector) |
| The Jacobian J of the exponential map at the rotation vector v, a linear map in the coordinate system of v, To or From, in which it maps the derivative of v to the angular velocity, w = J dv/dt, and in which J dv is the increment of boxPlus(), Exp(v + dv) = Exp(v).boxPlus(J dv) to first order. | |
| template<AnyQuantities QuaternionOtherT_, AnyTensor AngularVelocityOtherT_> | |
| static QuaternionDerivativeT | quaternionDerivative (const QuaternionOtherT_ &quaternion, const AngularVelocityOtherT_ &angularVelocity) |
| The derivative dq/dt = (0, w) q / 2 of the unit quaternion q for the angular velocity w in To, which equals q (0, w) / 2 for w in From, like kindr's RotationQuaternionDiff of a GlobalAngularVelocity or a LocalAngularVelocity. | |
| template<typename CoordinateSystemT_ = ToT_, AnyQuantities QuaternionOtherT_, AnyQuantities QuaternionDerivativeOtherT_> | |
| static auto | angularVelocityFromQuaternionDerivative (const QuaternionOtherT_ &quaternion, const QuaternionDerivativeOtherT_ &derivative) |
| The angular velocity of the derivative dq/dt of the unit quaternion q, expressed in To or, with the template argument From, in From, the inverse of quaternionDerivative(). | |
| template<AnyQuantities EulerAnglesOtherT_, AnyTensor AngularVelocityOtherT_> | |
| static EulerAnglesDerivativeT | eulerAnglesZyxDerivative (const EulerAnglesOtherT_ &angles, const AngularVelocityOtherT_ &angularVelocity) |
| The derivatives of the Euler angles ZYX of the matrix for the angular velocity w, in To or in From, like kindr's EulerAnglesZyxDiff (see ActiveSpatialRotation::eulerAnglesZyxDerivative()). | |
| template<typename CoordinateSystemT_ = ToT_, AnyQuantities EulerAnglesOtherT_, AnyQuantities EulerAnglesDerivativeOtherT_> | |
| static auto | angularVelocityFromEulerAnglesZyxDerivative (const EulerAnglesOtherT_ &angles, const EulerAnglesDerivativeOtherT_ &derivative) |
| The angular velocity of the derivatives of the Euler angles ZYX of the matrix, expressed in To or, with the template argument From, in From, the inverse of eulerAnglesZyxDerivative(). | |
| template<AnyQuantities EulerAnglesOtherT_, AnyTensor AngularVelocityOtherT_> | |
| static EulerAnglesDerivativeT | eulerAnglesXyzDerivative (const EulerAnglesOtherT_ &angles, const AngularVelocityOtherT_ &angularVelocity) |
| The derivatives of the Euler angles XYZ of the matrix for the angular velocity w, in To or in From, like kindr's EulerAnglesXyzDiff (see ActiveSpatialRotation::eulerAnglesXyzDerivative()). | |
| template<typename CoordinateSystemT_ = ToT_, AnyQuantities EulerAnglesOtherT_, AnyQuantities EulerAnglesDerivativeOtherT_> | |
| static auto | angularVelocityFromEulerAnglesXyzDerivative (const EulerAnglesOtherT_ &angles, const EulerAnglesDerivativeOtherT_ &derivative) |
| The angular velocity of the derivatives of the Euler angles XYZ of the matrix, expressed in To or, with the template argument From, in From, the inverse of eulerAnglesXyzDerivative(). | |
A passive rotation from the coordinate system From to the coordinate system To, which have the same origin: the dimensionless passive linear transformation whose matrix R, which transforms the components v of a vector in From into its components R v in To, is orthogonal with determinant 1, R R^T = I and det(R) = 1.
Orthogonality is defined by the Euclidean metric, so From and To must be Euclidean (EuclideanCoordinateSystem, see Metric); between Minkowski coordinate systems, a spatial rotation is a LorentzTransformation. Its rows are the basis vectors of To, expressed in From. It transforms the same tensors as the passive linear transformation with its matrix (see PassiveLinearTransformation). It composes with rotations into rotations, with linear transformations into linear transformations, with Jacobians into Jacobians, and with translations and proper rigid transformations into proper rigid transformations (see CompositionTraits). Its inverse, from To to From, is its transpose, which every value matrix backend provides, also for integer matrices, and with which it transforms covectors and tensors with lower indices. In debug builds, i.e. if NDEBUG is not defined, the constructors check that the matrix is a rotation (see isValid()), like Drake's RotationMatrix (https://drake.mit.edu/doxygen_cxx/classdrake_1_1math_1_1_rotation_matrix.html): they throw std::invalid_argument if it is not, e.g. for a shear, a scaling or a reflection. Release builds do not check. makeUnchecked() skips the check, e.g. in hot paths, and projectToRotation() computes the rotation nearest to a matrix, e.g. to one whose rounding errors accumulated. In three dimensions, a rotation converts from and to unit quaternions, angle-axis, rotation vectors and Euler angles ZYX and XYZ, has the manifold operations boxPlus(), boxMinus() and angularDistance(), and maps between its angular velocity and the time derivatives of its matrix, its quaternion and its Euler angles, like ActiveSpatialRotation. Its parameters describe its matrix R in the convention of robotics, like those of the active rotation with the same matrix: e.g. the quaternion q_AB of the passive rotation from B to A gives R_AB = R(q_AB), the orientation of B relative to A, like Drake's RotationMatrix R_AB (https://drake.mit.edu/doxygen_cxx/group__multibody__notation.html) and kindr's C_AB. Its angular velocity w is that of From relative to To, dR/dt = [w]x R for w expressed in To and R [w]x for w expressed in From, which replaces kindr's global (To) and local (From) angular velocities (see "Parameterizations of rotations" in DESIGN.md and docs/conventions.md). These need floating-point values.
Definition at line 53 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::AngleAxisT = std::pair<AngleT, AxisT> |
The angle and the unit axis of a rotation.
Definition at line 78 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::AngleT = typename ParameterizationsT::AngleT |
An angle, e.g. of a rotation around its axis, or between two rotations.
Definition at line 74 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::AngularVelocityT = typename ParameterizationsT::template AngularVelocityT<ToT_> |
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::AxisT = typename ParameterizationsT::template AxisT<ToT_> |
The unit axis of a rotation, expressed in To. The rotation leaves its axis unchanged, so its components in From are the same.
Definition at line 76 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::EulerAnglesDerivativeT = typename ParameterizationsT::EulerAnglesDerivativeT |
The derivatives of three Euler angles with respect to time.
Definition at line 85 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::EulerAnglesT = typename ParameterizationsT::EulerAnglesT |
Three Euler angles, in the order of the axes in their name, e.g. (yaw, pitch, roll) for ZYX.
They are not a vector, so they have no coordinate system.
Definition at line 83 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::LinearTransformationT |
The passive linear transformation with the matrix of the rotation, whose transformations the rotation shares.
Definition at line 62 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::MatrixDerivativeT = typename ParameterizationsT::MatrixDerivativeT |
The derivative dR/dt of the matrix of a rotation with respect to time.
Definition at line 89 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::QuantitiesT = typename LinearTransformationT::QuantitiesT |
Definition at line 67 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::QuaternionDerivativeT = typename ParameterizationsT::QuaternionDerivativeT |
The derivative dq/dt of a quaternion with respect to time, in the unit of an angular velocity.
Definition at line 72 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::QuaternionT = typename ParameterizationsT::QuaternionT |
A unit quaternion (w, x, y, z) of the matrix (see ActiveSpatialRotation::QuaternionT), e.g. q_AB of the rotation from B to A.
Definition at line 70 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::RotationVectorT = typename ParameterizationsT::template RotationVectorT<ToT_> |
A rotation vector angle * axis, expressed in To, e.g. the logarithm of a rotation or an increment of boxPlus().
Definition at line 80 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::UnitsT = typename LinearTransformationT::UnitsT |
Definition at line 66 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::ValuesT = typename LinearTransformationT::ValuesT |
Definition at line 65 of file PassiveSpatialRotation.hpp.
| using wuzp::PassiveSpatialRotation< ValuesT_, ValueT_, FromT_, ToT_, DimensionV_ >::ValueT = ValueT_ |
Definition at line 64 of file PassiveSpatialRotation.hpp.
|
inline |
The identity: From and To have the same axes.
Definition at line 92 of file PassiveSpatialRotation.hpp.
|
inlineexplicit |
The rotation whose matrix is constructed from the arguments, e.g. its elements row by row, or its quantities.
Copies and moves are left to the implicit constructors, see CopiesOrMoves.
| std::invalid_argument | In debug builds, if the matrix is not a rotation (see isValid()). |
Definition at line 99 of file PassiveSpatialRotation.hpp.
|
inline |
The angle in [0, pi] of the rotation between this and the other rotation, the norm of boxMinus(other), like kindr's getDisparityAngle().
Definition at line 265 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The angular velocity of the derivatives of the Euler angles XYZ of the matrix, expressed in To or, with the template argument From, in From, the inverse of eulerAnglesXyzDerivative().
Definition at line 368 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The angular velocity of the derivatives of the Euler angles ZYX of the matrix, expressed in To or, with the template argument From, in From, the inverse of eulerAnglesZyxDerivative().
Definition at line 346 of file PassiveSpatialRotation.hpp.
|
inline |
The angular velocity of the derivative dR/dt of the matrix, [w]x = dR/dt R^T in To, expressed in To or, with the template argument From, in From, the inverse of matrixDerivative().
Definition at line 305 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The angular velocity of the derivative dq/dt of the unit quaternion q, expressed in To or, with the template argument From, in From, the inverse of quaternionDerivative().
Definition at line 325 of file PassiveSpatialRotation.hpp.
|
inline |
The rotation vector Log(R S^T) of the matrices R of this rotation and S of the other one, expressed in To or, with the template argument From, in From: other.boxPlus(boxMinus(other)) is this rotation, like kindr's boxMinus() of C_TF in To.
Definition at line 255 of file PassiveSpatialRotation.hpp.
|
inline |
|
inlinestatic |
The derivatives of the Euler angles XYZ of the matrix for the angular velocity w, in To or in From, like kindr's EulerAnglesXyzDiff (see ActiveSpatialRotation::eulerAnglesXyzDerivative()).
Definition at line 358 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The derivatives of the Euler angles ZYX of the matrix for the angular velocity w, in To or in From, like kindr's EulerAnglesZyxDiff (see ActiveSpatialRotation::eulerAnglesZyxDerivative()).
Definition at line 336 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The Jacobian J of the exponential map at the rotation vector v, a linear map in the coordinate system of v, To or From, in which it maps the derivative of v to the angular velocity, w = J dv/dt, and in which J dv is the increment of boxPlus(), Exp(v + dv) = Exp(v).boxPlus(J dv) to first order.
In To, it is the left Jacobian J_l(v) (see ActiveSpatialRotation::exponentialMapJacobian()), and in From the right Jacobian J_r(v) = J_l(-v) = J_l(v)^T = R^T J_l(v) (SolĂ , Deray and Atchuthan, "A micro Lie theory for state estimation in robotics", https://arxiv.org/abs/1812.01537, eqs. 143 and 145). The components of v are the same in both.
Definition at line 280 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation whose matrix rotates by an angle around a unit axis, right-handed, which is expressed in To or in From, where its components are the same.
| std::invalid_argument | In debug builds, if the axis does not have unit length (see ActiveSpatialRotation::fromAngleAxis()). |
Definition at line 169 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation whose matrix has the Euler angles XYZ (a0, a1, a2), R = R_x(a0) R_y(a1) R_z(a2) (see ActiveSpatialRotation::fromEulerAnglesXyz()), like kindr's EulerAnglesXyz.
Definition at line 215 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation whose matrix has the Euler angles ZYX (yaw, pitch, roll), R = R_z(yaw) R_y(pitch) R_x(roll) (see ActiveSpatialRotation::fromEulerAnglesZyx()), like kindr's EulerAnglesZyx.
Definition at line 201 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation of the unit quaternion q, whose matrix is that of ActiveSpatialRotation::fromQuaternion(): e.g. the quaternion q_AB of the passive rotation from B to A gives R_AB, like Drake's RotationMatrix(q_AB) and kindr's C_AB.
| std::invalid_argument | In debug builds, if the quaternion does not have unit length (see ActiveSpatialRotation::fromQuaternion()). |
Definition at line 151 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation whose matrix is the exponential map Exp(v) of the rotation vector v, which is expressed in To or in From, where its components are the same, since it is along the axis of the rotation.
Definition at line 187 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation with the smallest angle under which the direction of the vector from, expressed in From, has the direction of the vector to, expressed in To: transform(from) has the direction of to, e.g. the gravity measured by an accelerometer in From and the gravity in To.
Its matrix is that of ActiveSpatialRotation::fromTwoVectors(), like kindr's C_TF.setFromVectors(from, to).
| std::invalid_argument | In debug builds, if a vector is zero, so that it has no direction (see isValid()). |
Definition at line 234 of file PassiveSpatialRotation.hpp.
|
inline |
The matrix R, which transforms the components v of a vector in From into its components R v in To.
Definition at line 120 of file PassiveSpatialRotation.hpp.
|
inline |
The inverse rotation, from To to From, whose matrix is the transpose R^T = R^-1: it needs no matrix inverse.
Definition at line 123 of file PassiveSpatialRotation.hpp.
|
inline |
Whether both rotations, which must transform between the same coordinate systems, are approximately equal: their matrices are compared like the components of tensors (see Tensor::isApprox()).
Definition at line 135 of file PassiveSpatialRotation.hpp.
|
inline |
Whether the matrix is a rotation: max_ij |(R R^T - I)_ij| <= tolerance, and det(R) > 0 (see internal::isRotation()).
The constructors check it in debug builds, with the tolerance ValidityTolerance.
Definition at line 127 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation whose matrix is constructed from the arguments, without checking it, like Drake's RotationMatrix::MakeUnchecked(): the caller guarantees that the matrix is a rotation, e.g. a product of rotations.
Definition at line 106 of file PassiveSpatialRotation.hpp.
|
inline |
The derivative dR/dt = [w]x R of the matrix for the angular velocity w in To, which equals R [w]x for w in From, like kindr's RotationMatrixDiff.
Definition at line 296 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The rotation nearest to the matrix constructed from the arguments, e.g. to a rotation whose rounding errors accumulated, by the Newton-Schulz iteration (see internal::projectToRotation()).
| std::invalid_argument | In every build, if the matrix A is not close enough to a rotation, i.e. ||I - A^T A|| is not smaller than 1 in the Frobenius norm, or if its determinant is not positive. |
Definition at line 115 of file PassiveSpatialRotation.hpp.
|
inlinestatic |
The derivative dq/dt = (0, w) q / 2 of the unit quaternion q for the angular velocity w in To, which equals q (0, w) / 2 for w in From, like kindr's RotationQuaternionDiff of a GlobalAngularVelocity or a LocalAngularVelocity.
Definition at line 315 of file PassiveSpatialRotation.hpp.
|
inline |
The angle in [0, pi] and the unit axis of the matrix (see ActiveSpatialRotation::toAngleAxis()).
Definition at line 178 of file PassiveSpatialRotation.hpp.
|
inline |
The Euler angles XYZ of the matrix (see ActiveSpatialRotation::toEulerAnglesXyz()).
Definition at line 221 of file PassiveSpatialRotation.hpp.
|
inline |
The Euler angles ZYX of the matrix (see ActiveSpatialRotation::toEulerAnglesZyx()).
Definition at line 207 of file PassiveSpatialRotation.hpp.
|
inline |
The unique unit quaternion of the matrix (see ActiveSpatialRotation::toQuaternion()).
Definition at line 159 of file PassiveSpatialRotation.hpp.
|
inline |
The logarithmic map Log(R) of the matrix, the rotation vector of the rotation, with an angle in [0, pi].
Definition at line 193 of file PassiveSpatialRotation.hpp.