Showing posts with label AI ROBOTICS - 76. Show all posts
Showing posts with label AI ROBOTICS - 76. Show all posts

Wednesday, 13 February 2013

Test each behavior independently


Step 6: Test each behavior independently. As in any software engineering
project, modules or behaviors are tested individually. Ideally, testing occurs
in simulation prior to testing on the robot in its environment. Many commercially
available robots such as Khepera and Nomads come with impressive
simulators. However, it is important to remember that simulators often only
model the mechanics of the robot, not the perceptual abilities. This is useful
for confirming that the motor schema code is correct, but often the only way
to verify the perceptual schema is to try it in the real world.
Step 7: Test with other behaviors. The final step of designing and implementing
a reactive system is to perform integration testing, where the behaviors
are combined. This also includes testing the behaviors in the actual
environment.
Although the follow-line behavior worked well when tested with white lines, it
did not perform well when tested with white lines and obstacles. The obstacles,
shiny plastic-wrapped bales of hay sitting near the line, were often brighter than the
grass. Therefore the perceptual schema for follow-line included pixels belonging to
the bale in computing the centroid. Invariably the robot became fixated on the bale,

and followed its perimeter rather than the line. The bales were referred to as “visual
distractions.”
Fortunately, the bales were relatively small. If the robot could “close its eyes” for
about two seconds and just drive in a straight line, it would stay mostly on course.
This was called the move-ahead behavior. It used the direction of the robot (steering
angle, dir) to essentially produce a uniform field. The issue became how to know
when to ignore the vision input and deploy move-ahead.
The approach to the issue of when to ignore vision was to use the sonar as a releaser
for move-ahead. The sonar was pointed at the line and whenever it returned a range
reading, move-ahead took over for two seconds. Due to the difficulties in working
with DOS, the CSM entry had to use a fixed schedule for all processes. It was easier
and more reliable if every process ran every update cycle, even if the results were
discarded. As a result the sonar releaser for move-ahead essentially inhibited followline,
while the lack of a sonar releaser inhibited move-ahead. Both behaviors ran all
the time, but only one had any influence on what the robot did. Fig. 5.6 shows this
inhibition, while the new behavioral table is shown below.

The final version worked well enough for the CSM team to take first place. It went
all the way around the track until about 10 yards from the finish line. The judges
had placed a shallow sand pit to test the traction. The sand pit was of some concern
since sand is a light color, and might be interpreted as part of the line. Since the sand
was at ground level, the range reading could not be used as an inhibitor. In the end,
the team decided that since the sand pit was only half the length of a bale, it wouldn’t
have enough effect on the robot to be worth changing the delicate schedule of existing
processes.
The team was correct that the sand pit was too small to be a significant visual
distraction. However, they forgot about the issue of traction. In order to get more
traction, the team slipped real tires over the slick plastic wheels, but forgot to attach
them. Once in the sand, the robot spun its wheels inside the tires. After the time limit
was up, the team was permitted to nudge the robot along (done with a frustrated kick
by the lead programmer) to see if it would have completed the entire course. Indeed
it did. No other team made it as far as the sand pit.
It is clear that a reactive system was sufficient for this application. The use
of primitive reactive behaviors was extremely computationally inexpensive,

allowing the robot to update the actuators almost at the update rate of the
vision framegrabber.
There are several important lessons that can be extracted from this case
study:
 The CSM team evolved a robot which fit its ecological niche. However, it
was a very narrow niche. The behaviors would not work for a similar domain,
such as following sidewalks, or even a path of white lines with an
intersection. Indeed, the robot reacted to unanticipated objects in the environment
such as the judge’s white shoes. The robot behaved “correctly”
to features of the open world, but not in a desirable fashion.
 This example is a case where the releaser or inhibitor stimulus for a behavior
was not the same perception as the percept needed to accomplish
the task. The sonar was used to inhibit the behaviors. Follow-line used vision,
while move-ahead integrated shaft encoder data to continue to move
in the last good direction.

 This example also illustrates the tendency among purely reactive motor
schema to assign one sensor per behavior.