\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{teachdemo}{1}
\manSection{NAME}
{\tt \manName{teachdemo}}
-- program to exercise the RCCL teach routine.
\manSection{USAGE}
\cverbatim
teachdemo [<robotName>] [-sim[=<simaddr>]] [-on] [-f <filename>]
@endcverbatim
\manSection{DESCRIPTION}
This program is just an exerciser for the routine {\tt rcclTeach()}.
It allows the user to move the robot around using commands entered from either
the teach pendant or the keyboard.

{\tt rcclTeach()} is called in a loop. When the routine returns, its return
value is checked. If the return value is 1, this means that
either the pendant {\tt <RECORD>} button was pressed, or the {\tt record}
command was entered from the keyboard. In this case, the recorded
position is printed and {\tt rcclTeach()} is called again. If the routine
returns 0, this means that the {\tt return} command was entered from the
keyboard, and so the program exits.

The actual operation of the teach routine is described in the manual page
{\tt rcclTeach(3)}.
\manSection{ARGUMENTS}
\manItem{{\tt robotName} --}
Name of the robot to control. If absent, the name is obtained from the system
file {\filefont \$RCCL/conf/defaultRobot}.
\manItem{{\tt -sim} --}
Causes the program to be run in simulator mode, in which case it will attempt
to connect to a robot simulator program (see {\tt robotsim}) instead of 
connecting to a real robot.
\manItem{}
If unqualified, the {\tt -sim} option causes the program to seek a simulator
running on the same machine under the same user name. A different simulator
can be specified by adding an address string {\tt <simaddr>},
as in {\tt -sim=<simaddr>}. For the format of this
address string, see {\tt simAddress(5)}.

\manItem{{\tt -on} --}
Leave the robot arm power on after the program has exited.

\manItem{{\tt -f <filename>} --}
Write the T6 and joint values of the recorded positions out 
to the file specified by {\tt <filename>}.

\manSection{SEE ALSO}
{\tt rcclTeach(3)}.
\manEnd
\end
