3 template <
typename TRAIT>
7 template <
typename TRAIT>
9 inertiaProps( & inertia ),
11 link1_I(inertiaProps->getTensor_link1() ),
12 link2_I(inertiaProps->getTensor_link2() ),
13 link3_I(inertiaProps->getTensor_link3() ),
14 link4_I(inertiaProps->getTensor_link4() ),
15 link5_I(inertiaProps->getTensor_link5() ),
16 link6_I(inertiaProps->getTensor_link6() )
18 #ifndef EIGEN_NO_DEBUG 19 std::cout <<
"Robot testirb4600, InverseDynamics<TRAIT>::InverseDynamics()" << std::endl;
20 std::cout <<
"Compiled with Eigen debug active" << std::endl;
32 template <
typename TRAIT>
42 template <
typename TRAIT>
47 link1_f = link1_I * link1_a;
49 link2_a = (xm->fr_link2_X_fr_link1) * link1_a;
50 link2_f = link2_I * link2_a;
52 link3_a = (xm->fr_link3_X_fr_link2) * link2_a;
53 link3_f = link3_I * link3_a;
55 link4_a = (xm->fr_link4_X_fr_link3) * link3_a;
56 link4_f = link4_I * link4_a;
58 link5_a = (xm->fr_link5_X_fr_link4) * link4_a;
59 link5_f = link5_I * link5_a;
61 link6_a = (xm->fr_link6_X_fr_link5) * link5_a;
62 link6_f = link6_I * link6_a;
67 template <
typename TRAIT>
76 link2_v = ((xm->fr_link2_X_fr_link1) * link1_v);
79 iit::rbd::motionCrossProductMx<SCALAR>(link2_v, vcross);
86 link3_v = ((xm->fr_link3_X_fr_link2) * link2_v);
89 iit::rbd::motionCrossProductMx<SCALAR>(link3_v, vcross);
91 link3_a = (xm->fr_link3_X_fr_link2) * link2_a + vcross.col(
iit::rbd::AZ) * qd(
JC);
96 link4_v = ((xm->fr_link4_X_fr_link3) * link3_v);
99 iit::rbd::motionCrossProductMx<SCALAR>(link4_v, vcross);
101 link4_a = (xm->fr_link4_X_fr_link3) * link3_a + vcross.col(
iit::rbd::AZ) * qd(
JD);
106 link5_v = ((xm->fr_link5_X_fr_link4) * link4_v);
109 iit::rbd::motionCrossProductMx<SCALAR>(link5_v, vcross);
111 link5_a = (xm->fr_link5_X_fr_link4) * link4_a + vcross.col(
iit::rbd::AZ) * qd(
JE);
116 link6_v = ((xm->fr_link6_X_fr_link5) * link5_v);
119 iit::rbd::motionCrossProductMx<SCALAR>(link6_v, vcross);
121 link6_a = (xm->fr_link6_X_fr_link5) * link5_a + vcross.col(
iit::rbd::AZ) * qd(
JF);
129 template <
typename TRAIT>
140 link2_v = ((xm->fr_link2_X_fr_link1) * link1_v);
143 iit::rbd::motionCrossProductMx<SCALAR>(link2_v, vcross);
145 link2_a = (xm->fr_link2_X_fr_link1) * link1_a + vcross.col(
iit::rbd::AZ) * qd(
JB);
151 link3_v = ((xm->fr_link3_X_fr_link2) * link2_v);
154 iit::rbd::motionCrossProductMx<SCALAR>(link3_v, vcross);
156 link3_a = (xm->fr_link3_X_fr_link2) * link2_a + vcross.col(
iit::rbd::AZ) * qd(
JC);
162 link4_v = ((xm->fr_link4_X_fr_link3) * link3_v);
165 iit::rbd::motionCrossProductMx<SCALAR>(link4_v, vcross);
167 link4_a = (xm->fr_link4_X_fr_link3) * link3_a + vcross.col(
iit::rbd::AZ) * qd(
JD);
173 link5_v = ((xm->fr_link5_X_fr_link4) * link4_v);
176 iit::rbd::motionCrossProductMx<SCALAR>(link5_v, vcross);
178 link5_a = (xm->fr_link5_X_fr_link4) * link4_a + vcross.col(
iit::rbd::AZ) * qd(
JE);
184 link6_v = ((xm->fr_link6_X_fr_link5) * link5_v);
187 iit::rbd::motionCrossProductMx<SCALAR>(link6_v, vcross);
189 link6_a = (xm->fr_link6_X_fr_link5) * link5_a + vcross.col(
iit::rbd::AZ) * qd(
JF);
196 template <
typename TRAIT>
201 link5_f += xm->fr_link6_X_fr_link5.transpose() * link6_f;
204 link4_f += xm->fr_link5_X_fr_link4.transpose() * link5_f;
207 link3_f += xm->fr_link4_X_fr_link3.transpose() * link4_f;
210 link2_f += xm->fr_link3_X_fr_link2.transpose() * link3_f;
213 link1_f += xm->fr_link2_X_fr_link1.transpose() * link2_f;
InverseDynamics(IProperties &in, MTransforms &tr)
Definition: inverse_dynamics.impl.h:8
Definition: declarations.h:38
Definition: declarations.h:37
Definition: inverse_dynamics.h:42
iit::testirb4600::tpl::JointState< SCALAR > JointState
Definition: inverse_dynamics.h:55
void firstPass(const JointState &qd, const JointState &qdd, const ExtForces &fext)
Definition: inverse_dynamics.impl.h:130
Definition: declarations.h:27
Definition: declarations.h:31
Force< DScalar > vxIv(const Velocity< DScalar > &v, const MatrixBase< Derived > &I)
Definition: robcogen_commons.h:58
Definition: inertia_properties.h:25
Definition: declarations.h:40
void id(JointState &jForces, const JointState &q, const JointState &qd, const JointState &qdd, const ExtForces &fext=zeroExtForces)
Definition: inverse_dynamics.h:219
Definition: link_data_map.h:12
void G_terms(JointState &jForces, const JointState &q)
Definition: inverse_dynamics.h:205
iit::testirb4600::tpl::MotionTransforms< TRAIT > MTransforms
Definition: inverse_dynamics.h:57
Definition: declarations.h:36
Definition: declarations.h:30
Definition: declarations.h:26
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar SCALAR
Definition: inverse_dynamics.h:46
Definition: declarations.h:29
Definition: declarations.h:28
void C_terms(JointState &jForces, const JointState &q, const JointState &qd)
Definition: inverse_dynamics.h:212
Definition: declarations.h:41
Definition: declarations.h:39
void secondPass(JointState &jForces)
Definition: inverse_dynamics.impl.h:197