- 3.0.2 models module.
inertia_properties.h
Go to the documentation of this file.
1 #ifndef IIT_ROBOT_HYQ_INERTIA_PROPERTIES_H_
2 #define IIT_ROBOT_HYQ_INERTIA_PROPERTIES_H_
3 
4 #include <Eigen/Dense>
5 #include <Eigen/StdVector>
6 #include <iit/rbd/rbd.h>
8 #include <iit/rbd/utils.h>
10 
11 #include "declarations.h"
12 
13 namespace iit {
14 namespace HyQ {
19 namespace dyn {
20 
22 
23 namespace tpl {
24 
25 template <typename TRAIT>
27  public:
28  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29 
30  typedef typename TRAIT::Scalar Scalar;
33  typedef typename CoreS::Vector3 Vec3d;
34 
37  const IMatrix& getTensor_trunk() const;
38  const IMatrix& getTensor_LF_hipassembly() const;
39  const IMatrix& getTensor_LF_upperleg() const;
40  const IMatrix& getTensor_LF_lowerleg() const;
41  const IMatrix& getTensor_RF_hipassembly() const;
42  const IMatrix& getTensor_RF_upperleg() const;
43  const IMatrix& getTensor_RF_lowerleg() const;
44  const IMatrix& getTensor_LH_hipassembly() const;
45  const IMatrix& getTensor_LH_upperleg() const;
46  const IMatrix& getTensor_LH_lowerleg() const;
47  const IMatrix& getTensor_RH_hipassembly() const;
48  const IMatrix& getTensor_RH_upperleg() const;
49  const IMatrix& getTensor_RH_lowerleg() const;
50  Scalar getMass_trunk() const;
51  Scalar getMass_LF_hipassembly() const;
52  Scalar getMass_LF_upperleg() const;
53  Scalar getMass_LF_lowerleg() const;
54  Scalar getMass_RF_hipassembly() const;
55  Scalar getMass_RF_upperleg() const;
56  Scalar getMass_RF_lowerleg() const;
57  Scalar getMass_LH_hipassembly() const;
58  Scalar getMass_LH_upperleg() const;
59  Scalar getMass_LH_lowerleg() const;
60  Scalar getMass_RH_hipassembly() const;
61  Scalar getMass_RH_upperleg() const;
62  Scalar getMass_RH_lowerleg() const;
63  const Vec3d& getCOM_trunk() const;
64  const Vec3d& getCOM_LF_hipassembly() const;
65  const Vec3d& getCOM_LF_upperleg() const;
66  const Vec3d& getCOM_LF_lowerleg() const;
67  const Vec3d& getCOM_RF_hipassembly() const;
68  const Vec3d& getCOM_RF_upperleg() const;
69  const Vec3d& getCOM_RF_lowerleg() const;
70  const Vec3d& getCOM_LH_hipassembly() const;
71  const Vec3d& getCOM_LH_upperleg() const;
72  const Vec3d& getCOM_LH_lowerleg() const;
73  const Vec3d& getCOM_RH_hipassembly() const;
74  const Vec3d& getCOM_RH_upperleg() const;
75  const Vec3d& getCOM_RH_lowerleg() const;
76  Scalar getTotalMass() const;
77 
78  private:
79 
80  IMatrix tensor_trunk;
81  IMatrix tensor_LF_hipassembly;
82  IMatrix tensor_LF_upperleg;
83  IMatrix tensor_LF_lowerleg;
84  IMatrix tensor_RF_hipassembly;
85  IMatrix tensor_RF_upperleg;
86  IMatrix tensor_RF_lowerleg;
87  IMatrix tensor_LH_hipassembly;
88  IMatrix tensor_LH_upperleg;
89  IMatrix tensor_LH_lowerleg;
90  IMatrix tensor_RH_hipassembly;
91  IMatrix tensor_RH_upperleg;
92  IMatrix tensor_RH_lowerleg;
93  Vec3d com_trunk;
94  Vec3d com_LF_hipassembly;
95  Vec3d com_LF_upperleg;
96  Vec3d com_LF_lowerleg;
97  Vec3d com_RF_hipassembly;
98  Vec3d com_RF_upperleg;
99  Vec3d com_RF_lowerleg;
100  Vec3d com_LH_hipassembly;
101  Vec3d com_LH_upperleg;
102  Vec3d com_LH_lowerleg;
103  Vec3d com_RH_hipassembly;
104  Vec3d com_RH_upperleg;
105  Vec3d com_RH_lowerleg;
106 };
107 
108 template <typename TRAIT>
110 
111 template <typename TRAIT>
113  return this->tensor_trunk;
114 }
115 template <typename TRAIT>
117  return this->tensor_LF_hipassembly;
118 }
119 template <typename TRAIT>
121  return this->tensor_LF_upperleg;
122 }
123 template <typename TRAIT>
125  return this->tensor_LF_lowerleg;
126 }
127 template <typename TRAIT>
129  return this->tensor_RF_hipassembly;
130 }
131 template <typename TRAIT>
133  return this->tensor_RF_upperleg;
134 }
135 template <typename TRAIT>
137  return this->tensor_RF_lowerleg;
138 }
139 template <typename TRAIT>
141  return this->tensor_LH_hipassembly;
142 }
143 template <typename TRAIT>
145  return this->tensor_LH_upperleg;
146 }
147 template <typename TRAIT>
149  return this->tensor_LH_lowerleg;
150 }
151 template <typename TRAIT>
153  return this->tensor_RH_hipassembly;
154 }
155 template <typename TRAIT>
157  return this->tensor_RH_upperleg;
158 }
159 template <typename TRAIT>
161  return this->tensor_RH_lowerleg;
162 }
163 template <typename TRAIT>
165  return this->tensor_trunk.getMass();
166 }
167 template <typename TRAIT>
169  return this->tensor_LF_hipassembly.getMass();
170 }
171 template <typename TRAIT>
173  return this->tensor_LF_upperleg.getMass();
174 }
175 template <typename TRAIT>
177  return this->tensor_LF_lowerleg.getMass();
178 }
179 template <typename TRAIT>
181  return this->tensor_RF_hipassembly.getMass();
182 }
183 template <typename TRAIT>
185  return this->tensor_RF_upperleg.getMass();
186 }
187 template <typename TRAIT>
189  return this->tensor_RF_lowerleg.getMass();
190 }
191 template <typename TRAIT>
193  return this->tensor_LH_hipassembly.getMass();
194 }
195 template <typename TRAIT>
197  return this->tensor_LH_upperleg.getMass();
198 }
199 template <typename TRAIT>
201  return this->tensor_LH_lowerleg.getMass();
202 }
203 template <typename TRAIT>
205  return this->tensor_RH_hipassembly.getMass();
206 }
207 template <typename TRAIT>
209  return this->tensor_RH_upperleg.getMass();
210 }
211 template <typename TRAIT>
213  return this->tensor_RH_lowerleg.getMass();
214 }
215 template <typename TRAIT>
217  return this->com_trunk;
218 }
219 template <typename TRAIT>
221  return this->com_LF_hipassembly;
222 }
223 template <typename TRAIT>
225  return this->com_LF_upperleg;
226 }
227 template <typename TRAIT>
229  return this->com_LF_lowerleg;
230 }
231 template <typename TRAIT>
233  return this->com_RF_hipassembly;
234 }
235 template <typename TRAIT>
237  return this->com_RF_upperleg;
238 }
239 template <typename TRAIT>
241  return this->com_RF_lowerleg;
242 }
243 template <typename TRAIT>
245  return this->com_LH_hipassembly;
246 }
247 template <typename TRAIT>
249  return this->com_LH_upperleg;
250 }
251 template <typename TRAIT>
253  return this->com_LH_lowerleg;
254 }
255 template <typename TRAIT>
257  return this->com_RH_hipassembly;
258 }
259 template <typename TRAIT>
261  return this->com_RH_upperleg;
262 }
263 template <typename TRAIT>
265  return this->com_RH_lowerleg;
266 }
267 
268 template <typename TRAIT>
270  return 53.433 + 3.44 + 3.146 + 0.881 + 3.44 + 3.146 + 0.881 + 3.44 + 3.146 + 0.881 + 3.44 + 3.146 + 0.881;
271 }
272 
273 }
274 
276 
277 }
278 }
279 }
280 
281 #include "inertia_properties.impl.h"
282 
283 #endif
Scalar getTotalMass() const
Definition: inertia_properties.h:269
Scalar getMass_RF_hipassembly() const
Definition: inertia_properties.h:180
const Vec3d & getCOM_RH_upperleg() const
Definition: inertia_properties.h:260
Scalar getMass_LH_lowerleg() const
Definition: inertia_properties.h:200
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar Scalar
Definition: inertia_properties.h:30
Scalar getMass_RH_upperleg() const
Definition: inertia_properties.h:208
iit::rbd::Core< Scalar > CoreS
Definition: inertia_properties.h:31
Scalar getMass_LF_lowerleg() const
Definition: inertia_properties.h:176
const Vec3d & getCOM_LF_hipassembly() const
Definition: inertia_properties.h:220
const IMatrix & getTensor_RH_hipassembly() const
Definition: inertia_properties.h:152
const Vec3d & getCOM_LF_lowerleg() const
Definition: inertia_properties.h:228
Scalar getMass_LH_hipassembly() const
Definition: inertia_properties.h:192
const Vec3d & getCOM_RF_lowerleg() const
Definition: inertia_properties.h:240
const Vec3d & getCOM_RF_hipassembly() const
Definition: inertia_properties.h:232
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
Definition: HyALinearizationCodeGen.cpp:23
Scalar getMass_RH_lowerleg() const
Definition: inertia_properties.h:212
Scalar getMass_LH_upperleg() const
Definition: inertia_properties.h:196
InertiaProperties()
Definition: inertia_properties.impl.h:2
Scalar getMass_trunk() const
Definition: inertia_properties.h:164
const Vec3d & getCOM_RH_lowerleg() const
Definition: inertia_properties.h:264
const IMatrix & getTensor_LF_lowerleg() const
Definition: inertia_properties.h:124
Definition: inertia_properties.h:26
Scalar getMass_RF_upperleg() const
Definition: inertia_properties.h:184
Scalar getMass_RF_lowerleg() const
Definition: inertia_properties.h:188
~InertiaProperties()
Definition: inertia_properties.h:109
const IMatrix & getTensor_RH_lowerleg() const
Definition: inertia_properties.h:160
const IMatrix & getTensor_trunk() const
Definition: inertia_properties.h:112
const IMatrix & getTensor_RF_lowerleg() const
Definition: inertia_properties.h:136
CoreS::Vector3 Vec3d
Definition: inertia_properties.h:33
const IMatrix & getTensor_LF_upperleg() const
Definition: inertia_properties.h:120
const Vec3d & getCOM_LH_hipassembly() const
Definition: inertia_properties.h:244
const IMatrix & getTensor_RH_upperleg() const
Definition: inertia_properties.h:156
Scalar getMass_LF_upperleg() const
Definition: inertia_properties.h:172
const IMatrix & getTensor_LH_upperleg() const
Definition: inertia_properties.h:144
tpl::InertiaMatrixDense< double > InertiaMatrixDense
const IMatrix & getTensor_RF_upperleg() const
Definition: inertia_properties.h:132
const IMatrix & getTensor_RF_hipassembly() const
Definition: inertia_properties.h:128
Scalar getMass_RH_hipassembly() const
Definition: inertia_properties.h:204
const Vec3d & getCOM_RH_hipassembly() const
Definition: inertia_properties.h:256
const Vec3d & getCOM_LH_upperleg() const
Definition: inertia_properties.h:248
Scalar getMass_LF_hipassembly() const
Definition: inertia_properties.h:168
const IMatrix & getTensor_LF_hipassembly() const
Definition: inertia_properties.h:116
PlainMatrix< Scalar, 3, 1 > Vector3
const Vec3d & getCOM_trunk() const
Definition: inertia_properties.h:216
const IMatrix & getTensor_LH_hipassembly() const
Definition: inertia_properties.h:140
const Vec3d & getCOM_RF_upperleg() const
Definition: inertia_properties.h:236
const Vec3d & getCOM_LF_upperleg() const
Definition: inertia_properties.h:224
const IMatrix & getTensor_LH_lowerleg() const
Definition: inertia_properties.h:148
const Vec3d & getCOM_LH_lowerleg() const
Definition: inertia_properties.h:252
iit::rbd::tpl::InertiaMatrixDense< Scalar > IMatrix
Definition: inertia_properties.h:32