Page 135 - Introduction to AI Robotics
P. 135

118
                                                              heading                4 The Reactive Paradigm
                                                    WANDER              AVOID
                                                                                      modified
                                                                                      heading
                                                                 force


                                                      FEEL               RUN
                                                     FORCE              AWAY        S        TURN
                                                                force
                                                                                  heading
                                                  polar
                                       SONAR                                             heading  encoders
                                                  plot

                                                     COLLIDE                               FORWARD
                                                                          halt


                                                           Figure 4.9  Level 1: wander.




                                     reading). The primitive behaviors reflect the two paths through the layer.
                                     One might be called the runaway behavior and the other the collide behav-
                                     ior. Together, the two behaviors create a rich obstacle avoidance behavior, or
                                     a layer of competence.
                                       It should also be noticed that the behaviors used direct perception, or af-
                                     fordances. The presence of a range reading indicated there was an obstacle;
                                     the robot did not have to know what the obstacle was.
                                       Consider building a robot which actually wandered around instead of sit-
                                     ting motionless, but was still able to avoid obstacles. Under subsumption, a
                     LEVEL 1: WANDER  second layer of competence (Level 1) would be added, shown in Fig. 4.9. In
                                     this case, Level 1 consists of a WANDER module which computes a random
                                     heading every n seconds. The random heading can be thought of as a vector.
                                     It needs to pass this heading to the TURN and FORWARD modules. But it can’t
                                     be passed to the TURN module directly. That would sacrifice obstacle avoid-
                                     ance, because TURN only accepts one input. One solution is to add another
                                     module in Level 1, AVOID, which combines the FEELFORCE vector with the
                                     WANDER vector. Adding a new avoid module offers an opportunity to create
                                     a more sophisticated response to obstacles. AVOID combines the direction of
                                     the force of avoidance with the desired heading. This results in the actual
                                     heading being mostly in the right direction rather than having the robot turn
   130   131   132   133   134   135   136   137   138   139   140