Page 147 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 147

Chapter 9

            Closing behaviors

            At first, we would think that we could drive to the destination and stop or run to
            the next destination. Unfortunately, things aren’t that simple.


             Flashback…
             I remember well my first attempt at sending a robot to a node. It was all so simple. My
             algorithm continually recalculated the vector heading and distance from the robot’s po-
             sition estimate to the destination, and then traveled down that heading until the vector
             distance was less than half an inch. As it approached the end of the run, it continually
             recalculated the fastest possible velocity that would still allow it to stop at the destina-
             tion without exceeding a specified deceleration.
             On the first run, the algorithm worked perfectly, so I imprudently  called in all my co-
                                                                          2
             workers and attempted to repeat the demonstration. The robot ran purposefully toward
             its destination, but at the moment when I should have humbly accepted my praise, it all
             went wrong. The robot abruptly and ungracefully swerved to the left, stopped, turned
             around, and continued driving in ever-tighter circles like a dog chasing its tail. My algo-
             rithm violated the second immutable law of odometry when the robot missed the end
             point. Once it had stopped, it could not make the minute move required to put it on the
             target.


            As with convergent behaviors, there are several different behaviors that may be
            required as the robot nears its destination.


            Are we there yet?
            There are two methods of deciding how much further to drive. The first method is
            to continually recalculate the distance as we drive. The problem with this comes
            with the fact that as we approach the end, and the destination is to the side or rear,
            the vector distance is still positive unless we take into account the vector angle
            between it and the path.
            The second method involves calculating the distance at the beginning of the run,
            and simply counting down the distance remaining as a parallel process in the
            odometry. The problem with this approach is that we may end up weaving about for
            any number of reasons, requiring a longer drive distance than calculated.



            2  For a detailed explanation of the phenomenon at work here, see “The law of conservation of defects
              and the art of debugging” in Section 3.


                                                   130
   142   143   144   145   146   147   148   149   150   151   152