pinocchio  3.3.1
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  } // namespace internal
32 
38  template<typename Scalar, int Options = context::Options>
39  struct SE3Tpl;
40 
41  template<typename Derived>
42  class MotionBase;
43  template<typename Derived>
44  class MotionDense;
45  template<typename Vector6ArgType>
46  class MotionRef;
47  template<typename Scalar, int Options = context::Options>
48  struct MotionZeroTpl;
49 
50  template<typename Derived>
51  class ForceBase;
52  template<typename Derived>
53  class ForceDense;
54  template<typename Vector6ArgType>
55  class ForceRef;
56 
57  template<typename Scalar, int Options = context::Options>
58  struct InertiaTpl;
59  template<typename Scalar, int Options = context::Options>
60  class Symmetric3Tpl;
61  template<typename Scalar, int Options = context::Options>
62  struct PseudoInertiaTpl;
63  template<typename Scalar, int Options = context::Options>
64  struct LogCholeskyParametersTpl;
65 
66  typedef SE3Tpl<context::Scalar, context::Options> SE3;
67  typedef MotionTpl<context::Scalar, context::Options> Motion;
68  typedef ForceTpl<context::Scalar, context::Options> Force;
69  typedef InertiaTpl<context::Scalar, context::Options> Inertia;
70  typedef Symmetric3Tpl<context::Scalar, context::Options> Symmetric3;
71  typedef MotionZeroTpl<context::Scalar, context::Options> MotionZero;
72  typedef PseudoInertiaTpl<context::Scalar, context::Options> PseudoInertia;
73  typedef LogCholeskyParametersTpl<context::Scalar, context::Options> LogCholeskyParameters;
74 
78  // end of group spatial
79 
80 #define SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived, TYPENAME) \
81  typedef TYPENAME traits<derived>::Scalar Scalar; \
82  typedef TYPENAME traits<derived>::Vector3 Vector3; \
83  typedef TYPENAME traits<derived>::Vector4 Vector4; \
84  typedef TYPENAME traits<derived>::Vector6 Vector6; \
85  typedef TYPENAME traits<derived>::Matrix3 Matrix3; \
86  typedef TYPENAME traits<derived>::Matrix4 Matrix4; \
87  typedef TYPENAME traits<derived>::Matrix6 Matrix6; \
88  typedef TYPENAME traits<derived>::Angular_t Angular_t; \
89  typedef TYPENAME traits<derived>::Linear_t Linear_t; \
90  typedef TYPENAME traits<derived>::ConstAngular_t ConstAngular_t; \
91  typedef TYPENAME traits<derived>::ConstLinear_t ConstLinear_t; \
92  typedef TYPENAME traits<derived>::ActionMatrix_t ActionMatrix_t; \
93  typedef TYPENAME traits<derived>::Quaternion_t Quaternion_t; \
94  typedef TYPENAME traits<derived>::SE3 SE3; \
95  typedef TYPENAME traits<derived>::Force Force; \
96  typedef TYPENAME traits<derived>::Motion Motion; \
97  typedef TYPENAME traits<derived>::Symmetric3 Symmetric3; \
98  enum \
99  { \
100  LINEAR = traits<derived>::LINEAR, \
101  ANGULAR = traits<derived>::ANGULAR \
102  }
103 
104 #define SPATIAL_TYPEDEF_TEMPLATE(derived) SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived, typename)
105 
106 #define SPATIAL_TYPEDEF_NO_TEMPLATE(derived) \
107  SPATIAL_TYPEDEF_TEMPLATE_GENERIC(derived, PINOCCHIO_MACRO_EMPTY_ARG)
108 
109  namespace internal
110  {
111  // for certain Scalar type, it might be needed to proceed to call some normalization procedure
112  // in when performing a cast. This struct is an helper to support such modality.
113  template<typename Class, typename NewScalar, typename Scalar>
114  struct cast_call_normalize_method;
115  } // namespace internal
116 
117 } // namespace pinocchio
118 
119 #endif // ifndef __pinocchio_spatial_fwd_hpp__
Main pinocchio namespace.
Definition: treeview.dox:11