6 #ifndef __pinocchio_force_base_hpp__ 7 #define __pinocchio_force_base_hpp__ 21 template<
class Derived>
27 Derived &
derived() {
return *
static_cast<Derived*
>(
this); }
28 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
58 template<
typename V3Like>
59 void angular(
const Eigen::MatrixBase<V3Like> & n)
60 {
derived().angular_impl(n.derived()); }
69 template<
typename V3Like>
70 void linear(
const Eigen::MatrixBase<V3Like> & f)
71 {
derived().linear_impl(f.derived()); }
90 operator Vector6()
const {
return toVector(); }
101 template<
typename F2>
106 bool isApprox(
const Derived & other,
const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
const 107 {
return derived().isApprox_impl(other, prec); }
111 bool isZero(
const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
const 112 {
return derived().isZero_impl(prec); }
138 template<
typename OtherScalar>
139 ForcePlain
operator*(
const OtherScalar & alpha)
const {
return derived().__mult__(alpha); }
143 template<
typename OtherScalar>
156 template<
typename MotionDerived>
171 template<
typename S2,
int O2>
174 {
return derived().se3Action_impl(m); }
187 template<
typename S2,
int O2>
190 {
return derived().se3ActionInverse_impl(m); }
192 template<
typename M1>
200 friend std::ostream & operator << (std::ostream & os, const ForceBase<Derived> & X)
210 #endif // ifndef __pinocchio_force_base_hpp__ JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
AngularType angular()
Return the angular part of the force vector.
Derived operator-(const ForceBase< Derived > &phi) const
ForcePlain operator*(const OtherScalar &alpha) const
void linear(const Eigen::MatrixBase< V3Like > &f)
Set the linear part of the force vector.
void angular(const Eigen::MatrixBase< V3Like > &n)
Set the angular part of the force vector.
ToVectorReturnType toVector()
Return the force as an Eigen vector.
bool operator==(const ForceBase< F2 > &other) const
MotionAlgebraAction< Derived, M1 >::ReturnType motionAction(const MotionDense< M1 > &v) const
ToVectorConstReturnType toVector() const
Return the force as an Eigen vector.
Derived operator+(const ForceBase< Derived > &phi) const
FORCE_TYPEDEF_TPL(Derived)
ConstAngularType angular() const
Return the angular part of the force vector.
void disp(std::ostream &os) const
bool operator!=(const ForceBase< F2 > &other) const
ConstLinearType linear() const
Return the linear part of the force vector.
LinearType linear()
Return the linear part of the force vector.
Derived operator-() const
Derived & operator=(const ForceBase< Derived > &other)
Copies the Derived Force into *this.
Base interface for forces representation.
bool isApprox(const Derived &other, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
Main pinocchio namespace.
SE3GroupAction< Derived >::ReturnType se3ActionInverse(const SE3Tpl< S2, O2 > &m) const
Transform from B to A coordinates the Force represented by *this such that .
bool isZero(const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
Derived & operator-=(const ForceBase< Derived > &phi)
Replaces *this by *this - other.
ForcePlain operator/(const OtherScalar &alpha) const
const Derived & derived() const
Scalar dot(const MotionDense< MotionDerived > &m) const
SE3GroupAction< Derived >::ReturnType se3Action(const SE3Tpl< S2, O2 > &m) const
Transform from A to B coordinates the Force represented by *this such that .
Derived & operator+=(const ForceBase< Derived > &phi)
Replaces *this by *this + other.