Tutorial Guide

64
Lesson 7 Advanced Course
Checking the program in the “Ball
Searching” group box
Starting the search for the ball
PLAY ACTION TRACK_HEAD PINK_BALL
The above command is included, but there is no
WAIT command.
Note that the next command will be executed while
AIBO is still searching for the pink ball.
Quit searching for the ball
At first, lets check what the box specifies for
AIBO when it has lost the ball.
In the END__TRACKING box, only a
WAIT command is defined. A WAIT
command with no parameter makes the
program wait until all commands have
finished.
Here, the program waits for the following
command in the START_ TRACKING box to
complete:
PLAY ACTION TRACK_HEAD PINK_BALL
The system parameter of the Pink_Ball
command is not 1, which means AIBO has
lost the ball, but the TRACK_HEAD
command will not be completed
immediately.
Since some time passes before the command
completes, the above WAIT command is used
to cause the program to wait until the
completion of the TRACK_HEAD command.
Determining whether AIBO has
lost the ball or not
IF Pink_Ball = 1 SIDE?
ELSE END_TRACKING
The above commands check whether
AIBO is still able to see the pink ball or
not. If AIBO sees the pink ball, a value of
1 is returned to the Pink_Ball system
parameter and the program jumps to the
SIDE? Action box.
If AIBO has lost the ball, the program
jumps to the END_TRACKING box.