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

Chapter 8

            If an interrupt is not available, it may be tempting to poll the encoder. This is a really bad
            idea, as it will consume enormous resources from the CPU, but it can be done if such
            resources are available. A better solution may be to place a small, dedicated micro-
            processor between the encoders and the main CPU, and to program it to perform the
            calculations. Processors are available for a few dollars that can handle this process.


            Speeding up calculations
            The first thing we need to know is how fast our processor can perform these calcula-
            tions. If this is not known explicitly, then we can devise a test that will exercise the
            CPU and determine the amount required to perform, say, one million such calcula-
            tions. Next, determine the highest rate that the interrupts could occur, and make
            sure that the time is well more than an order of magnitude shorter than the shortest
            period for the interrupt.

            The two most common ways to increase the speed of such calculations are by adding
            a coprocessor, or by using lookup tables for the geometric functions. In the calcula-
            tions above, notice that the arcsine function is always called with the same value (d/W).
            It is silly to ask our processor to do this arcsine calculation over and over. The
            obvious solution is to pre-calculate this constant, and then just manipulate its sign.


            Live reckoning interaction with other processes
            We achieve live reckoning when odometry begins interacting tightly with the other
            processes of navigation. The position estimates produced are used by sensor systems
            to orient the data that they are processing. These sensor systems may in turn correct
            one or more of the baseline position and heading estimates. Since the odometry pro-
            cess is one of adding relative movements to these estimates, the algorithm must pay
            no attention to the fact that the estimates have been changed by someone else.

            The position and heading estimates are also used by higher-level systems for such pur-
            poses as determining if a destination has been reached, or showing a remote operator
            the position of the robot. Other, less obvious uses of this data will be discussed in the
            chapters that follow.

            The uncertainty estimates for each axis of a robot are almost as important as its posi-
            tion estimates for these axes. In the coming chapters, we will explore the many ways
            that the uncertainty model will interplay with navigation and behavior.








                                                   126
   138   139   140   141   142   143   144   145   146   147   148