4 template<
typename TRAIT>
8 template<
typename TRAIT>
10 inertiaProps( & inertia ),
11 motionTransforms( & transforms )
13 Shoulder_AA_v.setZero();
14 Shoulder_AA_c.setZero();
15 Shoulder_FE_v.setZero();
16 Shoulder_FE_c.setZero();
17 Humerus_R_v.setZero();
18 Humerus_R_c.setZero();
31 template <
typename TRAIT>
39 Shoulder_AA_AI = inertiaProps->getTensor_Shoulder_AA();
41 Shoulder_FE_AI = inertiaProps->getTensor_Shoulder_FE();
43 Humerus_R_AI = inertiaProps->getTensor_Humerus_R();
45 Elbow_FE_AI = inertiaProps->getTensor_Elbow_FE();
47 Wrist_R_AI = inertiaProps->getTensor_Wrist_R();
49 Wrist_FE_AI = inertiaProps->getTensor_Wrist_FE();
66 Shoulder_FE_v = (motionTransforms-> fr_Shoulder_FE_X_fr_Shoulder_AA) * Shoulder_AA_v;
70 iit::rbd::motionCrossProductMx<SCALAR>(Shoulder_FE_v, vcross);
78 Humerus_R_v = (motionTransforms-> fr_Humerus_R_X_fr_Shoulder_FE) * Shoulder_FE_v;
82 iit::rbd::motionCrossProductMx<SCALAR>(Humerus_R_v, vcross);
83 Humerus_R_c = vcross.col(
rbd::AZ) * qd(
HR);
90 Elbow_FE_v = (motionTransforms-> fr_Elbow_FE_X_fr_Humerus_R) * Humerus_R_v;
94 iit::rbd::motionCrossProductMx<SCALAR>(Elbow_FE_v, vcross);
102 Wrist_R_v = (motionTransforms-> fr_Wrist_R_X_fr_Elbow_FE) * Elbow_FE_v;
106 iit::rbd::motionCrossProductMx<SCALAR>(Wrist_R_v, vcross);
107 Wrist_R_c = vcross.col(
rbd::AZ) * qd(
WR);
114 Wrist_FE_v = (motionTransforms-> fr_Wrist_FE_X_fr_Wrist_R) * Wrist_R_v;
118 iit::rbd::motionCrossProductMx<SCALAR>(Wrist_FE_v, vcross);
131 Wrist_FE_U = Wrist_FE_AI.col(
rbd::AZ);
132 Wrist_FE_D = Wrist_FE_U(
rbd::AZ);
135 pa = Wrist_FE_p + Ia_r * Wrist_FE_c + Wrist_FE_U * Wrist_FE_u/Wrist_FE_D;
138 Wrist_R_p += (motionTransforms-> fr_Wrist_FE_X_fr_Wrist_R).transpose() * pa;
141 Wrist_R_u = tau(
WR) - Wrist_R_p(
rbd::AZ);
142 Wrist_R_U = Wrist_R_AI.col(
rbd::AZ);
143 Wrist_R_D = Wrist_R_U(
rbd::AZ);
146 pa = Wrist_R_p + Ia_r * Wrist_R_c + Wrist_R_U * Wrist_R_u/Wrist_R_D;
149 Elbow_FE_p += (motionTransforms-> fr_Wrist_R_X_fr_Elbow_FE).transpose() * pa;
153 Elbow_FE_U = Elbow_FE_AI.col(
rbd::AZ);
154 Elbow_FE_D = Elbow_FE_U(
rbd::AZ);
157 pa = Elbow_FE_p + Ia_r * Elbow_FE_c + Elbow_FE_U * Elbow_FE_u/Elbow_FE_D;
160 Humerus_R_p += (motionTransforms-> fr_Elbow_FE_X_fr_Humerus_R).transpose() * pa;
163 Humerus_R_u = tau(
HR) - Humerus_R_p(
rbd::AZ);
164 Humerus_R_U = Humerus_R_AI.col(
rbd::AZ);
165 Humerus_R_D = Humerus_R_U(
rbd::AZ);
168 pa = Humerus_R_p + Ia_r * Humerus_R_c + Humerus_R_U * Humerus_R_u/Humerus_R_D;
170 Shoulder_FE_AI += IaB;
171 Shoulder_FE_p += (motionTransforms-> fr_Humerus_R_X_fr_Shoulder_FE).transpose() * pa;
174 Shoulder_FE_u = tau(
SFE) - Shoulder_FE_p(
rbd::AZ);
175 Shoulder_FE_U = Shoulder_FE_AI.col(
rbd::AZ);
176 Shoulder_FE_D = Shoulder_FE_U(
rbd::AZ);
179 pa = Shoulder_FE_p + Ia_r * Shoulder_FE_c + Shoulder_FE_U * Shoulder_FE_u/Shoulder_FE_D;
181 Shoulder_AA_AI += IaB;
182 Shoulder_AA_p += (motionTransforms-> fr_Shoulder_FE_X_fr_Shoulder_AA).transpose() * pa;
185 Shoulder_AA_u = tau(
SAA) - Shoulder_AA_p(
rbd::AZ);
186 Shoulder_AA_U = Shoulder_AA_AI.col(
rbd::AZ);
187 Shoulder_AA_D = Shoulder_AA_U(
rbd::AZ);
192 Shoulder_AA_a = (motionTransforms-> fr_Shoulder_AA_X_fr_HyABase).col(
rbd::LZ) *
SCALAR(iit::rbd::g);
193 qdd(
SAA) = (Shoulder_AA_u - Shoulder_AA_U.dot(Shoulder_AA_a)) / Shoulder_AA_D;
196 Shoulder_FE_a = (motionTransforms-> fr_Shoulder_FE_X_fr_Shoulder_AA) * Shoulder_AA_a + Shoulder_FE_c;
197 qdd(
SFE) = (Shoulder_FE_u - Shoulder_FE_U.dot(Shoulder_FE_a)) / Shoulder_FE_D;
200 Humerus_R_a = (motionTransforms-> fr_Humerus_R_X_fr_Shoulder_FE) * Shoulder_FE_a + Humerus_R_c;
201 qdd(
HR) = (Humerus_R_u - Humerus_R_U.dot(Humerus_R_a)) / Humerus_R_D;
204 Elbow_FE_a = (motionTransforms-> fr_Elbow_FE_X_fr_Humerus_R) * Humerus_R_a + Elbow_FE_c;
205 qdd(
EFE) = (Elbow_FE_u - Elbow_FE_U.dot(Elbow_FE_a)) / Elbow_FE_D;
208 Wrist_R_a = (motionTransforms-> fr_Wrist_R_X_fr_Elbow_FE) * Elbow_FE_a + Wrist_R_c;
209 qdd(
WR) = (Wrist_R_u - Wrist_R_U.dot(Wrist_R_a)) / Wrist_R_D;
212 Wrist_FE_a = (motionTransforms-> fr_Wrist_FE_X_fr_Wrist_R) * Wrist_R_a + Wrist_FE_c;
213 qdd(
WFE) = (Wrist_FE_u - Wrist_FE_U.dot(Wrist_FE_a)) / Wrist_FE_D;
void compute_Ia_revolute(const MatrixBase< D1 > &IA, const Vec6< typename D1::Scalar > &U, const typename D1::Scalar &D, const MatrixBase< D2 > &Ia_const)
Definition: declarations.h:27
Definition: declarations.h:30
iit::ct_HyA::tpl::JointState< SCALAR > JointState
Definition: forward_dynamics.h:49
CoreS::ForceVector Force
Definition: forward_dynamics.h:45
ForwardDynamics(iit::ct_HyA::dyn::tpl::InertiaProperties< TRAIT > &in, MTransforms &tr)
Definition: forward_dynamics.impl.h:9
Definition: declarations.h:39
Force< DScalar > vxIv(const Velocity< DScalar > &v, const MatrixBase< Derived > &I)
Definition: declarations.h:29
Definition: forward_dynamics.h:35
Definition: declarations.h:42
Definition: link_data_map.h:12
Definition: declarations.h:41
Definition: declarations.h:38
iit::ct_HyA::tpl::MotionTransforms< TRAIT > MTransforms
Definition: forward_dynamics.h:53
Definition: declarations.h:31
Definition: declarations.h:28
Definition: declarations.h:37
Definition: declarations.h:32
Definition: declarations.h:40
void fd(JointState &qdd, const JointState &q, const JointState &qd, const JointState &tau, const ExtForces &fext=zeroExtForces)
Definition: forward_dynamics.h:169
void ctransform_Ia_revolute(const MatrixBase< D1 > &Ia_A, const MatrixBase< D2 > &XM, const MatrixBase< D3 > &Ia_B_const)
CoreS::Matrix66 Matrix66S
Definition: forward_dynamics.h:50
Definition: inertia_properties.h:26
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar SCALAR
Definition: forward_dynamics.h:40