pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
fwd.hpp
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 // Copyright (c) 2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 
6 #ifndef __pinocchio_spatial_fwd_hpp__
7 #define __pinocchio_spatial_fwd_hpp__
8 
9 #include "pinocchio/fwd.hpp"
10 #include "pinocchio/macros.hpp"
11 
12 namespace pinocchio
13 {
15  namespace internal
16  {
18  template<typename Type, typename Scalar>
19  struct RHSScalarMultiplication
20  {
21  typedef Type ReturnType;
22  };
23 
25  template<typename Type, typename Scalar>
26  struct LHSScalarMultiplication
27  {
28  typedef Type ReturnType;
29  };
30  }
32 
38  template<typename Scalar, int Options=0> struct SE3Tpl;
39 
40  template<typename Derived> class MotionBase;
41  template<typename Derived> class MotionDense;
42  template<typename Vector6ArgType> class MotionRef;
43  template<typename Scalar, int Options=0> class MotionTpl;
44  template<typename Scalar, int Options=0> struct MotionZeroTpl;
45  template<typename Scalar, int Options=0> struct PINOCCHIO_DEPRECATED BiasZeroTpl;
46 
47  template<typename Derived> class ForceBase;
48  template<typename Derived> class ForceDense;
49  template<typename Vector6ArgType> class ForceRef;
50  template<typename Scalar, int Options=0> class ForceTpl;
51 
52  template<typename Scalar, int Options=0> class InertiaTpl;
53  template<typename Scalar, int Options=0> class Symmetric3Tpl;
54 
55 
56  typedef SE3Tpl <double,0> SE3;
58  typedef ForceTpl <double,0> Force;
62 
63 #pragma GCC diagnostic push
64 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
66 #pragma GCC diagnostic pop
67 
71  // end of group spatial
72 
73  #define SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,TYPENAME) \
74  typedef TYPENAME traits<derived>::Scalar Scalar; \
75  typedef TYPENAME traits<derived>::Vector3 Vector3; \
76  typedef TYPENAME traits<derived>::Vector4 Vector4; \
77  typedef TYPENAME traits<derived>::Vector6 Vector6; \
78  typedef TYPENAME traits<derived>::Matrix3 Matrix3; \
79  typedef TYPENAME traits<derived>::Matrix4 Matrix4; \
80  typedef TYPENAME traits<derived>::Matrix6 Matrix6; \
81  typedef TYPENAME traits<derived>::Angular_t Angular_t; \
82  typedef TYPENAME traits<derived>::Linear_t Linear_t; \
83  typedef TYPENAME traits<derived>::ConstAngular_t ConstAngular_t; \
84  typedef TYPENAME traits<derived>::ConstLinear_t ConstLinear_t; \
85  typedef TYPENAME traits<derived>::ActionMatrix_t ActionMatrix_t; \
86  typedef TYPENAME traits<derived>::Quaternion_t Quaternion_t; \
87  typedef TYPENAME traits<derived>::SE3 SE3; \
88  typedef TYPENAME traits<derived>::Force Force; \
89  typedef TYPENAME traits<derived>::Motion Motion; \
90  typedef TYPENAME traits<derived>::Symmetric3 Symmetric3; \
91  enum { \
92  LINEAR = traits<derived>::LINEAR, \
93  ANGULAR = traits<derived>::ANGULAR \
94  }
95 
96  #define SPATIAL_TYPEDEF_TEMPLATE(derived) \
97  SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,typename)
98 
99  #define SPATIAL_TYPEDEF_NO_TEMPLATE(derived) \
100  SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived,PINOCCHIO_MACRO_EMPTY_ARG)
101 
102  namespace internal
103  {
104  // for certain Scalar type, it might be needed to proceed to call some normalization procedure
105  // in when performing a cast. This struct is an helper to support such modality.
106  template<typename Class, typename NewScalar, typename Scalar>
107  struct cast_call_normalize_method;
108  }
109 
110 } // namespace pinocchio
111 
112 #endif // ifndef __pinocchio_spatial_fwd_hpp__
BiasZeroTpl has been replaced by MotionZeroTpl. Please use this naming instead.
Base interface for forces representation.
Definition: force-base.hpp:22
Main pinocchio namespace.
Definition: treeview.dox:24