3 template <
typename TRAIT>
7 template <
typename TRAIT>
9 inertiaProps( & inertia ),
11 link1_I(inertiaProps->getTensor_link1() ),
12 link2_I(inertiaProps->getTensor_link2() )
14 body_I( inertiaProps->getTensor_body() ),
17 #ifndef EIGEN_NO_DEBUG 18 std::cout <<
"Robot ct_quadrotor, InverseDynamics<TRAIT>::InverseDynamics()" << std::endl;
19 std::cout <<
"Compiled with Eigen debug active" << std::endl;
27 template <
typename TRAIT>
38 link1_v = ((xm->fr_link1_X_fr_body) * body_v);
41 iit::rbd::motionCrossProductMx<SCALAR>(link1_v, vcross);
49 link2_v = ((xm->fr_link2_X_fr_link1) * link1_v);
52 iit::rbd::motionCrossProductMx<SCALAR>(link2_v, vcross);
54 link2_a = (xm->fr_link2_X_fr_link1) * link1_a + vcross.col(
iit::rbd::AZ) * qd(
JB);
65 link1_f -= fext[
LINK1];
66 link2_f -= fext[
LINK2];
68 link1_Ic = link1_Ic + (xm->fr_link2_X_fr_link1).transpose() * link2_Ic * (xm->fr_link2_X_fr_link1);
69 link1_f = link1_f + (xm->fr_link2_X_fr_link1).transpose() * link2_f;
71 body_Ic = body_Ic + (xm->fr_link1_X_fr_body).transpose() * link1_Ic * (xm->fr_link1_X_fr_body);
72 body_f = body_f + (xm->fr_link1_X_fr_body).transpose() * link1_f;
76 body_a = - body_Ic.inverse() * body_f;
78 link1_a = xm->fr_link1_X_fr_body * body_a;
81 link2_a = xm->fr_link2_X_fr_link1 * link1_a;
88 template <
typename TRAIT>
96 link1_a = (xm->fr_link1_X_fr_body) * body_a;
97 link1_f = link1_I * link1_a;
99 link2_a = (xm->fr_link2_X_fr_link1) * link1_a;
100 link2_f = link2_I * link2_a;
102 body_f = body_I * body_a;
109 template <
typename TRAIT>
115 link1_v = ((xm->fr_link1_X_fr_body) * body_v);
117 iit::rbd::motionCrossProductMx<SCALAR>(link1_v, vcross);
122 link2_v = ((xm->fr_link2_X_fr_link1) * link1_v);
124 iit::rbd::motionCrossProductMx<SCALAR>(link2_v, vcross);
125 link2_a = (xm->fr_link2_X_fr_link1) * link1_a + vcross.col(
iit::rbd::AZ) * qd(
JB);
136 template <
typename TRAIT>
145 link1_v = ((xm->fr_link1_X_fr_body) * body_v);
148 iit::rbd::motionCrossProductMx<SCALAR>(link1_v, vcross);
150 link1_a = (xm->fr_link1_X_fr_body) * body_a + vcross.col(
iit::rbd::AZ) * qd(
JA);
156 link2_v = ((xm->fr_link2_X_fr_link1) * link1_v);
159 iit::rbd::motionCrossProductMx<SCALAR>(link2_v, vcross);
161 link2_a = (xm->fr_link2_X_fr_link1) * link1_a + vcross.col(
iit::rbd::AZ) * qd(
JB);
175 template <
typename TRAIT>
180 link1_f += xm->fr_link2_X_fr_link1.transpose() * link2_f;
183 body_f += xm->fr_link1_X_fr_body.transpose() * link1_f;
CoreS::VelocityVector Velocity
Definition: inverse_dynamics.h:52
Definition: declarations.h:27
Definition: declarations.h:32
void C_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Velocity &body_v, const JointState &q, const JointState &qd)
Definition: inverse_dynamics.h:244
CoreS::ForceVector Force
Definition: inverse_dynamics.h:50
Force< DScalar > vxIv(const Velocity< DScalar > &v, const MatrixBase< Derived > &I)
Definition: inverse_dynamics.h:42
iit::ct_quadrotor::tpl::MotionTransforms< TRAIT > MTransforms
Definition: inverse_dynamics.h:57
void G_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Acceleration &g, const JointState &q)
Definition: inverse_dynamics.h:235
void id_fully_actuated(Force &baseWrench, JointState &jForces, const Acceleration &g, const Velocity &body_v, const Acceleration &baseAccel, const JointState &q, const JointState &qd, const JointState &qdd, const ExtForces &fext=zeroExtForces)
Definition: inverse_dynamics.h:253
Definition: declarations.h:31
Definition: inertia_properties.h:25
void id(JointState &jForces, Acceleration &body_a, const Acceleration &g, const Velocity &body_v, const JointState &q, const JointState &qd, const JointState &qdd, const ExtForces &fext=zeroExtForces)
Definition: inverse_dynamics.h:223
iit::ct_quadrotor::tpl::JointState< SCALAR > JointState
Definition: inverse_dynamics.h:55
Definition: link_data_map.h:12
InverseDynamics(IProperties &in, MTransforms &tr)
Definition: inverse_dynamics.impl.h:8
CoreS::VelocityVector Acceleration
Definition: inverse_dynamics.h:53
Definition: declarations.h:33
void secondPass_fullyActuated(JointState &jForces)
Definition: inverse_dynamics.impl.h:176
Definition: declarations.h:26