1 #ifndef IIT_ROBOT_TESTHYQ_FORWARD_DYNAMICS_H_ 2 #define IIT_ROBOT_TESTHYQ_FORWARD_DYNAMICS_H_ 9 #include "transforms.h" 31 template <
typename TRAIT>
34 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37 typedef typename TRAIT::Scalar
Scalar;
48 typedef iit::TestHyQ::tpl::MotionTransforms<TRAIT>
MTransforms;
76 JointState& qdd, Acceleration& trunk_a,
77 const Velocity& trunk_v,
const Acceleration& g,
78 const JointState& q,
const JointState& qd,
const JointState& tau,
const ExtForces& fext = zeroExtForces);
80 JointState& qdd, Acceleration& trunk_a,
81 const Velocity& trunk_v,
const Acceleration& g,
82 const JointState& qd,
const JointState& tau,
const ExtForces& fext = zeroExtForces);
90 MTransforms* motionTransforms;
99 Matrix66S LF_hipassembly_AI;
100 Velocity LF_hipassembly_a;
101 Velocity LF_hipassembly_v;
102 Velocity LF_hipassembly_c;
103 Force LF_hipassembly_p;
105 Column6DS LF_hipassembly_U;
106 Scalar LF_hipassembly_D;
107 Scalar LF_hipassembly_u;
109 Matrix66S LF_upperleg_AI;
110 Velocity LF_upperleg_a;
111 Velocity LF_upperleg_v;
112 Velocity LF_upperleg_c;
115 Column6DS LF_upperleg_U;
116 Scalar LF_upperleg_D;
117 Scalar LF_upperleg_u;
119 Matrix66S LF_lowerleg_AI;
120 Velocity LF_lowerleg_a;
121 Velocity LF_lowerleg_v;
122 Velocity LF_lowerleg_c;
125 Column6DS LF_lowerleg_U;
126 Scalar LF_lowerleg_D;
127 Scalar LF_lowerleg_u;
129 Matrix66S RF_hipassembly_AI;
130 Velocity RF_hipassembly_a;
131 Velocity RF_hipassembly_v;
132 Velocity RF_hipassembly_c;
133 Force RF_hipassembly_p;
135 Column6DS RF_hipassembly_U;
136 Scalar RF_hipassembly_D;
137 Scalar RF_hipassembly_u;
139 Matrix66S RF_upperleg_AI;
140 Velocity RF_upperleg_a;
141 Velocity RF_upperleg_v;
142 Velocity RF_upperleg_c;
145 Column6DS RF_upperleg_U;
146 Scalar RF_upperleg_D;
147 Scalar RF_upperleg_u;
149 Matrix66S RF_lowerleg_AI;
150 Velocity RF_lowerleg_a;
151 Velocity RF_lowerleg_v;
152 Velocity RF_lowerleg_c;
155 Column6DS RF_lowerleg_U;
156 Scalar RF_lowerleg_D;
157 Scalar RF_lowerleg_u;
159 Matrix66S LH_hipassembly_AI;
160 Velocity LH_hipassembly_a;
161 Velocity LH_hipassembly_v;
162 Velocity LH_hipassembly_c;
163 Force LH_hipassembly_p;
165 Column6DS LH_hipassembly_U;
166 Scalar LH_hipassembly_D;
167 Scalar LH_hipassembly_u;
169 Matrix66S LH_upperleg_AI;
170 Velocity LH_upperleg_a;
171 Velocity LH_upperleg_v;
172 Velocity LH_upperleg_c;
175 Column6DS LH_upperleg_U;
176 Scalar LH_upperleg_D;
177 Scalar LH_upperleg_u;
179 Matrix66S LH_lowerleg_AI;
180 Velocity LH_lowerleg_a;
181 Velocity LH_lowerleg_v;
182 Velocity LH_lowerleg_c;
185 Column6DS LH_lowerleg_U;
186 Scalar LH_lowerleg_D;
187 Scalar LH_lowerleg_u;
189 Matrix66S RH_hipassembly_AI;
190 Velocity RH_hipassembly_a;
191 Velocity RH_hipassembly_v;
192 Velocity RH_hipassembly_c;
193 Force RH_hipassembly_p;
195 Column6DS RH_hipassembly_U;
196 Scalar RH_hipassembly_D;
197 Scalar RH_hipassembly_u;
199 Matrix66S RH_upperleg_AI;
200 Velocity RH_upperleg_a;
201 Velocity RH_upperleg_v;
202 Velocity RH_upperleg_c;
205 Column6DS RH_upperleg_U;
206 Scalar RH_upperleg_D;
207 Scalar RH_upperleg_u;
209 Matrix66S RH_lowerleg_AI;
210 Velocity RH_lowerleg_a;
211 Velocity RH_lowerleg_v;
212 Velocity RH_lowerleg_c;
215 Column6DS RH_lowerleg_U;
216 Scalar RH_lowerleg_D;
217 Scalar RH_lowerleg_u;
219 static const ExtForces zeroExtForces;
222 template <
typename TRAIT>
224 (motionTransforms-> fr_LF_hipassembly_X_fr_trunk)(q);
225 (motionTransforms-> fr_LF_upperleg_X_fr_LF_hipassembly)(q);
226 (motionTransforms-> fr_LF_lowerleg_X_fr_LF_upperleg)(q);
227 (motionTransforms-> fr_RF_hipassembly_X_fr_trunk)(q);
228 (motionTransforms-> fr_RF_upperleg_X_fr_RF_hipassembly)(q);
229 (motionTransforms-> fr_RF_lowerleg_X_fr_RF_upperleg)(q);
230 (motionTransforms-> fr_LH_hipassembly_X_fr_trunk)(q);
231 (motionTransforms-> fr_LH_upperleg_X_fr_LH_hipassembly)(q);
232 (motionTransforms-> fr_LH_lowerleg_X_fr_LH_upperleg)(q);
233 (motionTransforms-> fr_RH_hipassembly_X_fr_trunk)(q);
234 (motionTransforms-> fr_RH_upperleg_X_fr_RH_hipassembly)(q);
235 (motionTransforms-> fr_RH_lowerleg_X_fr_RH_upperleg)(q);
238 template <
typename TRAIT>
248 fd(qdd, trunk_a, trunk_v, g, qd, tau, fext);
LinkDataMap< Force > ExtForces
Definition: forward_dynamics.h:42
void setJointStatus(const JointState &q) const
Definition: forward_dynamics.h:223
CoreS::Column6D Column6DS
Definition: forward_dynamics.h:45
PlainMatrix< Scalar, 6, 6 > Matrix66
Definition: rbd.h:79
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:239
CoreS::VelocityVector Acceleration
Definition: forward_dynamics.h:44
CoreS::Matrix66 Matrix66S
Definition: forward_dynamics.h:47
ForwardDynamics(iit::TestHyQ::dyn::tpl::InertiaProperties< TRAIT > &in, MTransforms &tr)
Definition: forward_dynamics.impl.h:8
iit::TestHyQ::tpl::MotionTransforms< TRAIT > MTransforms
Definition: forward_dynamics.h:48
CoreS::ForceVector Force
Definition: forward_dynamics.h:41
iit::TestHyQ::tpl::JointState< Scalar > JointState
Definition: forward_dynamics.h:46
Vector6D Column6D
a 3D subvector of a 6D vector
Definition: rbd.h:90
Definition: inertia_properties.h:24
Definition: link_data_map.h:12
Column12d< SCALAR > JointState
Definition: declarations.h:19
Vector6D ForceVector
a 3D subvector of a 6D vector
Definition: rbd.h:92
iit::rbd::Core< Scalar > CoreS
Definition: forward_dynamics.h:39
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef TRAIT::Scalar Scalar
Definition: forward_dynamics.h:37
Definition: forward_dynamics.h:32
Vector6D VelocityVector
a 3D subvector of a 6D vector
Definition: rbd.h:91
CoreS::VelocityVector Velocity
Definition: forward_dynamics.h:43