1 #ifndef IIT_HYQ_INVERSE_DYNAMICS_H_ 2 #define IIT_HYQ_INVERSE_DYNAMICS_H_ 5 #include <Eigen/StdVector> 14 #include "transforms.h" 42 template <
typename TRAIT>
45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
89 JointState& jForces, Acceleration& trunk_a,
90 const Acceleration& g,
const Velocity& trunk_v,
91 const JointState& q,
const JointState& qd,
const JointState& qdd,
92 const ExtForces& fext = zeroExtForces);
94 JointState& jForces, Acceleration& trunk_a,
95 const Acceleration& g,
const Velocity& trunk_v,
96 const JointState& qd,
const JointState& qdd,
97 const ExtForces& fext = zeroExtForces);
120 Force& baseWrench, JointState& jForces,
121 const Acceleration& g,
const Velocity& trunk_v,
const Acceleration& baseAccel,
122 const JointState& q,
const JointState& qd,
const JointState& qdd,
const ExtForces& fext = zeroExtForces);
124 Force& baseWrench, JointState& jForces,
125 const Acceleration& g,
const Velocity& trunk_v,
const Acceleration& baseAccel,
126 const JointState& qd,
const JointState& qdd,
const ExtForces& fext = zeroExtForces);
132 Force& baseWrench, JointState& jForces,
133 const Acceleration& g,
const JointState& q);
135 Force& baseWrench, JointState& jForces,
136 const Acceleration& g);
150 Force& baseWrench, JointState& jForces,
151 const Velocity& trunk_v,
const JointState& q,
const JointState& qd);
153 Force& baseWrench, JointState& jForces,
154 const Velocity& trunk_v,
const JointState& qd);
219 IProperties* inertiaProps;
224 const InertiaMatrix& LF_hipassembly_I;
225 Velocity LF_hipassembly_v;
226 Acceleration LF_hipassembly_a;
227 Force LF_hipassembly_f;
229 const InertiaMatrix& LF_upperleg_I;
230 Velocity LF_upperleg_v;
231 Acceleration LF_upperleg_a;
234 const InertiaMatrix& LF_lowerleg_I;
235 Velocity LF_lowerleg_v;
236 Acceleration LF_lowerleg_a;
239 const InertiaMatrix& RF_hipassembly_I;
240 Velocity RF_hipassembly_v;
241 Acceleration RF_hipassembly_a;
242 Force RF_hipassembly_f;
244 const InertiaMatrix& RF_upperleg_I;
245 Velocity RF_upperleg_v;
246 Acceleration RF_upperleg_a;
249 const InertiaMatrix& RF_lowerleg_I;
250 Velocity RF_lowerleg_v;
251 Acceleration RF_lowerleg_a;
254 const InertiaMatrix& LH_hipassembly_I;
255 Velocity LH_hipassembly_v;
256 Acceleration LH_hipassembly_a;
257 Force LH_hipassembly_f;
259 const InertiaMatrix& LH_upperleg_I;
260 Velocity LH_upperleg_v;
261 Acceleration LH_upperleg_a;
264 const InertiaMatrix& LH_lowerleg_I;
265 Velocity LH_lowerleg_v;
266 Acceleration LH_lowerleg_a;
269 const InertiaMatrix& RH_hipassembly_I;
270 Velocity RH_hipassembly_v;
271 Acceleration RH_hipassembly_a;
272 Force RH_hipassembly_f;
274 const InertiaMatrix& RH_upperleg_I;
275 Velocity RH_upperleg_v;
276 Acceleration RH_upperleg_a;
279 const InertiaMatrix& RH_lowerleg_I;
280 Velocity RH_lowerleg_v;
281 Acceleration RH_lowerleg_a;
285 const InertiaMatrix& trunk_I;
286 InertiaMatrix trunk_Ic;
289 InertiaMatrix LF_hipassembly_Ic;
290 InertiaMatrix LF_upperleg_Ic;
291 const InertiaMatrix& LF_lowerleg_Ic;
292 InertiaMatrix RF_hipassembly_Ic;
293 InertiaMatrix RF_upperleg_Ic;
294 const InertiaMatrix& RF_lowerleg_Ic;
295 InertiaMatrix LH_hipassembly_Ic;
296 InertiaMatrix LH_upperleg_Ic;
297 const InertiaMatrix& LH_lowerleg_Ic;
298 InertiaMatrix RH_hipassembly_Ic;
299 InertiaMatrix RH_upperleg_Ic;
300 const InertiaMatrix& RH_lowerleg_Ic;
303 static const ExtForces zeroExtForces;
306 template <
typename TRAIT>
309 (xm->fr_LF_hipassembly_X_fr_trunk)(q);
310 (xm->fr_LF_upperleg_X_fr_LF_hipassembly)(q);
311 (xm->fr_LF_lowerleg_X_fr_LF_upperleg)(q);
312 (xm->fr_RF_hipassembly_X_fr_trunk)(q);
313 (xm->fr_RF_upperleg_X_fr_RF_hipassembly)(q);
314 (xm->fr_RF_lowerleg_X_fr_RF_upperleg)(q);
315 (xm->fr_LH_hipassembly_X_fr_trunk)(q);
316 (xm->fr_LH_upperleg_X_fr_LH_hipassembly)(q);
317 (xm->fr_LH_lowerleg_X_fr_LH_upperleg)(q);
318 (xm->fr_RH_hipassembly_X_fr_trunk)(q);
319 (xm->fr_RH_upperleg_X_fr_RH_hipassembly)(q);
320 (xm->fr_RH_lowerleg_X_fr_RH_upperleg)(q);
323 template <
typename TRAIT>
331 id(jForces, trunk_a, g, trunk_v,
335 template <
typename TRAIT>
344 template <
typename TRAIT>
353 template <
typename TRAIT>
361 baseAccel, qd, qdd, fext);
const Acceleration & getAcceleration_RH_hipassembly() const
Definition: inverse_dynamics.h:206
const Velocity & getVelocity_LF_lowerleg() const
Definition: inverse_dynamics.h:184
CoreS::ForceVector Force
Definition: inverse_dynamics.h:51
Column12d< SCALAR > JointState
Definition: declarations.h:20
InverseDynamics(IProperties &in, MTransforms &tr)
Definition: inverse_dynamics.impl.h:7
const Velocity & getVelocity_RF_upperleg() const
Definition: inverse_dynamics.h:190
PlainMatrix< Scalar, 6, 6 > Matrix66
const Force & getForce_trunk() const
Definition: inverse_dynamics.h:177
const Velocity & getVelocity_LH_upperleg() const
Definition: inverse_dynamics.h:199
const Force & getForce_RF_lowerleg() const
Definition: inverse_dynamics.h:195
const Acceleration & getAcceleration_LH_hipassembly() const
Definition: inverse_dynamics.h:197
const Acceleration & getAcceleration_RH_lowerleg() const
Definition: inverse_dynamics.h:212
const Velocity & getVelocity_RH_hipassembly() const
Definition: inverse_dynamics.h:205
const Acceleration & getAcceleration_RF_hipassembly() const
Definition: inverse_dynamics.h:188
Definition: inverse_dynamics.h:43
const Velocity & getVelocity_RF_lowerleg() const
Definition: inverse_dynamics.h:193
const Force & getForce_LH_upperleg() const
Definition: inverse_dynamics.h:201
const Acceleration & getAcceleration_RF_lowerleg() const
Definition: inverse_dynamics.h:194
const Velocity & getVelocity_LF_upperleg() const
Definition: inverse_dynamics.h:181
const Force & getForce_RH_lowerleg() const
Definition: inverse_dynamics.h:213
const Force & getForce_LF_upperleg() const
Definition: inverse_dynamics.h:183
Definition: link_data_map.h:12
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:324
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
Definition: HyALinearizationCodeGen.cpp:23
iit::rbd::Core< Scalar > CoreS
Definition: inverse_dynamics.h:49
const Acceleration & getAcceleration_LF_hipassembly() const
Definition: inverse_dynamics.h:179
const Velocity & getVelocity_LH_lowerleg() const
Definition: inverse_dynamics.h:202
const Velocity & getVelocity_LF_hipassembly() const
Definition: inverse_dynamics.h:178
const Force & getForce_LF_lowerleg() const
Definition: inverse_dynamics.h:186
CoreS::VelocityVector Velocity
Definition: inverse_dynamics.h:53
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar Scalar
Definition: inverse_dynamics.h:47
iit::rbd::tpl::InertiaMatrixDense< Scalar > InertiaMatrix
Definition: inverse_dynamics.h:55
const Force & getForce_RF_hipassembly() const
Definition: inverse_dynamics.h:189
const Force & getForce_LF_hipassembly() const
Definition: inverse_dynamics.h:180
void G_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Acceleration &g, const JointState &q)
Definition: inverse_dynamics.h:336
CoreS::VelocityVector Acceleration
Definition: inverse_dynamics.h:54
Definition: inertia_properties.h:26
const Velocity & getVelocity_LH_hipassembly() const
Definition: inverse_dynamics.h:196
const Force & getForce_LH_hipassembly() const
Definition: inverse_dynamics.h:198
const Velocity & getVelocity_RH_upperleg() const
Definition: inverse_dynamics.h:208
const Force & getForce_RF_upperleg() const
Definition: inverse_dynamics.h:192
const Acceleration & getAcceleration_RF_upperleg() const
Definition: inverse_dynamics.h:191
const Force & getForce_LH_lowerleg() const
Definition: inverse_dynamics.h:204
const Acceleration & getAcceleration_RH_upperleg() const
Definition: inverse_dynamics.h:209
InertiaProperties< TRAIT > IProperties
Definition: inverse_dynamics.h:59
const Velocity & getVelocity_RF_hipassembly() const
Definition: inverse_dynamics.h:187
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:354
iit::HyQ::tpl::MotionTransforms< TRAIT > MTransforms
Definition: inverse_dynamics.h:58
const Force & getForce_RH_upperleg() const
Definition: inverse_dynamics.h:210
const Acceleration & getAcceleration_LF_lowerleg() const
Definition: inverse_dynamics.h:185
void C_terms_fully_actuated(Force &baseWrench, JointState &jForces, const Velocity &trunk_v, const JointState &q, const JointState &qd)
Definition: inverse_dynamics.h:345
iit::HyQ::tpl::JointState< Scalar > JointState
Definition: inverse_dynamics.h:56
const Acceleration & getAcceleration_LF_upperleg() const
Definition: inverse_dynamics.h:182
const Acceleration & getAcceleration_LH_upperleg() const
Definition: inverse_dynamics.h:200
CoreS::Matrix66 Matrix66s
Definition: inverse_dynamics.h:57
void setJointStatus(const JointState &q) const
Definition: inverse_dynamics.h:307
const Velocity & getVelocity_RH_lowerleg() const
Definition: inverse_dynamics.h:211
const Force & getForce_RH_hipassembly() const
Definition: inverse_dynamics.h:207
const Acceleration & getAcceleration_LH_lowerleg() const
Definition: inverse_dynamics.h:203
void secondPass_fullyActuated(JointState &jForces)
Definition: inverse_dynamics.impl.h:595
LinkDataMap< Force > ExtForces
Definition: inverse_dynamics.h:52