\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{pumaConfig}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{pumaConfigToStr}},
{\tt \manName{pumaStrToConfig}}
-- RCI routines to map between PUMA configuration codes and strings.
}
\manSection{USAGE}
\cverbatim
char *pumaConfigToStr (string, conf)
   char *string;
   int conf;

pumaStrToConfig (confp, string)
   int *confp;
   char *string;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt string} --}
String description of the robot configuration.
\manItem{{\tt conf} --}
Bitmask description of configuration.
\manItem{{\tt confp} --}
Pointer to bitmask description of configuration.
\manSection{DESCRIPTION}
These routines may be called from any part of an RCI program.

A robot's position in space is usually characterized by kinematic
redundancies. A six degree of freedom serial robot manipulator has
at most 32 distinct solutions (a result first established by Bernie
Roth). The RCCL/RCI kinematic routines usually use a bit code to
decsribe these redundancies (one needs at most 5 bits, given the
32 solutions).

This bit code is not overly user friendly, however. Some parts of
RCCL use a string code instead, assigning a pair of letters to each
``bit'' of the configuration. These routines map between the two
representations for the PUMA robot.

{\tt pumaConfigToStr()} takes a configuration code and returns a string
describing it.

{\tt pumaStrToConfig()} takes a (possibly incomplete) string describing
a configuration and computes a configuration code which it puts
in {\TT confp}; it also returns a bitmask corresponding to those
elements of the configuration which were in fact specified.

The configurations for PUMA are described as follows:
\cverbatim
      Bit code          Meaning             Characters

   PUMA_RIGHT_CONF  Right vs. left handed    'r' 'l'
   PUMA_DOWN_CONF   Elbow down vs. up        'd' 'u'
   PUMA_FLIP_CONF   Wrist flipped vs. not    'f' 'n'
@endcverbatim
The configuration codes are defined in the file 
{\tt puma_kynvar.h}. A configuration string implying that
the robot was in the right handed, elbow up, no-wrist-flip configuration
would then be {\tt "run"}. The order of the characters
is not important if {\tt pumaStrToConf()} is being called.
\manSection{DIAGNOSTICS}
{\tt pumaStrToConfig()} returns -1 if the described configuration
is illegal.
\manSection{BUGS}
The configuration code information ought to also contain information about
joint redundancy. This could be done by packing a 6 4-bit codes into
the configuration word (which is 32 bits on most machines). Or making the
configuration a structure.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt pumaKinematics}, {\tt pumaJacobian}.
\manEnd
\end
