\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{pumaGravload}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{pumaGravload}}
-- RCI routine to compute PUMA gravity loading
}
\manSection{USAGE}
\cverbatim
#include <puma_kynvar.h>

pumaGravload (l, kyn, var)
   float *l;
   PUMA_KYN *kyn;
   PUMA_VAR *var;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt l} --}
Returned gravity loading values at each joint, in Newton-meters.
\manItem{{\tt kyn} --}
PUMA specific structure describing kinematic constants (see below). 
\manItem{{\tt var} --}
PUMA specific structure containing run time variables which depend
on joint position, which {\tt pumaGravload()} uses to obtain
the sines and cosines of all the
angles (see below).

\manSection{DESCRIPTION}
{\tt pumaGravload()} computes the gravity loading at each joint for
a particular position of the robot. The kinematic constants
for the robot are provided for by {\tt kyn}, while the position is
described implicity by {\tt var}, which must contain valid sines and
cosines for a particular position (see {\tt pumaUpdateVar()}). The
routine may be called from any part on an RCI program.

RCI control tasks can obtain pointers to the {\tt kyn} and {\tt var}
structures from fields in the {\tt RCI_RBT} structure (q.v.).
Non-RCI programs can obtains pointers to the structures be calling
{\tt get_jls()}, {\tt get_kyn()}, and {\tt get_var()} (q.v.),
with the name of the desired robot.

When obtaining pointers to {\tt PUMA_KYN} or {\tt PUMA_VAR} structures,
it is necessary to cast them appropriately since both the access routines
and the fields in {\tt RCI_RBT} declare them to be {\tt void*}.

\manSection{SEE ALSO}
\raggedright
{\tt get_kyn()}, {\tt get_var()}, {\tt RCI_RBT()}.
\manEnd
\end
