\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{initJnts}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{initJntsByName}},
{\tt \manName{initJntsByManip}}
-- RCCL routines for initializing {\tt JNTS} types.

}
\manSection{USAGE}
\cverbatim
#include <rccl.h>

JNTS *initJntsByName (jr, name)
   JNTS *jr;
   const char *name;

JNTS *initJntsByManip (jr, mnp)
   JNTS *jr;
   MANIP *mnp;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt jr} --}
Result {\tt JNTS} structure.
\manItem{{\tt name} --}
Name of a robot for which a {\tt JNTS} type should be initialized.
\manItem{{\tt mnp} --}
Manipulator reference structure for which a {\tt JNTS} type 
should be initialized.
\manSection{RESTRICTIONS}
{\tt initJntsByName()} must be called from the planning level.
\manSection{DESCRIPTION}
The RCCL {\tt JNTS} type describes the joint values for any
manipulator. In addition to the value field {\tt v},
it contains the fields {\tt num} (the number of joints) and
{\tt type} (the type of each joint), which are specific to a particular
manipulator. To automatically instantiate these fields with the values
appropriate to a particular robot, RCCL provides the following routines:

{\tt initJntsByName()} sets the {\tt num} and {\tt type} fields to
values appropriate for the robot with the given {\tt name}.

{\tt initJntsByManip()} sets the {\tt num} and {\tt type} fields to
values appropriate for the robot specified by the given {\tt MANIP}
structure. A {\tt MANIP} structure is returned by {\tt rcclCreate()}.

Both routines return a pointer to their {\tt jr} argument.
\manSection{DIAGNOSTICS}
These routines return {\tt NULL} in the event of an error.
They will automatically abort the program if the option {\tt RCCL_ERROR_EXIT}
is set (see {\tt rcclSetOptions(3)}). 
Error codes and messages are placed on the {\it errorStack} (q.v.). 

{\tt initJntsByName()} may set the following error codes:

\manItem{{\tt ENotDefined} --}
The named robot is not defined in the system tables.
\manItem{{\tt EInternal} --}
System internal error.
\manItem{{\tt EMemory} --}
System out of memory.

{\tt initJntsByManip()} may set the following error codes:

\manItem{{\tt ENotDefined} --}
The {\tt MANIP} structure references a virtual manipulator.

{\tt initJntsByName()} will abort the program if called from the
control level.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt addJnts(3)}, {\tt rcclCreate(3)}, {\tt rcclSetOptions(3)},
{\tt errorStack(3)}.

\manEnd
\end
