Page 187 - Introduction to AI Robotics
P. 187

170
                                                                          5 Designing a Reactive Implementation
                                     stepped into view of the camera. Unfortunately, the judge was wearing white shoes,
                                     and Omnibot turned in a direction roughly in-between the shoes and the line. The
                                     CSM team captain, Floyd Henning, realized what was happening and shouted at the
                                     judge to move. Too late, the robot’s front wheels had already crossed over the line; its
                                     camera was now facing outside the line and there was no chance of recovering. Sud-
                                     denly, right before the leftmost rear wheel was about to leave the boundary, Omnibot
                                     straightened up and began going parallel to the line! The path turned to the right,
                                     Omnibot crossed back into the path and re-acquired the line. She eventually went
                                     out of bounds on a hair pin further down the course. The crowd went wild, while the
                                     CSM team exchanged confused looks.
                                       What happened to make Omnibot drive back in bounds? The perceptual schema
                                     was using the 20% brightest pixels in the image for computing the centroid. When it
                                     wandered onto the grass, Omnibot went straight because the reflection on the grass
                                     was largely random and the positions cancelled out, leaving the centroid always in
                                     the center of the image. The groundskeepers had cut the grass only in the areas
                                     where the path was to be. Next to the path was a parallel swatch of uncut grass
                                     loaded with dandelion seed puffs. The row of white puffs acted just as a white line,
                                     and once in viewing range Omnibot obligingly corrected her course to be parallel to
                                     them. It was sheer luck that the path curved so that when the dandelions ran out,
                                     Omnibot continued straight and intersected with the path. While Omnibot wasn’t
                                     programmed to react to shoes and dandelions, it did react correctly considering its
                                     ecological niche.
                                       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 commer-
                                     cially 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 im-
                                     plementing a reactive system is to perform integration testing, where the be-
                                     haviors 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,
   182   183   184   185   186   187   188   189   190   191   192