wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ > Class Template Reference

A passive proper rigid transformation from From to To, which first rotates, then translates: p -> R p + t. More...

#include <wuzp/trafo/PassiveProperRigidTransformationTemplate.hpp>

Inherits wuzp::PassiveTransformation< PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >, FromT_, ToT_ >.

Public Types

using Rotation = RotationT_
using Translation = TranslationT_
using ValueT = typename Rotation::ValueT
Public Types inherited from wuzp::PassiveTransformation< PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >, FromT_, ToT_ >
using From
using To

Public Member Functions

 PassiveProperRigidTransformationTemplate ()=default
 PassiveProperRigidTransformationTemplate (Rotation rotation, Translation translation)
void setRotation (const Rotation &rotation)
const Rotation & getRotation () const
void setTranslation (const Translation &translation)
const Translation & getTranslation () const
auto inverse () const
 The inverse transformation, from To to From, (R^T, -R^T t), which only needs the transpose of the rotation (see internal::invertRigid()).
template<typename FromOtherT_, typename ToOtherT_, typename RotationOtherT_, typename TranslationOtherT_>
bool isApprox (const PassiveProperRigidTransformationTemplate< FromOtherT_, ToOtherT_, RotationOtherT_, TranslationOtherT_ > &other, const ValueT precision=Precision< ValueT >::value()) const
 Whether both transformations, which must transform between the same coordinate systems, are approximately equal: their rotations and their translations are compared with their isApprox().
Public Member Functions inherited from wuzp::PassiveTransformation< PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >, FromT_, ToT_ >
auto transform (ObjectT_ &&object) const
 The object in To.

Detailed Description

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
class wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >

A passive proper rigid transformation from From to To, which first rotates, then translates: p -> R p + t.

From and To must be Euclidean (EuclideanCoordinateSystem), like those of its rotation. The rotation transforms from From to an intermediate coordinate system with the origin of From and the axes of To, the translation from there to To, so the translation t is expressed in To. This is Drake's RigidTransform X_AB = (R_AB, p_AoBo_A) for From = B and To = A (https://drake.mit.edu/doxygen_cxx/classdrake_1_1math_1_1_rigid_transform.html). Featherstone's transform of spatial vectors ^A X_B (http://royfeatherstone.org/spatial/v2/xforms.html), which also moves their point from the origin of B to that of A, is adjoint(X_AB, ...), not transform() (see SpatialVelocity.hpp). The rotation R is a rotation, e.g. a PassiveSpatialRotation, which checks that it is orthogonal with determinant 1 (see PassiveSpatialRotation::isValid()): the inverse, (R^T, -R^T t), relies on it. PassiveProperRigidTransformation is the transformation of a rotation and a spatial translation. Its compositions with rotations are defined in PassiveSpatialRotation.hpp. The translation leaves vectors, covectors and tensors with two upper indices unchanged, so they are only rotated, e.g. a covector w into w R^T and a covariance S into R S R^T, and it rejects the other tensors, e.g. an inertia, which may depend on the origin (see PassiveTranslation). It leaves spatial vectors unchanged too, so X_AB re-expresses e.g. a spatial velocity V_MBp_B in A about the same point, by R_AB, unlike adjoint(), which also moves the point to the origin of A.

Definition at line 54 of file PassiveProperRigidTransformationTemplate.hpp.

Member Typedef Documentation

◆ Rotation

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
using wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::Rotation = RotationT_

Definition at line 57 of file PassiveProperRigidTransformationTemplate.hpp.

◆ Translation

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
using wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::Translation = TranslationT_

Definition at line 58 of file PassiveProperRigidTransformationTemplate.hpp.

◆ ValueT

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
using wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::ValueT = typename Rotation::ValueT

Definition at line 59 of file PassiveProperRigidTransformationTemplate.hpp.

Constructor & Destructor Documentation

◆ PassiveProperRigidTransformationTemplate() [1/2]

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::PassiveProperRigidTransformationTemplate ( )
default

◆ PassiveProperRigidTransformationTemplate() [2/2]

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::PassiveProperRigidTransformationTemplate ( Rotation rotation,
Translation translation )
inline

Definition at line 62 of file PassiveProperRigidTransformationTemplate.hpp.

Member Function Documentation

◆ getRotation()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
const Rotation & wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::getRotation ( ) const
inline

Definition at line 66 of file PassiveProperRigidTransformationTemplate.hpp.

◆ getTranslation()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
const Translation & wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::getTranslation ( ) const
inline

Definition at line 69 of file PassiveProperRigidTransformationTemplate.hpp.

◆ inverse()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
auto wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::inverse ( ) const
inline

The inverse transformation, from To to From, (R^T, -R^T t), which only needs the transpose of the rotation (see internal::invertRigid()).

Its translation -R^T t is the vector from the origin of From to the origin of To, expressed in From, the To of the inverse: not -t, unless R t = t.

Definition at line 76 of file PassiveProperRigidTransformationTemplate.hpp.

◆ isApprox()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
template<typename FromOtherT_, typename ToOtherT_, typename RotationOtherT_, typename TranslationOtherT_>
bool wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::isApprox ( const PassiveProperRigidTransformationTemplate< FromOtherT_, ToOtherT_, RotationOtherT_, TranslationOtherT_ > & other,
const ValueT precision = Precision<ValueT>::value() ) const
inline

Whether both transformations, which must transform between the same coordinate systems, are approximately equal: their rotations and their translations are compared with their isApprox().

Definition at line 83 of file PassiveProperRigidTransformationTemplate.hpp.

◆ setRotation()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
void wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::setRotation ( const Rotation & rotation)
inline

Definition at line 65 of file PassiveProperRigidTransformationTemplate.hpp.

◆ setTranslation()

template<EuclideanCoordinateSystem FromT_, EuclideanCoordinateSystem ToT_, AnyRotation RotationT_, typename TranslationT_>
void wuzp::PassiveProperRigidTransformationTemplate< FromT_, ToT_, RotationT_, TranslationT_ >::setTranslation ( const Translation & translation)
inline

Definition at line 68 of file PassiveProperRigidTransformationTemplate.hpp.


The documentation for this class was generated from the following file: