The PC remote control application.
see the virtual remote control on the screen. At this point,
you can click on any of the buttons to move the robot
around and control it. Most of the movement keys toggle
the state. Click it once to start the motion and then again
to stop it.
Opening the panel to run scripts isn't obvious. On the
upper right side of the virtual remote (just under the three
standard windows panel buttons), you will find a single
button with two greater than signs ( >> ) which opens up
the scripting window. This is where you can try individual
commands or execute scripts. To try a single command, just
enter it into the left of the "Exec Cmd" button, then press
the button to execute the command. To run a script, you
first have to click on the "Read File" button which opens up
a file browsing window to select the script to load. Once
Scripting window for PC applications.
76 SERVO 02.2010
you select it and load it, you can then execute it at any time
using the "Run Script" button. Pressing that button will
execute (or re-run) the currently loaded script. The script will
start out from whatever state the robot was in when you
began the script. If you need the robot to start in a known
state, then you should set that from within your script if
you can (like speaker on/off), or manually for some
commands that only toggle the state (like the light on the
front of the robot).
There is no built-in editor for creating the scripts for the
robot. This isn't a problem since they are just straight text
files which you can create and edit using Notepad. When
working on scripts for the robot, I usually keep Notepad
open to update the scripts, save the changes, and then
reload and test the scripts with the RoboScout software.
So far, I haven't found a way through the scripting
language to leverage any of the robot's built-in speech or to
generate speech on-the-fly. All of the speech that you want
to use in your script needs to be created by another
method. For this, I have had excellent results using an
application called TextAloud by NextUp. It lets you enter
any text you want and the voice to use; with that, you can
either perform the text to speech directly or write it to a
.WAV file which works perfectly with the RoboScout
scripting language. Each phrase that you want the robot to
say should be created as separate .WAV files stored with
your program script. With this, you can make RoboScout
say anything you want it to. Using TextAloud, it doesn't
matter if you can't use the built-in phrases.
Some commands like the light change should have a
small delay using the wait command afterwards before
sending the same command again. This will ensure they will
be properly executed and none of them skipped. During
testing, if I sent several light change commands in a row,
some could be ignored and the light wasn't in the state I
expected it to be in. Also, scripts work best when playing
sounds independent of movement commands.