motion-zero.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2019 CNRS, INRIA
3 // Copyright (c) 2015-2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 
6 #ifndef __pinocchio_motion_zero_hpp__
7 #define __pinocchio_motion_zero_hpp__
8 
9 namespace pinocchio
10 {
11 
12  template<typename Scalar, int Options>
14  {
16  };
17 
18  template<typename Scalar, int Options, typename MotionDerived>
20  {
22  };
23 
24  template<typename _Scalar, int _Options>
25  struct traits< MotionZeroTpl<_Scalar,_Options> >
26  {
27  enum {
28  Options = _Options,
29  LINEAR = 0,
30  ANGULAR = 3
31  };
32  typedef _Scalar Scalar;
33  typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
34  typedef Eigen::Matrix<Scalar,6,1,Options> Vector6;
35  typedef Eigen::Matrix<Scalar,3,3,Options> Matrix3;
36  typedef Eigen::Matrix<Scalar,6,6,Options> Matrix6;
37  typedef typename PINOCCHIO_EIGEN_REF_CONST_TYPE(Vector6) ToVectorConstReturnType;
38  typedef typename PINOCCHIO_EIGEN_REF_TYPE(Vector6) ToVectorReturnType;
39  typedef Matrix6 ActionMatrixType;
40  typedef Vector3 AngularType;
41  typedef const Vector3 ConstAngularType;
42  typedef Vector3 LinearType;
43  typedef const Vector3 ConstLinearType;
45  typedef MotionPlain PlainReturnType;
46 
47  }; // traits MotionZeroTpl
48 
49  template<typename Scalar, int Options>
50  struct MotionZeroTpl
51  : public MotionBase< MotionZeroTpl<Scalar,Options> >
52  {
55 
56  static PlainReturnType plain() { return MotionPlain::Zero(); }
57 
58  template<typename D2>
59  static bool isEqual_impl(const MotionDense<D2> & other)
60  {
61  return other.linear().isZero(0) && other.angular().isZero(0);
62  }
63 
64  static bool isEqual_impl(const MotionZeroTpl &)
65  {
66  return true;
67  }
68 
69  template<typename D2>
70  static void addTo(const MotionBase<D2> &) {}
71 
72  template<typename D2>
73  static void setTo(MotionBase<D2> & other)
74  {
75  other.setZero();
76  }
77 
78  template<typename M1>
80  {
81  return MotionZeroTpl();
82  }
83 
84  template<typename S2, int O2, typename D2>
86  {
87  v.setZero();
88  }
89 
90  template<typename S2, int O2>
92  {
93  return MotionZeroTpl();
94  }
95 
96  template<typename S2, int O2, typename D2>
98  {
99  v.setZero();
100  }
101 
102  template<typename S2, int O2>
104  {
105  return MotionZeroTpl();
106  }
107 
108  }; // struct MotionZeroTpl
109 
110  template<typename M1, typename Scalar, int Options>
111  inline const M1 & operator+(const MotionBase<M1> & v,
113  { return v.derived(); }
114 
115  template<typename Scalar, int Options, typename M1>
116  inline const M1 & operator+(const MotionZeroTpl<Scalar,Options> &,
117  const MotionBase<M1> & v)
118  { return v.derived(); }
119 
121  template<typename Scalar, int Options>
122  struct PINOCCHIO_DEPRECATED BiasZeroTpl : MotionZeroTpl<Scalar,Options>
123  {
125  BiasZeroTpl(const Base &) {}
126  };
127 
130  template<typename Scalar, int Options>
132  {
134  };
135 
136  template<typename Scalar, int Options, typename MotionDerived>
137  struct MotionAlgebraAction< BiasZeroTpl<Scalar,Options>, MotionDerived>
138  {
140  };
142 
143 } // namespace pinocchio
144 
145 #endif // ifndef __pinocchio_motion_zero_hpp__
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
static void setTo(MotionBase< D2 > &other)
Definition: motion-zero.hpp:73
MotionZeroTpl se3ActionInverse_impl(const SE3Tpl< S2, O2 > &) const
static bool isEqual_impl(const MotionZeroTpl &)
Definition: motion-zero.hpp:64
traits< MotionZeroTpl >::MotionPlain MotionPlain
Definition: motion-zero.hpp:53
MotionZeroTpl se3Action_impl(const SE3Tpl< S2, O2 > &) const
Definition: motion-zero.hpp:91
Return type of the ation of a Motion onto an object of type D.
PINOCCHIO_EIGEN_REF_CONST_TYPE(Matrix6Like) operator*(const Eigen
BiasZeroTpl has been replaced by MotionZeroTpl. Please use this naming instead.
Eigen::Matrix< Scalar, 6, 6, Options > Matrix6
Definition: motion-zero.hpp:36
MotionZeroTpl motionAction(const MotionBase< M1 > &) const
Definition: motion-zero.hpp:79
#define PINOCCHIO_COMPILER_DIAGNOSTIC_POP
Definition: src/macros.hpp:89
Eigen::Matrix< Scalar, 6, 1, Options > Vector6
Definition: motion-zero.hpp:34
MotionDerived::MotionPlain operator+(const MotionPlanarTpl< Scalar, Options > &m1, const MotionDense< MotionDerived > &m2)
SE3::Scalar Scalar
Definition: conversions.cpp:13
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: motion-zero.hpp:33
Eigen::Matrix< Scalar, 3, 3, Options > Matrix3
Definition: motion-zero.hpp:35
traits< MotionZeroTpl >::PlainReturnType PlainReturnType
Definition: motion-zero.hpp:54
ConstLinearType linear() const
Definition: motion-base.hpp:22
static PlainReturnType plain()
Definition: motion-zero.hpp:56
static void addTo(const MotionBase< D2 > &)
Definition: motion-zero.hpp:70
MotionZeroTpl< Scalar, Options > Base
void se3Action_impl(const SE3Tpl< S2, O2 > &, MotionDense< D2 > &v) const
Definition: motion-zero.hpp:85
#define PINOCCHIO_EIGEN_REF_TYPE(D)
Main pinocchio namespace.
Definition: timings.cpp:30
static bool isEqual_impl(const MotionDense< D2 > &other)
Definition: motion-zero.hpp:59
BiasZeroTpl(const Base &)
Common traits structure to fully define base classes for CRTP.
Definition: src/fwd.hpp:44
void se3ActionInverse_impl(const SE3Tpl< S2, O2 > &, MotionDense< D2 > &v) const
Definition: motion-zero.hpp:97
#define PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
macros for pragma push/pop/ignore deprecated warnings
Definition: src/macros.hpp:88
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
Definition: src/macros.hpp:90
ConstAngularType angular() const
Definition: motion-base.hpp:21


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:04