- 3.0.2 models module.
inertia_properties.h
Go to the documentation of this file.
1 #ifndef IIT_ROBOT_CT_QUADROTOR_INERTIA_PROPERTIES_H_
2 #define IIT_ROBOT_CT_QUADROTOR_INERTIA_PROPERTIES_H_
3 
4 #include <Eigen/Dense>
5 #include <iit/rbd/rbd.h>
7 #include <iit/rbd/utils.h>
9 
10 #include "declarations.h"
11 
12 namespace iit {
13 namespace ct_quadrotor {
18 namespace dyn {
19 
21 
22 namespace tpl{
23 
24 template<typename TRAIT>
26  public:
27  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
28 
29  typedef typename TRAIT::Scalar SCALAR;
30 
32  typedef Eigen::Matrix<SCALAR, 3, 1> Vec3d;
33 
36  const IMatrix& getTensor_body() const;
37  const IMatrix& getTensor_link1() const;
38  const IMatrix& getTensor_link2() const;
39  SCALAR getMass_body() const;
40  SCALAR getMass_link1() const;
41  SCALAR getMass_link2() const;
42  const Vec3d& getCOM_body() const;
43  const Vec3d& getCOM_link1() const;
44  const Vec3d& getCOM_link2() const;
45  SCALAR getTotalMass() const;
46 
47  private:
48 
49  IMatrix tensor_body;
50  IMatrix tensor_link1;
51  IMatrix tensor_link2;
52  Vec3d com_body;
53  Vec3d com_link1;
54  Vec3d com_link2;
55 };
56 
57 template <typename TRAIT>
59 
60 template <typename TRAIT>
62  return this->tensor_body;
63 }
64 template <typename TRAIT>
66  return this->tensor_link1;
67 }
68 template <typename TRAIT>
70  return this->tensor_link2;
71 }
72 template <typename TRAIT>
74  return this->tensor_body.getMass();
75 }
76 template <typename TRAIT>
78  return this->tensor_link1.getMass();
79 }
80 template <typename TRAIT>
82  return this->tensor_link2.getMass();
83 }
84 template <typename TRAIT>
86  return this->com_body;
87 }
88 template <typename TRAIT>
90  return this->com_link1;
91 }
92 template <typename TRAIT>
94  return this->com_link2;
95 }
96 
97 template <typename TRAIT>
99  return 0.5 + 0.025 + 0.1;
100 }
101 
102 } // namespace tpl
103 
105 
106 }
107 }
108 }
109 
110 #include "inertia_properties.impl.h"
111 
112 #endif
SCALAR getMass_body() const
Definition: inertia_properties.h:73
InertiaProperties()
Definition: inertia_properties.impl.h:2
const IMatrix & getTensor_link2() const
Definition: inertia_properties.h:69
SCALAR getTotalMass() const
Definition: inertia_properties.h:98
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
Definition: HyALinearizationCodeGen.cpp:23
const Vec3d & getCOM_link2() const
Definition: inertia_properties.h:93
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar SCALAR
Definition: inertia_properties.h:29
Definition: inertia_properties.h:25
SCALAR getMass_link2() const
Definition: inertia_properties.h:81
const Vec3d & getCOM_link1() const
Definition: inertia_properties.h:89
const IMatrix & getTensor_body() const
Definition: inertia_properties.h:61
SCALAR getMass_link1() const
Definition: inertia_properties.h:77
tpl::InertiaMatrixDense< double > InertiaMatrixDense
const IMatrix & getTensor_link1() const
Definition: inertia_properties.h:65
iit::rbd::tpl::InertiaMatrixDense< SCALAR > IMatrix
Definition: inertia_properties.h:31
Eigen::Matrix< SCALAR, 3, 1 > Vec3d
Definition: inertia_properties.h:32
~InertiaProperties()
Definition: inertia_properties.h:58
const Vec3d & getCOM_body() const
Definition: inertia_properties.h:85