Go to the documentation of this file.
26 LinkTraverse::LinkTraverse()
32 LinkTraverse::LinkTraverse(
int size)
41 find(root, doUpward, doDownward);
55 traverse(root, doUpward, doDownward,
false, 0);
72 traverse(child,
false,
true,
false, 0);
92 arm.noalias() =
link->
R * child->
b;
96 child->
sw.noalias() =
link->
R * child->
a;
100 if(calcAcceleration){
101 link->
dw = child->
dw - child->
dq * child->
w.cross(child->
sw) - (child->
ddq * child->
sw);
102 link->
dv = child->
dv - child->
w.cross(child->
w.cross(arm)) - child->
dw.cross(arm);
109 arm.noalias() =
link->
R * (child->
b + child->
q * child->
d);
113 child->
sv.noalias() =
link->
R * child->
d;
117 if(calcAcceleration){
119 link->
dv = child->
dv - child->
w.cross(child->
w.cross(arm)) - child->
dw.cross(arm)
120 - 2.0 * child->
dq * child->
w.cross(child->
sv) - child->
ddq * child->
sv;
134 if(calcAcceleration){
153 arm.noalias() = parent->
R *
link->
b;
154 link->
p = parent->
p + arm;
159 link->
v = parent->
v + parent->
w.cross(arm);
161 if(calcAcceleration){
163 link->
dv = parent->
dv + parent->
w.cross(parent->
w.cross(arm)) + parent->
dw.cross(arm);
171 link->
p = parent->
p + arm;
178 if(calcAcceleration){
180 link->
dv = parent->
dv + parent->
w.cross(parent->
w.cross(arm)) + parent->
dw.cross(arm)
195 if(calcAcceleration){
221 for(
int i=0;
i <
n; ++
i){
222 Link* link = traverse[
i];
@ ROTATIONAL_JOINT
6-DOF root link
virtual void find(Link *root, bool doUpward=false, bool doDownward=true)
Matrix33 rodrigues(const Vector3 &axis, double q)
std::vector< Link * > links
double ddq
joint acceleration
std::ostream & operator<<(std::ostream &os, LinkTraverse &traverse)
Vector3 w
angular velocity, omega
@ SLIDE_JOINT
translational joint (1 dof)
Vector3 b
relative position (parent local)
void traverse(Link *link, bool doUpward, bool doDownward, bool isUpward, Link *prev)
The header file of the LinkTraverse class.
unsigned int numLinks() const
Link * link(int index) const
void calcForwardKinematics(bool calcVelocity=false, bool calcAcceleration=false) const
Vector3 dv
linear acceleration
Vector3 dw
derivative of omega
Vector3 a
rotational joint axis (self local)
Vector3 d
translation joint axis (self local)
@ FIXED_JOINT
fixed joint(0 dof)
bool isDownward(int index) const
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:03