4 template<
typename TRAIT>
6 linkInertias(inertiaProperties),
7 frcTransf( &forceTransforms ),
8 link6_Ic(linkInertias.getTensor_link6())
14 #define DATA tpl::JSIM<TRAIT>::operator() 16 template <
typename TRAIT>
21 frcTransf -> fr_link5_X_fr_link6(state);
22 frcTransf -> fr_link4_X_fr_link5(state);
23 frcTransf -> fr_link3_X_fr_link4(state);
24 frcTransf -> fr_link2_X_fr_link3(state);
25 frcTransf -> fr_link1_X_fr_link2(state);
43 F = frcTransf -> fr_link5_X_fr_link6 *
F;
46 F = frcTransf -> fr_link4_X_fr_link5 *
F;
49 F = frcTransf -> fr_link3_X_fr_link4 *
F;
52 F = frcTransf -> fr_link2_X_fr_link3 *
F;
55 F = frcTransf -> fr_link1_X_fr_link2 *
F;
66 F = frcTransf -> fr_link4_X_fr_link5 *
F;
69 F = frcTransf -> fr_link3_X_fr_link4 *
F;
72 F = frcTransf -> fr_link2_X_fr_link3 *
F;
75 F = frcTransf -> fr_link1_X_fr_link2 *
F;
86 F = frcTransf -> fr_link3_X_fr_link4 *
F;
89 F = frcTransf -> fr_link2_X_fr_link3 *
F;
92 F = frcTransf -> fr_link1_X_fr_link2 *
F;
103 F = frcTransf -> fr_link2_X_fr_link3 *
F;
106 F = frcTransf -> fr_link1_X_fr_link2 *
F;
112 link1_Ic += Ic_spare;
117 F = frcTransf -> fr_link1_X_fr_link2 *
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_link5() const
Definition: inertia_properties.h:92
Definition: declarations.h:27
Definition: declarations.h:31
iit::testirb4600::tpl::ForceTransforms< TRAIT > FTransforms
Definition: jsim.h:35
Cored::ForceVector ForceVector
Definition: rbd.h:143
#define F(i, j)
Definition: jsim.impl.h:19
Definition: inertia_properties.h:25
#define DATA
Definition: jsim.impl.h:14
const JSIM & update(const iit::testirb4600::JointState &)
Definition: jsim.impl.h:17
void transformInertia(const InertiaMat< Scalar > &I_A, const Mat66< Scalar > &XF, InertiaMat< Scalar > &I_B)
Definition: robcogen_commons.h:218
void computeInverse()
Definition: jsim.impl.h:207
void computeL()
Definition: jsim.impl.h:134
Definition: declarations.h:30
Definition: declarations.h:26
Definition: declarations.h:29
void computeLInverse()
Definition: jsim.impl.h:249
const IMatrix & getTensor_link4() const
Definition: inertia_properties.h:88
const IMatrix & getTensor_link3() const
Definition: inertia_properties.h:84
Definition: declarations.h:28
JSIM(IProperties &, FTransforms &)
Definition: jsim.impl.h:5
const IMatrix & getTensor_link1() const
Definition: inertia_properties.h:76
Column6d JointState
Definition: declarations.h:23
const IMatrix & getTensor_link2() const
Definition: inertia_properties.h:80