next up previous contents
Next: kine_pd Up: The Robot and mRobot Previous: jacobian_DLS_inv   Contents

Subsections

kine

Syntax

void kine(Matrix & Rot, ColumnVector & pos);
void kine(Matrix & Rot, ColumnVector & pos, const int j);
ReturnMatrix kine(void);
ReturnMatrix kine(const int j);

Description

The forward kinematic model is provided by implementing the following recursion:
$\displaystyle {}^0 \mbox{\boldmath$ R $}_i$ $\textstyle =$ $\displaystyle {}^0 \mbox{\boldmath$ R $}_{i-1} {}^{i-1}\mbox{\boldmath$ R $}_i$ (2.55)
$\displaystyle {}^0 \mbox{\boldmath$ p $}_i$ $\textstyle =$ $\displaystyle {}^0 \mbox{\boldmath$ p $}_{i-1} + {}^0 \mbox{\boldmath$ R $}_{i-1} \mbox{\boldmath$ p $}_i$ (2.56)

where
$\displaystyle {}^0 \mbox{\boldmath$ T $}_i$ $\textstyle =$ $\displaystyle \left[\begin{array}{cc}
{}^0 \mbox{\boldmath$ R $}_{i} & {}^0 \mbox{\boldmath$ p $}_i \\
0 & 1 \end{array}\right]$ (2.57)

The overloaded function kine can return the orientation and position or the equivalent homogeneous transform for the last (if not supplied) or the $i^{th}$ link. For example:

Robot myrobot(init_matrix);
Matrix Thomo, R;
ColumnVector p;
/* forward kinematics up to the last link */
Thomo = myrobot.kine();  
/* forward kinematics up to the 2nd link  */
Thomo = myrobot.kine(2); 
/* forward kinematics up to the last link, outputs R and p */
myrobot.kine(R,p);       
/* forward kinematics up to the 2nd link, outputs R and p  */
myrobot.kine(R,p,2);
are valid calls to the function kine.

Return Value

Matrix or None (in this case Rot and pos are modified on output)



Richard Gourdeau 2004-07-06