6 #ifndef __pinocchio_spatial_se3_base_hpp__
7 #define __pinocchio_spatial_se3_base_hpp__
29 template<
class Derived>
32 PINOCCHIO_SE3_TYPEDEF_TPL(Derived);
36 return *
static_cast<Derived *
>(
this);
38 const Derived & derived()
const
40 return *
static_cast<const Derived *
>(
this);
43 Derived & const_cast_derived()
const
45 return *
const_cast<Derived *
>(&derived());
48 ConstAngularRef rotation()
const
50 return derived().rotation_impl();
52 ConstLinearRef translation()
const
54 return derived().translation_impl();
58 return derived().rotation_impl();
60 LinearRef translation()
62 return derived().translation_impl();
64 void rotation(
const AngularType & R)
66 derived().rotation_impl(R);
68 void translation(
const LinearType & t)
70 derived().translation_impl(t);
73 HomogeneousMatrixType toHomogeneousMatrix()
const
75 return derived().toHomogeneousMatrix_impl();
77 operator HomogeneousMatrixType()
const
79 return toHomogeneousMatrix();
94 return derived().toActionMatrix_impl();
96 operator ActionMatrixType()
const
101 template<
typename Matrix6Like>
102 void toActionMatrix(
const Eigen::MatrixBase<Matrix6Like> & action_matrix)
const
104 derived().toActionMatrix_impl(action_matrix);
113 return derived().toActionMatrixInverse_impl();
116 template<
typename Matrix6Like>
119 derived().toActionMatrixInverse_impl(action_matrix_inverse.const_cast_derived());
122 ActionMatrixType toDualActionMatrix()
const
124 return derived().toDualActionMatrix_impl();
127 void disp(std::ostream & os)
const
129 static_cast<const Derived *
>(
this)->disp_impl(os);
132 template<
typename Matrix6Like>
133 void toDualActionMatrix(
const Eigen::MatrixBase<Matrix6Like> & dual_action_matrix)
const
135 derived().toDualActionMatrix_impl(dual_action_matrix);
138 typename SE3GroupAction<Derived>::ReturnType operator*(
const Derived & m2)
const
140 return derived().__mult__(m2);
145 typename SE3GroupAction<D>::ReturnType
act(
const D & d)
const
147 return derived().act_impl(d);
152 typename SE3GroupAction<D>::ReturnType
actInv(
const D & d)
const
154 return derived().actInv_impl(d);
157 bool operator==(
const Derived & other)
const
159 return derived().isEqual(other);
162 bool operator!=(
const Derived & other)
const
164 return !(*
this == other);
168 const Derived & other,
169 const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
const
171 return derived().isApprox_impl(other, prec);
174 friend std::ostream & operator<<(std::ostream & os,
const SE3Base<Derived> & X)
188 return derived().isIdentity(prec);
195 bool isNormalized(
const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
const
197 return derived().isNormalized(prec);
205 derived().normalize();
214 derived().normalized();
Main pinocchio namespace.
Base class for rigid transformation.
bool isIdentity(const typename traits< Derived >::Scalar &prec=Eigen::NumTraits< typename traits< Derived >::Scalar >::dummy_precision()) const
PlainType normalized() const
ActionMatrixType toActionMatrixInverse() const
The action matrix of .
SE3GroupAction< D >::ReturnType act(const D &d) const
ay = aXb.act(by)
bool isNormalized(const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
void normalize()
Normalize *this in such a way the rotation part of *this lies on SO(3).
SE3GroupAction< D >::ReturnType actInv(const D &d) const
by = aXb.actInv(ay)
ActionMatrixType toActionMatrix() const
The action matrix of .
Common traits structure to fully define base classes for CRTP.