1 #ifndef IIT_ROBOT_HYQ_FORWARD_DYNAMICS_H_ 2 #define IIT_ROBOT_HYQ_FORWARD_DYNAMICS_H_ 5 #include <Eigen/StdVector> 12 #include "transforms.h" 34 template <
typename TRAIT>
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
81 JointState& qdd, Acceleration& trunk_a,
82 const Velocity& trunk_v,
const Acceleration& g,
83 const JointState& q,
const JointState& qd,
const JointState& tau,
const ExtForces& fext = zeroExtForces);
85 JointState& qdd, Acceleration& trunk_a,
86 const Velocity& trunk_v,
const Acceleration& g,
87 const JointState& qd,
const JointState& tau,
const ExtForces& fext = zeroExtForces);
95 MTransforms* motionTransforms;
104 Matrix66S LF_hipassembly_AI;
105 Velocity LF_hipassembly_a;
106 Velocity LF_hipassembly_v;
107 Velocity LF_hipassembly_c;
108 Force LF_hipassembly_p;
110 Column6DS LF_hipassembly_U;
111 Scalar LF_hipassembly_D;
112 Scalar LF_hipassembly_u;
114 Matrix66S LF_upperleg_AI;
115 Velocity LF_upperleg_a;
116 Velocity LF_upperleg_v;
117 Velocity LF_upperleg_c;
120 Column6DS LF_upperleg_U;
121 Scalar LF_upperleg_D;
122 Scalar LF_upperleg_u;
124 Matrix66S LF_lowerleg_AI;
125 Velocity LF_lowerleg_a;
126 Velocity LF_lowerleg_v;
127 Velocity LF_lowerleg_c;
130 Column6DS LF_lowerleg_U;
131 Scalar LF_lowerleg_D;
132 Scalar LF_lowerleg_u;
134 Matrix66S RF_hipassembly_AI;
135 Velocity RF_hipassembly_a;
136 Velocity RF_hipassembly_v;
137 Velocity RF_hipassembly_c;
138 Force RF_hipassembly_p;
140 Column6DS RF_hipassembly_U;
141 Scalar RF_hipassembly_D;
142 Scalar RF_hipassembly_u;
144 Matrix66S RF_upperleg_AI;
145 Velocity RF_upperleg_a;
146 Velocity RF_upperleg_v;
147 Velocity RF_upperleg_c;
150 Column6DS RF_upperleg_U;
151 Scalar RF_upperleg_D;
152 Scalar RF_upperleg_u;
154 Matrix66S RF_lowerleg_AI;
155 Velocity RF_lowerleg_a;
156 Velocity RF_lowerleg_v;
157 Velocity RF_lowerleg_c;
160 Column6DS RF_lowerleg_U;
161 Scalar RF_lowerleg_D;
162 Scalar RF_lowerleg_u;
164 Matrix66S LH_hipassembly_AI;
165 Velocity LH_hipassembly_a;
166 Velocity LH_hipassembly_v;
167 Velocity LH_hipassembly_c;
168 Force LH_hipassembly_p;
170 Column6DS LH_hipassembly_U;
171 Scalar LH_hipassembly_D;
172 Scalar LH_hipassembly_u;
174 Matrix66S LH_upperleg_AI;
175 Velocity LH_upperleg_a;
176 Velocity LH_upperleg_v;
177 Velocity LH_upperleg_c;
180 Column6DS LH_upperleg_U;
181 Scalar LH_upperleg_D;
182 Scalar LH_upperleg_u;
184 Matrix66S LH_lowerleg_AI;
185 Velocity LH_lowerleg_a;
186 Velocity LH_lowerleg_v;
187 Velocity LH_lowerleg_c;
190 Column6DS LH_lowerleg_U;
191 Scalar LH_lowerleg_D;
192 Scalar LH_lowerleg_u;
194 Matrix66S RH_hipassembly_AI;
195 Velocity RH_hipassembly_a;
196 Velocity RH_hipassembly_v;
197 Velocity RH_hipassembly_c;
198 Force RH_hipassembly_p;
200 Column6DS RH_hipassembly_U;
201 Scalar RH_hipassembly_D;
202 Scalar RH_hipassembly_u;
204 Matrix66S RH_upperleg_AI;
205 Velocity RH_upperleg_a;
206 Velocity RH_upperleg_v;
207 Velocity RH_upperleg_c;
210 Column6DS RH_upperleg_U;
211 Scalar RH_upperleg_D;
212 Scalar RH_upperleg_u;
214 Matrix66S RH_lowerleg_AI;
215 Velocity RH_lowerleg_a;
216 Velocity RH_lowerleg_v;
217 Velocity RH_lowerleg_c;
220 Column6DS RH_lowerleg_U;
221 Scalar RH_lowerleg_D;
222 Scalar RH_lowerleg_u;
224 static const ExtForces zeroExtForces;
227 template <
typename TRAIT>
229 (motionTransforms-> fr_LF_hipassembly_X_fr_trunk)(q);
230 (motionTransforms-> fr_LF_upperleg_X_fr_LF_hipassembly)(q);
231 (motionTransforms-> fr_LF_lowerleg_X_fr_LF_upperleg)(q);
232 (motionTransforms-> fr_RF_hipassembly_X_fr_trunk)(q);
233 (motionTransforms-> fr_RF_upperleg_X_fr_RF_hipassembly)(q);
234 (motionTransforms-> fr_RF_lowerleg_X_fr_RF_upperleg)(q);
235 (motionTransforms-> fr_LH_hipassembly_X_fr_trunk)(q);
236 (motionTransforms-> fr_LH_upperleg_X_fr_LH_hipassembly)(q);
237 (motionTransforms-> fr_LH_lowerleg_X_fr_LH_upperleg)(q);
238 (motionTransforms-> fr_RH_hipassembly_X_fr_trunk)(q);
239 (motionTransforms-> fr_RH_upperleg_X_fr_RH_hipassembly)(q);
240 (motionTransforms-> fr_RH_lowerleg_X_fr_RH_upperleg)(q);
243 template<
typename TRAIT>
253 fd(qdd, trunk_a, trunk_v, g, qd, tau, fext);
Column12d< SCALAR > JointState
Definition: declarations.h:20
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar Scalar
Definition: forward_dynamics.h:40
ForwardDynamics(iit::HyQ::dyn::tpl::InertiaProperties< TRAIT > &in, MTransforms &tr)
Definition: forward_dynamics.impl.h:8
PlainMatrix< Scalar, 6, 6 > Matrix66
iit::rbd::Core< Scalar > CoreS
Definition: forward_dynamics.h:42
Definition: link_data_map.h:12
ct::core::ADCodegenLinearizer< state_dim, control_dim >::ADCGScalar Scalar
Definition: HyALinearizationCodeGen.cpp:23
CoreS::Column6D Column6DS
Definition: forward_dynamics.h:48
void setJointStatus(const JointState &q) const
Definition: forward_dynamics.h:228
LinkDataMap< Force > ExtForces
Definition: forward_dynamics.h:45
CoreS::VelocityVector Velocity
Definition: forward_dynamics.h:46
Definition: inertia_properties.h:26
Definition: forward_dynamics.h:35
void fd(JointState &qdd, Acceleration &trunk_a, const Velocity &trunk_v, const Acceleration &g, const JointState &q, const JointState &qd, const JointState &tau, const ExtForces &fext=zeroExtForces)
Definition: forward_dynamics.h:244
iit::HyQ::tpl::MotionTransforms< TRAIT > MTransforms
Definition: forward_dynamics.h:53
CoreS::VelocityVector Acceleration
Definition: forward_dynamics.h:47
CoreS::Matrix66 Matrix66S
Definition: forward_dynamics.h:50
iit::rbd::tpl::InertiaMatrixDense< Scalar > InertiaMatrix
Definition: forward_dynamics.h:52
iit::HyQ::tpl::JointState< Scalar > JointState
Definition: forward_dynamics.h:49
CoreS::ForceVector Force
Definition: forward_dynamics.h:44