\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{transDiff}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{transDiff}},
{\tt \manName{transForce}}
-- RCCL routines to transform velocities or forces 
into a different coordinate frame.

} 
\manSection{USAGE}
\cverbatim
#include <robotTypes.h>    /* included as part of <rccl.h> */

DIFF *transDiff (dr, d1, tr)
  DIFF *dr, *d1;
  TRSF *tr;

FORCE *transForce (fr, f1, tr)
  FORCE *fr, f1;
  TRSF *tr;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt dr} --}
Transformed velocity vector.
\manItem{{\tt d1} --}
Initial velocity vector.
\manItem{{\tt fr} --}
Transformed force vector.
\manItem{{\tt f1} --}
Initial force vector.
\manItem{{\tt tr} --}
$4\times 4$ homogeneous transform from the initial frame to the new frame.
\manSection{DESCRIPTION}
{\tt transDiff()} takes a differential motion (i.e., velocity) vector
and computes its value with respect to a different
coordinate frame. The location of the new frame with respect to the
original frame is given by the transform {\tt tr}.
If the $3 \times 3$ rotational submatrix of {\tt tr} is given by {\bf R}, and
the translational vector of {\tt tr} is given by {\bf p}, then this routine
performs the following calculation:
\manIfTeX
$$
{\bf dr} \;=\; \left( 
\matrix{
{\bf R}^T & ({\bf p} \times {\bf R})^T \cr
0         & {\bf R}^T \cr
}
\right) \; {\bf d1} 
$$      
\manElse
\cverbatim
                        T       T
                     [ R   (pXR) ]
                dr = [        T  ] d1
                     [ 0     R   ]
@endcverbatim
\manFi
where ${\bf p} \times {\bf R}$ denotes the three column vectors formed
by taking the cross product of {\bf p} with each column of {\bf R}.

{\tt transForce()} takes a force vector
and computes its value with respect to a different
coordinate frame. The location of the new frame with respect to the
original frame is given by the transform {\tt tr}.
If the $3 \times 3$ rotational submatrix of {\tt tr} is given by {\bf R}, and
the translational vector of {\tt tr} is given by {\bf p}, then this 
is done with the following calculation:
\manIfTeX
$$
{\bf fr} \;=\; \left( 
\matrix{
{\bf R}^T & 0 \cr
({\bf p} \times {\bf R})^T  & {\bf R}^T \cr
}
\right) \; {\bf f1} 
$$      
\manElse
\cverbatim
                          T       
                     [   R     0  ]
                fr = [      T   T ] f1
                     [ (pXR)   R  ]
@endcverbatim
\manFi

Both routines return a pointer to their result argument.

\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt diffToTrsf(3)}, {\tt trsfToDiff(3)}.
\manEnd
\end

