\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{setMod}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{setMod}},
{\tt \manName{getMod}}
-- set RCCL motion interpolation mode.

}
\manSection{USAGE}
\cverbatim
setMod (mnp, mode)
  MANIP *mnp;
  char mode;

getMod (mnp)
  MANIP *mnp;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt mnp} --}
Manipulator reference structure.
\manItem{{\tt mode} --}
Character specifying the interpolation mode.
\manSection{RESTRICTIONS}
{\tt setMod()} must be called from the planning level.
{\it joint} interpolation is not defined for virtual manipulators.
\manSection{DESCRIPTION}
These RCCL routines control the trajectory interpolation mode
for a manipulator. 

{\tt setMod()} sets the mode to either {\it joint} or {\it Cartesian}
by specifying {\tt mode} as either {\tt 'j'} or {\tt 'c'}.  
The mode change takes effect with the next requested motion 
and remains in effect for all subsequent motions until {\tt setMod()}
is called again.

In Cartesian mode, robot motions are computed by interpolating
along a straight line with respect to the TOOL frame of the target position
equation. Cartesian mode is ignored for {\tt movej()} requests. In joint
mode, robot motions are computed by interpolating in joint coordinates.

{\tt getMod()} returns the value most recently set by {\tt setMod()}.

\manSection{DIAGNOSTICS}
These routines return {\tt -1} 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.). 
The following error codes may be set:

Error codes set by {\tt setMod()} include:

\manItem{{\tt ERange} --}
Illegal mode value.
\manItem{{\tt ENotDefined} --}
Attempt was made to specify joint interpolation for a virtual manipulator.

Error codes set by {\tt getMod()} include:

\manItem{{\tt EInternal} --}
Bogus mode value detected internally.

{\tt setMod()} will abort the program if called from the control level.
\manSection{SEE ALSO}
{\tt getActiveMod(3)}, \rightskip=0ptplus1fil
{\tt move(3)}, {\tt rcclSetOptions(3)}, {\tt errorStack(3)}.
\manEnd
\end

