2 template <
typename TRAIT>
6 template <
typename TRAIT>
8 inertiaProps( & inertia ),
10 LF_hipassembly_I(inertiaProps->getTensor_LF_hipassembly() ),
11 LF_upperleg_I(inertiaProps->getTensor_LF_upperleg() ),
12 LF_lowerleg_I(inertiaProps->getTensor_LF_lowerleg() ),
13 RF_hipassembly_I(inertiaProps->getTensor_RF_hipassembly() ),
14 RF_upperleg_I(inertiaProps->getTensor_RF_upperleg() ),
15 RF_lowerleg_I(inertiaProps->getTensor_RF_lowerleg() ),
16 LH_hipassembly_I(inertiaProps->getTensor_LH_hipassembly() ),
17 LH_upperleg_I(inertiaProps->getTensor_LH_upperleg() ),
18 LH_lowerleg_I(inertiaProps->getTensor_LH_lowerleg() ),
19 RH_hipassembly_I(inertiaProps->getTensor_RH_hipassembly() ),
20 RH_upperleg_I(inertiaProps->getTensor_RH_upperleg() ),
21 RH_lowerleg_I(inertiaProps->getTensor_RH_lowerleg() )
23 trunk_I( inertiaProps->getTensor_trunk() ),
24 LF_lowerleg_Ic(LF_lowerleg_I),
25 RF_lowerleg_Ic(RF_lowerleg_I),
26 LH_lowerleg_Ic(LH_lowerleg_I),
27 RH_lowerleg_Ic(RH_lowerleg_I)
29 #ifndef EIGEN_NO_DEBUG 30 std::cout <<
"Robot TestHyQ, InverseDynamics<TRAIT>::InverseDynamics()" << std::endl;
31 std::cout <<
"Compiled with Eigen debug active" << std::endl;
33 LF_hipassembly_v.setZero();
34 LF_upperleg_v.setZero();
35 LF_lowerleg_v.setZero();
36 RF_hipassembly_v.setZero();
37 RF_upperleg_v.setZero();
38 RF_lowerleg_v.setZero();
39 LH_hipassembly_v.setZero();
40 LH_upperleg_v.setZero();
41 LH_lowerleg_v.setZero();
42 RH_hipassembly_v.setZero();
43 RH_upperleg_v.setZero();
44 RH_lowerleg_v.setZero();
49 template <
typename TRAIT>
57 LF_hipassembly_Ic = LF_hipassembly_I;
58 LF_upperleg_Ic = LF_upperleg_I;
59 RF_hipassembly_Ic = RF_hipassembly_I;
60 RF_upperleg_Ic = RF_upperleg_I;
61 LH_hipassembly_Ic = LH_hipassembly_I;
62 LH_upperleg_Ic = LH_upperleg_I;
63 RH_hipassembly_Ic = RH_hipassembly_I;
64 RH_upperleg_Ic = RH_upperleg_I;
67 LF_hipassembly_v = ((xm->fr_LF_hipassembly_X_fr_trunk) * trunk_v);
70 iit::rbd::motionCrossProductMx<Scalar>(LF_hipassembly_v, vcross);
75 LF_hipassembly_f = LF_hipassembly_I * LF_hipassembly_a +
iit::rbd::vxIv(LF_hipassembly_v, LF_hipassembly_I);
78 LF_upperleg_v = ((xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_v);
81 iit::rbd::motionCrossProductMx<Scalar>(LF_upperleg_v, vcross);
83 LF_upperleg_a = (xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LF_HFE);
86 LF_upperleg_f = LF_upperleg_I * LF_upperleg_a +
iit::rbd::vxIv(LF_upperleg_v, LF_upperleg_I);
89 LF_lowerleg_v = ((xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_v);
92 iit::rbd::motionCrossProductMx<Scalar>(LF_lowerleg_v, vcross);
94 LF_lowerleg_a = (xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LF_KFE);
97 LF_lowerleg_f = LF_lowerleg_I * LF_lowerleg_a +
iit::rbd::vxIv(LF_lowerleg_v, LF_lowerleg_I);
100 RF_hipassembly_v = ((xm->fr_RF_hipassembly_X_fr_trunk) * trunk_v);
103 iit::rbd::motionCrossProductMx<Scalar>(RF_hipassembly_v, vcross);
108 RF_hipassembly_f = RF_hipassembly_I * RF_hipassembly_a +
iit::rbd::vxIv(RF_hipassembly_v, RF_hipassembly_I);
111 RF_upperleg_v = ((xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_v);
114 iit::rbd::motionCrossProductMx<Scalar>(RF_upperleg_v, vcross);
116 RF_upperleg_a = (xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RF_HFE);
119 RF_upperleg_f = RF_upperleg_I * RF_upperleg_a +
iit::rbd::vxIv(RF_upperleg_v, RF_upperleg_I);
122 RF_lowerleg_v = ((xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_v);
125 iit::rbd::motionCrossProductMx<Scalar>(RF_lowerleg_v, vcross);
127 RF_lowerleg_a = (xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RF_KFE);
130 RF_lowerleg_f = RF_lowerleg_I * RF_lowerleg_a +
iit::rbd::vxIv(RF_lowerleg_v, RF_lowerleg_I);
133 LH_hipassembly_v = ((xm->fr_LH_hipassembly_X_fr_trunk) * trunk_v);
136 iit::rbd::motionCrossProductMx<Scalar>(LH_hipassembly_v, vcross);
141 LH_hipassembly_f = LH_hipassembly_I * LH_hipassembly_a +
iit::rbd::vxIv(LH_hipassembly_v, LH_hipassembly_I);
144 LH_upperleg_v = ((xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_v);
147 iit::rbd::motionCrossProductMx<Scalar>(LH_upperleg_v, vcross);
149 LH_upperleg_a = (xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LH_HFE);
152 LH_upperleg_f = LH_upperleg_I * LH_upperleg_a +
iit::rbd::vxIv(LH_upperleg_v, LH_upperleg_I);
155 LH_lowerleg_v = ((xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_v);
158 iit::rbd::motionCrossProductMx<Scalar>(LH_lowerleg_v, vcross);
160 LH_lowerleg_a = (xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LH_KFE);
163 LH_lowerleg_f = LH_lowerleg_I * LH_lowerleg_a +
iit::rbd::vxIv(LH_lowerleg_v, LH_lowerleg_I);
166 RH_hipassembly_v = ((xm->fr_RH_hipassembly_X_fr_trunk) * trunk_v);
169 iit::rbd::motionCrossProductMx<Scalar>(RH_hipassembly_v, vcross);
174 RH_hipassembly_f = RH_hipassembly_I * RH_hipassembly_a +
iit::rbd::vxIv(RH_hipassembly_v, RH_hipassembly_I);
177 RH_upperleg_v = ((xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_v);
180 iit::rbd::motionCrossProductMx<Scalar>(RH_upperleg_v, vcross);
182 RH_upperleg_a = (xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RH_HFE);
185 RH_upperleg_f = RH_upperleg_I * RH_upperleg_a +
iit::rbd::vxIv(RH_upperleg_v, RH_upperleg_I);
188 RH_lowerleg_v = ((xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_v);
191 iit::rbd::motionCrossProductMx<Scalar>(RH_lowerleg_v, vcross);
193 RH_lowerleg_a = (xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RH_KFE);
196 RH_lowerleg_f = RH_lowerleg_I * RH_lowerleg_a +
iit::rbd::vxIv(RH_lowerleg_v, RH_lowerleg_I);
203 trunk_f -= fext[
TRUNK];
217 RH_upperleg_Ic = RH_upperleg_Ic + (xm->fr_RH_lowerleg_X_fr_RH_upperleg).transpose() * RH_lowerleg_Ic * (xm->fr_RH_lowerleg_X_fr_RH_upperleg);
218 RH_upperleg_f = RH_upperleg_f + (xm->fr_RH_lowerleg_X_fr_RH_upperleg).transpose() * RH_lowerleg_f;
220 RH_hipassembly_Ic = RH_hipassembly_Ic + (xm->fr_RH_upperleg_X_fr_RH_hipassembly).transpose() * RH_upperleg_Ic * (xm->fr_RH_upperleg_X_fr_RH_hipassembly);
221 RH_hipassembly_f = RH_hipassembly_f + (xm->fr_RH_upperleg_X_fr_RH_hipassembly).transpose() * RH_upperleg_f;
223 trunk_Ic = trunk_Ic + (xm->fr_RH_hipassembly_X_fr_trunk).transpose() * RH_hipassembly_Ic * (xm->fr_RH_hipassembly_X_fr_trunk);
224 trunk_f = trunk_f + (xm->fr_RH_hipassembly_X_fr_trunk).transpose() * RH_hipassembly_f;
226 LH_upperleg_Ic = LH_upperleg_Ic + (xm->fr_LH_lowerleg_X_fr_LH_upperleg).transpose() * LH_lowerleg_Ic * (xm->fr_LH_lowerleg_X_fr_LH_upperleg);
227 LH_upperleg_f = LH_upperleg_f + (xm->fr_LH_lowerleg_X_fr_LH_upperleg).transpose() * LH_lowerleg_f;
229 LH_hipassembly_Ic = LH_hipassembly_Ic + (xm->fr_LH_upperleg_X_fr_LH_hipassembly).transpose() * LH_upperleg_Ic * (xm->fr_LH_upperleg_X_fr_LH_hipassembly);
230 LH_hipassembly_f = LH_hipassembly_f + (xm->fr_LH_upperleg_X_fr_LH_hipassembly).transpose() * LH_upperleg_f;
232 trunk_Ic = trunk_Ic + (xm->fr_LH_hipassembly_X_fr_trunk).transpose() * LH_hipassembly_Ic * (xm->fr_LH_hipassembly_X_fr_trunk);
233 trunk_f = trunk_f + (xm->fr_LH_hipassembly_X_fr_trunk).transpose() * LH_hipassembly_f;
235 RF_upperleg_Ic = RF_upperleg_Ic + (xm->fr_RF_lowerleg_X_fr_RF_upperleg).transpose() * RF_lowerleg_Ic * (xm->fr_RF_lowerleg_X_fr_RF_upperleg);
236 RF_upperleg_f = RF_upperleg_f + (xm->fr_RF_lowerleg_X_fr_RF_upperleg).transpose() * RF_lowerleg_f;
238 RF_hipassembly_Ic = RF_hipassembly_Ic + (xm->fr_RF_upperleg_X_fr_RF_hipassembly).transpose() * RF_upperleg_Ic * (xm->fr_RF_upperleg_X_fr_RF_hipassembly);
239 RF_hipassembly_f = RF_hipassembly_f + (xm->fr_RF_upperleg_X_fr_RF_hipassembly).transpose() * RF_upperleg_f;
241 trunk_Ic = trunk_Ic + (xm->fr_RF_hipassembly_X_fr_trunk).transpose() * RF_hipassembly_Ic * (xm->fr_RF_hipassembly_X_fr_trunk);
242 trunk_f = trunk_f + (xm->fr_RF_hipassembly_X_fr_trunk).transpose() * RF_hipassembly_f;
244 LF_upperleg_Ic = LF_upperleg_Ic + (xm->fr_LF_lowerleg_X_fr_LF_upperleg).transpose() * LF_lowerleg_Ic * (xm->fr_LF_lowerleg_X_fr_LF_upperleg);
245 LF_upperleg_f = LF_upperleg_f + (xm->fr_LF_lowerleg_X_fr_LF_upperleg).transpose() * LF_lowerleg_f;
247 LF_hipassembly_Ic = LF_hipassembly_Ic + (xm->fr_LF_upperleg_X_fr_LF_hipassembly).transpose() * LF_upperleg_Ic * (xm->fr_LF_upperleg_X_fr_LF_hipassembly);
248 LF_hipassembly_f = LF_hipassembly_f + (xm->fr_LF_upperleg_X_fr_LF_hipassembly).transpose() * LF_upperleg_f;
250 trunk_Ic = trunk_Ic + (xm->fr_LF_hipassembly_X_fr_trunk).transpose() * LF_hipassembly_Ic * (xm->fr_LF_hipassembly_X_fr_trunk);
251 trunk_f = trunk_f + (xm->fr_LF_hipassembly_X_fr_trunk).transpose() * LF_hipassembly_f;
255 trunk_a = - trunk_Ic.inverse() * trunk_f;
257 LF_hipassembly_a = xm->fr_LF_hipassembly_X_fr_trunk * trunk_a;
260 LF_upperleg_a = xm->fr_LF_upperleg_X_fr_LF_hipassembly * LF_hipassembly_a;
263 LF_lowerleg_a = xm->fr_LF_lowerleg_X_fr_LF_upperleg * LF_upperleg_a;
266 RF_hipassembly_a = xm->fr_RF_hipassembly_X_fr_trunk * trunk_a;
269 RF_upperleg_a = xm->fr_RF_upperleg_X_fr_RF_hipassembly * RF_hipassembly_a;
272 RF_lowerleg_a = xm->fr_RF_lowerleg_X_fr_RF_upperleg * RF_upperleg_a;
275 LH_hipassembly_a = xm->fr_LH_hipassembly_X_fr_trunk * trunk_a;
278 LH_upperleg_a = xm->fr_LH_upperleg_X_fr_LH_hipassembly * LH_hipassembly_a;
281 LH_lowerleg_a = xm->fr_LH_lowerleg_X_fr_LH_upperleg * LH_upperleg_a;
284 RH_hipassembly_a = xm->fr_RH_hipassembly_X_fr_trunk * trunk_a;
287 RH_upperleg_a = xm->fr_RH_upperleg_X_fr_RH_hipassembly * RH_hipassembly_a;
290 RH_lowerleg_a = xm->fr_RH_lowerleg_X_fr_RH_upperleg * RH_upperleg_a;
297 template <
typename TRAIT>
305 LF_hipassembly_a = (xm->fr_LF_hipassembly_X_fr_trunk) * trunk_a;
306 LF_hipassembly_f = LF_hipassembly_I * LF_hipassembly_a;
308 LF_upperleg_a = (xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_a;
309 LF_upperleg_f = LF_upperleg_I * LF_upperleg_a;
311 LF_lowerleg_a = (xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_a;
312 LF_lowerleg_f = LF_lowerleg_I * LF_lowerleg_a;
314 RF_hipassembly_a = (xm->fr_RF_hipassembly_X_fr_trunk) * trunk_a;
315 RF_hipassembly_f = RF_hipassembly_I * RF_hipassembly_a;
317 RF_upperleg_a = (xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_a;
318 RF_upperleg_f = RF_upperleg_I * RF_upperleg_a;
320 RF_lowerleg_a = (xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_a;
321 RF_lowerleg_f = RF_lowerleg_I * RF_lowerleg_a;
323 LH_hipassembly_a = (xm->fr_LH_hipassembly_X_fr_trunk) * trunk_a;
324 LH_hipassembly_f = LH_hipassembly_I * LH_hipassembly_a;
326 LH_upperleg_a = (xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_a;
327 LH_upperleg_f = LH_upperleg_I * LH_upperleg_a;
329 LH_lowerleg_a = (xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_a;
330 LH_lowerleg_f = LH_lowerleg_I * LH_lowerleg_a;
332 RH_hipassembly_a = (xm->fr_RH_hipassembly_X_fr_trunk) * trunk_a;
333 RH_hipassembly_f = RH_hipassembly_I * RH_hipassembly_a;
335 RH_upperleg_a = (xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_a;
336 RH_upperleg_f = RH_upperleg_I * RH_upperleg_a;
338 RH_lowerleg_a = (xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_a;
339 RH_lowerleg_f = RH_lowerleg_I * RH_lowerleg_a;
341 trunk_f = trunk_I * trunk_a;
345 baseWrench = trunk_f;
348 template <
typename TRAIT>
354 LF_hipassembly_v = ((xm->fr_LF_hipassembly_X_fr_trunk) * trunk_v);
356 iit::rbd::motionCrossProductMx<Scalar>(LF_hipassembly_v, vcross);
358 LF_hipassembly_f = LF_hipassembly_I * LF_hipassembly_a +
iit::rbd::vxIv(LF_hipassembly_v, LF_hipassembly_I);
361 LF_upperleg_v = ((xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_v);
363 iit::rbd::motionCrossProductMx<Scalar>(LF_upperleg_v, vcross);
364 LF_upperleg_a = (xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LF_HFE);
365 LF_upperleg_f = LF_upperleg_I * LF_upperleg_a +
iit::rbd::vxIv(LF_upperleg_v, LF_upperleg_I);
368 LF_lowerleg_v = ((xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_v);
370 iit::rbd::motionCrossProductMx<Scalar>(LF_lowerleg_v, vcross);
371 LF_lowerleg_a = (xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LF_KFE);
372 LF_lowerleg_f = LF_lowerleg_I * LF_lowerleg_a +
iit::rbd::vxIv(LF_lowerleg_v, LF_lowerleg_I);
375 RF_hipassembly_v = ((xm->fr_RF_hipassembly_X_fr_trunk) * trunk_v);
377 iit::rbd::motionCrossProductMx<Scalar>(RF_hipassembly_v, vcross);
379 RF_hipassembly_f = RF_hipassembly_I * RF_hipassembly_a +
iit::rbd::vxIv(RF_hipassembly_v, RF_hipassembly_I);
382 RF_upperleg_v = ((xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_v);
384 iit::rbd::motionCrossProductMx<Scalar>(RF_upperleg_v, vcross);
385 RF_upperleg_a = (xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RF_HFE);
386 RF_upperleg_f = RF_upperleg_I * RF_upperleg_a +
iit::rbd::vxIv(RF_upperleg_v, RF_upperleg_I);
389 RF_lowerleg_v = ((xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_v);
391 iit::rbd::motionCrossProductMx<Scalar>(RF_lowerleg_v, vcross);
392 RF_lowerleg_a = (xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RF_KFE);
393 RF_lowerleg_f = RF_lowerleg_I * RF_lowerleg_a +
iit::rbd::vxIv(RF_lowerleg_v, RF_lowerleg_I);
396 LH_hipassembly_v = ((xm->fr_LH_hipassembly_X_fr_trunk) * trunk_v);
398 iit::rbd::motionCrossProductMx<Scalar>(LH_hipassembly_v, vcross);
400 LH_hipassembly_f = LH_hipassembly_I * LH_hipassembly_a +
iit::rbd::vxIv(LH_hipassembly_v, LH_hipassembly_I);
403 LH_upperleg_v = ((xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_v);
405 iit::rbd::motionCrossProductMx<Scalar>(LH_upperleg_v, vcross);
406 LH_upperleg_a = (xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LH_HFE);
407 LH_upperleg_f = LH_upperleg_I * LH_upperleg_a +
iit::rbd::vxIv(LH_upperleg_v, LH_upperleg_I);
410 LH_lowerleg_v = ((xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_v);
412 iit::rbd::motionCrossProductMx<Scalar>(LH_lowerleg_v, vcross);
413 LH_lowerleg_a = (xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LH_KFE);
414 LH_lowerleg_f = LH_lowerleg_I * LH_lowerleg_a +
iit::rbd::vxIv(LH_lowerleg_v, LH_lowerleg_I);
417 RH_hipassembly_v = ((xm->fr_RH_hipassembly_X_fr_trunk) * trunk_v);
419 iit::rbd::motionCrossProductMx<Scalar>(RH_hipassembly_v, vcross);
421 RH_hipassembly_f = RH_hipassembly_I * RH_hipassembly_a +
iit::rbd::vxIv(RH_hipassembly_v, RH_hipassembly_I);
424 RH_upperleg_v = ((xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_v);
426 iit::rbd::motionCrossProductMx<Scalar>(RH_upperleg_v, vcross);
427 RH_upperleg_a = (xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RH_HFE);
428 RH_upperleg_f = RH_upperleg_I * RH_upperleg_a +
iit::rbd::vxIv(RH_upperleg_v, RH_upperleg_I);
431 RH_lowerleg_v = ((xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_v);
433 iit::rbd::motionCrossProductMx<Scalar>(RH_lowerleg_v, vcross);
434 RH_lowerleg_a = (xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RH_KFE);
435 RH_lowerleg_f = RH_lowerleg_I * RH_lowerleg_a +
iit::rbd::vxIv(RH_lowerleg_v, RH_lowerleg_I);
442 baseWrench = trunk_f;
445 template <
typename TRAIT>
454 LF_hipassembly_v = ((xm->fr_LF_hipassembly_X_fr_trunk) * trunk_v);
457 iit::rbd::motionCrossProductMx<Scalar>(LF_hipassembly_v, vcross);
459 LF_hipassembly_a = (xm->fr_LF_hipassembly_X_fr_trunk) * trunk_a + vcross.col(
iit::rbd::AZ) * qd(
LF_HAA);
465 LF_upperleg_v = ((xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_v);
468 iit::rbd::motionCrossProductMx<Scalar>(LF_upperleg_v, vcross);
470 LF_upperleg_a = (xm->fr_LF_upperleg_X_fr_LF_hipassembly) * LF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LF_HFE);
476 LF_lowerleg_v = ((xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_v);
479 iit::rbd::motionCrossProductMx<Scalar>(LF_lowerleg_v, vcross);
481 LF_lowerleg_a = (xm->fr_LF_lowerleg_X_fr_LF_upperleg) * LF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LF_KFE);
487 RF_hipassembly_v = ((xm->fr_RF_hipassembly_X_fr_trunk) * trunk_v);
490 iit::rbd::motionCrossProductMx<Scalar>(RF_hipassembly_v, vcross);
492 RF_hipassembly_a = (xm->fr_RF_hipassembly_X_fr_trunk) * trunk_a + vcross.col(
iit::rbd::AZ) * qd(
RF_HAA);
498 RF_upperleg_v = ((xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_v);
501 iit::rbd::motionCrossProductMx<Scalar>(RF_upperleg_v, vcross);
503 RF_upperleg_a = (xm->fr_RF_upperleg_X_fr_RF_hipassembly) * RF_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RF_HFE);
509 RF_lowerleg_v = ((xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_v);
512 iit::rbd::motionCrossProductMx<Scalar>(RF_lowerleg_v, vcross);
514 RF_lowerleg_a = (xm->fr_RF_lowerleg_X_fr_RF_upperleg) * RF_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RF_KFE);
520 LH_hipassembly_v = ((xm->fr_LH_hipassembly_X_fr_trunk) * trunk_v);
523 iit::rbd::motionCrossProductMx<Scalar>(LH_hipassembly_v, vcross);
525 LH_hipassembly_a = (xm->fr_LH_hipassembly_X_fr_trunk) * trunk_a + vcross.col(
iit::rbd::AZ) * qd(
LH_HAA);
531 LH_upperleg_v = ((xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_v);
534 iit::rbd::motionCrossProductMx<Scalar>(LH_upperleg_v, vcross);
536 LH_upperleg_a = (xm->fr_LH_upperleg_X_fr_LH_hipassembly) * LH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
LH_HFE);
542 LH_lowerleg_v = ((xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_v);
545 iit::rbd::motionCrossProductMx<Scalar>(LH_lowerleg_v, vcross);
547 LH_lowerleg_a = (xm->fr_LH_lowerleg_X_fr_LH_upperleg) * LH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
LH_KFE);
553 RH_hipassembly_v = ((xm->fr_RH_hipassembly_X_fr_trunk) * trunk_v);
556 iit::rbd::motionCrossProductMx<Scalar>(RH_hipassembly_v, vcross);
558 RH_hipassembly_a = (xm->fr_RH_hipassembly_X_fr_trunk) * trunk_a + vcross.col(
iit::rbd::AZ) * qd(
RH_HAA);
564 RH_upperleg_v = ((xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_v);
567 iit::rbd::motionCrossProductMx<Scalar>(RH_upperleg_v, vcross);
569 RH_upperleg_a = (xm->fr_RH_upperleg_X_fr_RH_hipassembly) * RH_hipassembly_a + vcross.col(
iit::rbd::AZ) * qd(
RH_HFE);
575 RH_lowerleg_v = ((xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_v);
578 iit::rbd::motionCrossProductMx<Scalar>(RH_lowerleg_v, vcross);
580 RH_lowerleg_a = (xm->fr_RH_lowerleg_X_fr_RH_upperleg) * RH_upperleg_a + vcross.col(
iit::rbd::AZ) * qd(
RH_KFE);
591 baseWrench = trunk_f;
594 template <
typename TRAIT>
599 RH_upperleg_f += xm->fr_RH_lowerleg_X_fr_RH_upperleg.transpose() * RH_lowerleg_f;
602 RH_hipassembly_f += xm->fr_RH_upperleg_X_fr_RH_hipassembly.transpose() * RH_upperleg_f;
605 trunk_f += xm->fr_RH_hipassembly_X_fr_trunk.transpose() * RH_hipassembly_f;
608 LH_upperleg_f += xm->fr_LH_lowerleg_X_fr_LH_upperleg.transpose() * LH_lowerleg_f;
611 LH_hipassembly_f += xm->fr_LH_upperleg_X_fr_LH_hipassembly.transpose() * LH_upperleg_f;
614 trunk_f += xm->fr_LH_hipassembly_X_fr_trunk.transpose() * LH_hipassembly_f;
617 RF_upperleg_f += xm->fr_RF_lowerleg_X_fr_RF_upperleg.transpose() * RF_lowerleg_f;
620 RF_hipassembly_f += xm->fr_RF_upperleg_X_fr_RF_hipassembly.transpose() * RF_upperleg_f;
623 trunk_f += xm->fr_RF_hipassembly_X_fr_trunk.transpose() * RF_hipassembly_f;
626 LF_upperleg_f += xm->fr_LF_lowerleg_X_fr_LF_upperleg.transpose() * LF_lowerleg_f;
629 LF_hipassembly_f += xm->fr_LF_upperleg_X_fr_LF_hipassembly.transpose() * LF_upperleg_f;
632 trunk_f += xm->fr_LF_hipassembly_X_fr_trunk.transpose() * LF_hipassembly_f;
Definition: declarations.h:50
Definition: declarations.h:43
Definition: declarations.h:51
void C_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Velocity &trunk_v, const JointState &q, const JointState &qd)
Definition: inverse_dynamics.h:343
void secondPass_fullyActuated(JointState &jForces)
Definition: inverse_dynamics.impl.h:595
Definition: declarations.h:37
CoreS::VelocityVector Velocity
Definition: inverse_dynamics.h:51
Definition: declarations.h:28
Definition: inverse_dynamics.h:41
Definition: declarations.h:33
Definition: declarations.h:42
Definition: declarations.h:32
void G_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Acceleration &g, const JointState &q)
Definition: inverse_dynamics.h:334
Definition: declarations.h:46
Definition: declarations.h:49
Definition: declarations.h:41
Force< DScalar > vxIv(const Velocity< DScalar > &v, const MatrixBase< Derived > &I)
Definition: robcogen_commons.h:58
CoreS::VelocityVector Acceleration
Definition: inverse_dynamics.h:52
Definition: declarations.h:34
Definition: declarations.h:47
Definition: declarations.h:45
Definition: declarations.h:31
Definition: declarations.h:27
Definition: inertia_properties.h:24
Definition: link_data_map.h:12
iit::TestHyQ::tpl::JointState< Scalar > JointState
Definition: inverse_dynamics.h:54
Definition: declarations.h:29
Definition: declarations.h:52
Definition: declarations.h:44
void id_fully_actuated(Force &baseWrench, JointState &jForces, const Acceleration &g, const Velocity &trunk_v, const Acceleration &baseAccel, const JointState &q, const JointState &qd, const JointState &qdd, const ExtForces &fext=zeroExtForces)
Definition: inverse_dynamics.h:352
Definition: declarations.h:53
Definition: declarations.h:30
Definition: declarations.h:26
Definition: declarations.h:36
void id(JointState &jForces, Acceleration &trunk_a, const Acceleration &g, const Velocity &trunk_v, const JointState &q, const JointState &qd, const JointState &qdd, const ExtForces &fext=zeroExtForces)
Definition: inverse_dynamics.h:322
CoreS::ForceVector Force
Definition: inverse_dynamics.h:49
InverseDynamics(IProperties &in, MTransforms &tr)
Definition: inverse_dynamics.impl.h:7
iit::TestHyQ::tpl::MotionTransforms< TRAIT > MTransforms
Definition: inverse_dynamics.h:56
Definition: declarations.h:35
Definition: declarations.h:48