36 total_f.
mul(mass, loc_com_acc);
37 v1.
mul(inertia, loc_ang_vel);
38 v2.
cross(loc_ang_vel, v1);
39 total_n.mul(inertia, loc_ang_acc);
51 v1.
cross(loc_com, joint_f);
55 joint_n -= ext_moment;
60 v1.
mul(rel_att, joint_f);
61 parent->joint_f += v1;
63 v1.
mul(rel_att, joint_n);
64 parent->joint_n += v1;
66 f.
mul(rel_att, joint_f);
67 p.
sub(parent->loc_com, rel_pos);
69 parent->joint_n -= v1;
90 tau(i_dof+0) = joint_n(0);
91 tau(i_dof+1) = joint_n(1);
92 tau(i_dof+2) = joint_n(2);
95 tau(i_dof+0) = joint_f(0);
96 tau(i_dof+1) = joint_f(1);
97 tau(i_dof+2) = joint_f(2);
98 tau(i_dof+3) = joint_n(0);
99 tau(i_dof+4) = joint_n(1);
100 tau(i_dof+5) = joint_n(2);
106 child->calc_joint_force(tau);
107 brother->calc_joint_force(tau);
void zero()
Creates a zero vector.
void cross(const fVec3 &vec1, const fVec3 &vec2)
Cross product.
Joint * root
Chain information.
void calc_joint_force(fVec &tau)
Classes for defining open/closed kinematic chains.
void sub(const fVec3 &vec1, const fVec3 &vec2)
void mul(const fVec3 &vec, double d)
void InvDyn(fVec &tau)
Inverse dynamics.