4 template<
typename TRAIT>
6 linkInertias(inertiaProperties),
7 frcTransf( &forceTransforms ),
8 Wrist_FE_Ic(linkInertias.getTensor_Wrist_FE())
14 #define DATA tpl::JSIM<TRAIT>::operator() 16 template <
typename TRAIT>
21 frcTransf -> fr_Wrist_R_X_fr_Wrist_FE(state);
22 frcTransf -> fr_Elbow_FE_X_fr_Wrist_R(state);
23 frcTransf -> fr_Humerus_R_X_fr_Elbow_FE(state);
24 frcTransf -> fr_Shoulder_FE_X_fr_Humerus_R(state);
25 frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE(state);
38 Wrist_R_Ic += Ic_spare;
43 F = frcTransf -> fr_Wrist_R_X_fr_Wrist_FE *
F;
46 F = frcTransf -> fr_Elbow_FE_X_fr_Wrist_R *
F;
49 F = frcTransf -> fr_Humerus_R_X_fr_Elbow_FE *
F;
52 F = frcTransf -> fr_Shoulder_FE_X_fr_Humerus_R *
F;
55 F = frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE *
F;
61 Elbow_FE_Ic += Ic_spare;
66 F = frcTransf -> fr_Elbow_FE_X_fr_Wrist_R *
F;
69 F = frcTransf -> fr_Humerus_R_X_fr_Elbow_FE *
F;
72 F = frcTransf -> fr_Shoulder_FE_X_fr_Humerus_R *
F;
75 F = frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE *
F;
81 Humerus_R_Ic += Ic_spare;
86 F = frcTransf -> fr_Humerus_R_X_fr_Elbow_FE *
F;
89 F = frcTransf -> fr_Shoulder_FE_X_fr_Humerus_R *
F;
92 F = frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE *
F;
98 Shoulder_FE_Ic += Ic_spare;
103 F = frcTransf -> fr_Shoulder_FE_X_fr_Humerus_R *
F;
106 F = frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE *
F;
112 Shoulder_AA_Ic += Ic_spare;
117 F = frcTransf -> fr_Shoulder_AA_X_fr_Shoulder_FE *
F;
133 template <
typename TRAIT>
135 L =
this ->
template triangularView<Eigen::Lower>();
137 L(5, 5) = std::sqrt(L(5, 5));
138 L(5, 4) = L(5, 4) / L(5, 5);
139 L(5, 3) = L(5, 3) / L(5, 5);
140 L(5, 2) = L(5, 2) / L(5, 5);
141 L(5, 1) = L(5, 1) / L(5, 5);
142 L(5, 0) = L(5, 0) / L(5, 5);
143 L(4, 4) = L(4, 4) - L(5, 4) * L(5, 4);
144 L(4, 3) = L(4, 3) - L(5, 4) * L(5, 3);
145 L(4, 2) = L(4, 2) - L(5, 4) * L(5, 2);
146 L(4, 1) = L(4, 1) - L(5, 4) * L(5, 1);
147 L(4, 0) = L(4, 0) - L(5, 4) * L(5, 0);
148 L(3, 3) = L(3, 3) - L(5, 3) * L(5, 3);
149 L(3, 2) = L(3, 2) - L(5, 3) * L(5, 2);
150 L(3, 1) = L(3, 1) - L(5, 3) * L(5, 1);
151 L(3, 0) = L(3, 0) - L(5, 3) * L(5, 0);
152 L(2, 2) = L(2, 2) - L(5, 2) * L(5, 2);
153 L(2, 1) = L(2, 1) - L(5, 2) * L(5, 1);
154 L(2, 0) = L(2, 0) - L(5, 2) * L(5, 0);
155 L(1, 1) = L(1, 1) - L(5, 1) * L(5, 1);
156 L(1, 0) = L(1, 0) - L(5, 1) * L(5, 0);
157 L(0, 0) = L(0, 0) - L(5, 0) * L(5, 0);
160 L(4, 4) = std::sqrt(L(4, 4));
161 L(4, 3) = L(4, 3) / L(4, 4);
162 L(4, 2) = L(4, 2) / L(4, 4);
163 L(4, 1) = L(4, 1) / L(4, 4);
164 L(4, 0) = L(4, 0) / L(4, 4);
165 L(3, 3) = L(3, 3) - L(4, 3) * L(4, 3);
166 L(3, 2) = L(3, 2) - L(4, 3) * L(4, 2);
167 L(3, 1) = L(3, 1) - L(4, 3) * L(4, 1);
168 L(3, 0) = L(3, 0) - L(4, 3) * L(4, 0);
169 L(2, 2) = L(2, 2) - L(4, 2) * L(4, 2);
170 L(2, 1) = L(2, 1) - L(4, 2) * L(4, 1);
171 L(2, 0) = L(2, 0) - L(4, 2) * L(4, 0);
172 L(1, 1) = L(1, 1) - L(4, 1) * L(4, 1);
173 L(1, 0) = L(1, 0) - L(4, 1) * L(4, 0);
174 L(0, 0) = L(0, 0) - L(4, 0) * L(4, 0);
177 L(3, 3) = std::sqrt(L(3, 3));
178 L(3, 2) = L(3, 2) / L(3, 3);
179 L(3, 1) = L(3, 1) / L(3, 3);
180 L(3, 0) = L(3, 0) / L(3, 3);
181 L(2, 2) = L(2, 2) - L(3, 2) * L(3, 2);
182 L(2, 1) = L(2, 1) - L(3, 2) * L(3, 1);
183 L(2, 0) = L(2, 0) - L(3, 2) * L(3, 0);
184 L(1, 1) = L(1, 1) - L(3, 1) * L(3, 1);
185 L(1, 0) = L(1, 0) - L(3, 1) * L(3, 0);
186 L(0, 0) = L(0, 0) - L(3, 0) * L(3, 0);
189 L(2, 2) = std::sqrt(L(2, 2));
190 L(2, 1) = L(2, 1) / L(2, 2);
191 L(2, 0) = L(2, 0) / L(2, 2);
192 L(1, 1) = L(1, 1) - L(2, 1) * L(2, 1);
193 L(1, 0) = L(1, 0) - L(2, 1) * L(2, 0);
194 L(0, 0) = L(0, 0) - L(2, 0) * L(2, 0);
197 L(1, 1) = std::sqrt(L(1, 1));
198 L(1, 0) = L(1, 0) / L(1, 1);
199 L(0, 0) = L(0, 0) - L(1, 0) * L(1, 0);
202 L(0, 0) = std::sqrt(L(0, 0));
206 template <
typename TRAIT>
210 inverse(0, 0) = + (Linv(0, 0) * Linv(0, 0));
211 inverse(1, 1) = + (Linv(1, 0) * Linv(1, 0)) + (Linv(1, 1) * Linv(1, 1));
212 inverse(1, 0) = + (Linv(1, 0) * Linv(0, 0));
213 inverse(0, 1) = inverse(1, 0);
214 inverse(2, 2) = + (Linv(2, 0) * Linv(2, 0)) + (Linv(2, 1) * Linv(2, 1)) + (Linv(2, 2) * Linv(2, 2));
215 inverse(2, 1) = + (Linv(2, 0) * Linv(1, 0)) + (Linv(2, 1) * Linv(1, 1));
216 inverse(1, 2) = inverse(2, 1);
217 inverse(2, 0) = + (Linv(2, 0) * Linv(0, 0));
218 inverse(0, 2) = inverse(2, 0);
219 inverse(3, 3) = + (Linv(3, 0) * Linv(3, 0)) + (Linv(3, 1) * Linv(3, 1)) + (Linv(3, 2) * Linv(3, 2)) + (Linv(3, 3) * Linv(3, 3));
220 inverse(3, 2) = + (Linv(3, 0) * Linv(2, 0)) + (Linv(3, 1) * Linv(2, 1)) + (Linv(3, 2) * Linv(2, 2));
221 inverse(2, 3) = inverse(3, 2);
222 inverse(3, 1) = + (Linv(3, 0) * Linv(1, 0)) + (Linv(3, 1) * Linv(1, 1));
223 inverse(1, 3) = inverse(3, 1);
224 inverse(3, 0) = + (Linv(3, 0) * Linv(0, 0));
225 inverse(0, 3) = inverse(3, 0);
226 inverse(4, 4) = + (Linv(4, 0) * Linv(4, 0)) + (Linv(4, 1) * Linv(4, 1)) + (Linv(4, 2) * Linv(4, 2)) + (Linv(4, 3) * Linv(4, 3)) + (Linv(4, 4) * Linv(4, 4));
227 inverse(4, 3) = + (Linv(4, 0) * Linv(3, 0)) + (Linv(4, 1) * Linv(3, 1)) + (Linv(4, 2) * Linv(3, 2)) + (Linv(4, 3) * Linv(3, 3));
228 inverse(3, 4) = inverse(4, 3);
229 inverse(4, 2) = + (Linv(4, 0) * Linv(2, 0)) + (Linv(4, 1) * Linv(2, 1)) + (Linv(4, 2) * Linv(2, 2));
230 inverse(2, 4) = inverse(4, 2);
231 inverse(4, 1) = + (Linv(4, 0) * Linv(1, 0)) + (Linv(4, 1) * Linv(1, 1));
232 inverse(1, 4) = inverse(4, 1);
233 inverse(4, 0) = + (Linv(4, 0) * Linv(0, 0));
234 inverse(0, 4) = inverse(4, 0);
235 inverse(5, 5) = + (Linv(5, 0) * Linv(5, 0)) + (Linv(5, 1) * Linv(5, 1)) + (Linv(5, 2) * Linv(5, 2)) + (Linv(5, 3) * Linv(5, 3)) + (Linv(5, 4) * Linv(5, 4)) + (Linv(5, 5) * Linv(5, 5));
236 inverse(5, 4) = + (Linv(5, 0) * Linv(4, 0)) + (Linv(5, 1) * Linv(4, 1)) + (Linv(5, 2) * Linv(4, 2)) + (Linv(5, 3) * Linv(4, 3)) + (Linv(5, 4) * Linv(4, 4));
237 inverse(4, 5) = inverse(5, 4);
238 inverse(5, 3) = + (Linv(5, 0) * Linv(3, 0)) + (Linv(5, 1) * Linv(3, 1)) + (Linv(5, 2) * Linv(3, 2)) + (Linv(5, 3) * Linv(3, 3));
239 inverse(3, 5) = inverse(5, 3);
240 inverse(5, 2) = + (Linv(5, 0) * Linv(2, 0)) + (Linv(5, 1) * Linv(2, 1)) + (Linv(5, 2) * Linv(2, 2));
241 inverse(2, 5) = inverse(5, 2);
242 inverse(5, 1) = + (Linv(5, 0) * Linv(1, 0)) + (Linv(5, 1) * Linv(1, 1));
243 inverse(1, 5) = inverse(5, 1);
244 inverse(5, 0) = + (Linv(5, 0) * Linv(0, 0));
245 inverse(0, 5) = inverse(5, 0);
248 template <
typename TRAIT>
251 Linv(0, 0) = 1 / L(0, 0);
252 Linv(1, 1) = 1 / L(1, 1);
253 Linv(2, 2) = 1 / L(2, 2);
254 Linv(3, 3) = 1 / L(3, 3);
255 Linv(4, 4) = 1 / L(4, 4);
256 Linv(5, 5) = 1 / L(5, 5);
257 Linv(1, 0) = - Linv(0, 0) * ((Linv(1, 1) * L(1, 0)) + 0);
258 Linv(2, 1) = - Linv(1, 1) * ((Linv(2, 2) * L(2, 1)) + 0);
259 Linv(2, 0) = - Linv(0, 0) * ((Linv(2, 1) * L(1, 0)) + (Linv(2, 2) * L(2, 0)) + 0);
260 Linv(3, 2) = - Linv(2, 2) * ((Linv(3, 3) * L(3, 2)) + 0);
261 Linv(3, 1) = - Linv(1, 1) * ((Linv(3, 2) * L(2, 1)) + (Linv(3, 3) * L(3, 1)) + 0);
262 Linv(3, 0) = - Linv(0, 0) * ((Linv(3, 1) * L(1, 0)) + (Linv(3, 2) * L(2, 0)) + (Linv(3, 3) * L(3, 0)) + 0);
263 Linv(4, 3) = - Linv(3, 3) * ((Linv(4, 4) * L(4, 3)) + 0);
264 Linv(4, 2) = - Linv(2, 2) * ((Linv(4, 3) * L(3, 2)) + (Linv(4, 4) * L(4, 2)) + 0);
265 Linv(4, 1) = - Linv(1, 1) * ((Linv(4, 2) * L(2, 1)) + (Linv(4, 3) * L(3, 1)) + (Linv(4, 4) * L(4, 1)) + 0);
266 Linv(4, 0) = - Linv(0, 0) * ((Linv(4, 1) * L(1, 0)) + (Linv(4, 2) * L(2, 0)) + (Linv(4, 3) * L(3, 0)) + (Linv(4, 4) * L(4, 0)) + 0);
267 Linv(5, 4) = - Linv(4, 4) * ((Linv(5, 5) * L(5, 4)) + 0);
268 Linv(5, 3) = - Linv(3, 3) * ((Linv(5, 4) * L(4, 3)) + (Linv(5, 5) * L(5, 3)) + 0);
269 Linv(5, 2) = - Linv(2, 2) * ((Linv(5, 3) * L(3, 2)) + (Linv(5, 4) * L(4, 2)) + (Linv(5, 5) * L(5, 2)) + 0);
270 Linv(5, 1) = - Linv(1, 1) * ((Linv(5, 2) * L(2, 1)) + (Linv(5, 3) * L(3, 1)) + (Linv(5, 4) * L(4, 1)) + (Linv(5, 5) * L(5, 1)) + 0);
271 Linv(5, 0) = - Linv(0, 0) * ((Linv(5, 1) * L(1, 0)) + (Linv(5, 2) * L(2, 0)) + (Linv(5, 3) * L(3, 0)) + (Linv(5, 4) * L(4, 0)) + (Linv(5, 5) * L(5, 0)) + 0);
const IMatrix & getTensor_Wrist_R() const
Definition: inertia_properties.h:93
iit::ct_HyA::tpl::ForceTransforms< TRAIT > FTransforms
Definition: jsim.h:35
void computeLInverse()
Definition: jsim.impl.h:249
Definition: declarations.h:27
void computeInverse()
Definition: jsim.impl.h:207
Definition: declarations.h:30
const IMatrix & getTensor_Elbow_FE() const
Definition: inertia_properties.h:89
const IMatrix & getTensor_Shoulder_FE() const
Definition: inertia_properties.h:81
#define F(i, j)
Definition: jsim.impl.h:19
const JSIM & update(const JointState &)
Definition: jsim.impl.h:17
const IMatrix & getTensor_Humerus_R() const
Definition: inertia_properties.h:85
JSIM(IProperties &, FTransforms &)
Definition: jsim.impl.h:5
Definition: declarations.h:29
#define DATA
Definition: jsim.impl.h:14
void transformInertia(const InertiaMat< Scalar > &I_A, const Mat66< Scalar > &XF, InertiaMat< Scalar > &I_B)
Definition: declarations.h:31
iit::ct_HyA::tpl::JointState< SCALAR > JointState
Definition: jsim.h:37
Definition: declarations.h:28
void computeL()
Definition: jsim.impl.h:134
Definition: declarations.h:32
const IMatrix & getTensor_Shoulder_AA() const
Definition: inertia_properties.h:77
iit::rbd::Core< SCALAR >::ForceVector ForceVector
Definition: jsim.h:38
Definition: inertia_properties.h:26