- 3.0.2 rigid body dynamics module.
inertia_properties.h
Go to the documentation of this file.
1 #ifndef IIT_ROBOT_TESTIRB4600_INERTIA_PROPERTIES_H_
2 #define IIT_ROBOT_TESTIRB4600_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 testirb4600 {
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_link1() const;
37  const IMatrix& getTensor_link2() const;
38  const IMatrix& getTensor_link3() const;
39  const IMatrix& getTensor_link4() const;
40  const IMatrix& getTensor_link5() const;
41  const IMatrix& getTensor_link6() const;
42  SCALAR getMass_link1() const;
43  SCALAR getMass_link2() const;
44  SCALAR getMass_link3() const;
45  SCALAR getMass_link4() const;
46  SCALAR getMass_link5() const;
47  SCALAR getMass_link6() const;
48  const Vec3d& getCOM_link1() const;
49  const Vec3d& getCOM_link2() const;
50  const Vec3d& getCOM_link3() const;
51  const Vec3d& getCOM_link4() const;
52  const Vec3d& getCOM_link5() const;
53  const Vec3d& getCOM_link6() const;
54  SCALAR getTotalMass() const;
55 
56  private:
57 
58  IMatrix tensor_link1;
59  IMatrix tensor_link2;
60  IMatrix tensor_link3;
61  IMatrix tensor_link4;
62  IMatrix tensor_link5;
63  IMatrix tensor_link6;
64  Vec3d com_link1;
65  Vec3d com_link2;
66  Vec3d com_link3;
67  Vec3d com_link4;
68  Vec3d com_link5;
69  Vec3d com_link6;
70 };
71 
72 template <typename TRAIT>
74 
75 template <typename TRAIT>
77  return this->tensor_link1;
78 }
79 template <typename TRAIT>
81  return this->tensor_link2;
82 }
83 template <typename TRAIT>
85  return this->tensor_link3;
86 }
87 template <typename TRAIT>
89  return this->tensor_link4;
90 }
91 template <typename TRAIT>
93  return this->tensor_link5;
94 }
95 template <typename TRAIT>
97  return this->tensor_link6;
98 }
99 template <typename TRAIT>
101  return this->tensor_link1.getMass();
102 }
103 template <typename TRAIT>
105  return this->tensor_link2.getMass();
106 }
107 template <typename TRAIT>
109  return this->tensor_link3.getMass();
110 }
111 template <typename TRAIT>
113  return this->tensor_link4.getMass();
114 }
115 template <typename TRAIT>
117  return this->tensor_link5.getMass();
118 }
119 template <typename TRAIT>
121  return this->tensor_link6.getMass();
122 }
123 template <typename TRAIT>
125  return this->com_link1;
126 }
127 template <typename TRAIT>
129  return this->com_link2;
130 }
131 template <typename TRAIT>
133  return this->com_link3;
134 }
135 template <typename TRAIT>
137  return this->com_link4;
138 }
139 template <typename TRAIT>
141  return this->com_link5;
142 }
143 template <typename TRAIT>
145  return this->com_link6;
146 }
147 
148 template <typename TRAIT>
150  return 120.0 + 120.0 + 120.0 + 40.0 + 10.0 + 5.0;
151 }
152 
153 } // namespace tpl
154 
156 
157 }
158 }
159 }
160 
161 #include "inertia_properties.impl.h"
162 
163 #endif
const IMatrix & getTensor_link5() const
Definition: inertia_properties.h:92
SCALAR getMass_link6() const
Definition: inertia_properties.h:120
const Vec3d & getCOM_link3() const
Definition: inertia_properties.h:132
iit::rbd::tpl::InertiaMatrixDense< SCALAR > IMatrix
Definition: inertia_properties.h:31
SCALAR getMass_link1() const
Definition: inertia_properties.h:100
SCALAR getMass_link2() const
Definition: inertia_properties.h:104
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar SCALAR
Definition: inertia_properties.h:29
Definition: InertiaMatrix.h:25
SCALAR getMass_link4() const
Definition: inertia_properties.h:112
Definition: inertia_properties.h:25
SCALAR getMass_link5() const
Definition: inertia_properties.h:116
InertiaProperties()
Definition: inertia_properties.impl.h:2
const Vec3d & getCOM_link1() const
Definition: inertia_properties.h:124
~InertiaProperties()
Definition: inertia_properties.h:73
const IMatrix & getTensor_link6() const
Definition: inertia_properties.h:96
tpl::InertiaMatrixDense< double > InertiaMatrixDense
Definition: InertiaMatrix.h:316
const Vec3d & getCOM_link4() const
Definition: inertia_properties.h:136
const Vec3d & getCOM_link5() const
Definition: inertia_properties.h:140
const Vec3d & getCOM_link2() const
Definition: inertia_properties.h:128
const IMatrix & getTensor_link4() const
Definition: inertia_properties.h:88
const IMatrix & getTensor_link3() const
Definition: inertia_properties.h:84
SCALAR getMass_link3() const
Definition: inertia_properties.h:108
SCALAR getTotalMass() const
Definition: inertia_properties.h:149
Eigen::Matrix< SCALAR, 3, 1 > Vec3d
Definition: inertia_properties.h:32
const IMatrix & getTensor_link1() const
Definition: inertia_properties.h:76
const Vec3d & getCOM_link6() const
Definition: inertia_properties.h:144
const IMatrix & getTensor_link2() const
Definition: inertia_properties.h:80