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

Communications and Control

               Message priority is handled in a simple way. The post office simply maintains a set of
               post office boxes for each level of priority. When the channel becomes available, the
               next message will be from the highest set of boxes that has a message posted. Thus, if
               there are no messages in the level 3 boxes, the post office will check the level 2
               boxes, and so forth.

               Many of the field problems in robotics are communications related, so it is important to
               be able to quickly determine the nature of the problem. The post office diagnostic
               display in Figure 6.9 shows all of the elements just discussed for a simple single-level
               post office. The bar at the bottom shows the state of all 32 of the boxes reserved for
               this robot’s channel. The letter “d” indicates a message is done, while the letter “u”
               indicates it is unsent, etc. Clicking the “RxMsgs” button will show the most recent
               messages received that were rejected. The “Details” button gives statistics about
               which messages failed.

               Although the concept of a post office may seem overly complex at first glance, it is
               in fact a very simple piece of code to write. The benefits far outweigh the costs.

               Timing issues and error handling

               Communications are seldom 100% dependable. This is particularly true if the mes-
               sages must travel through more than one medium or by radio. Terrible things often
               happen to our messages once they are sent out into the cruel world. It is important
               that the various failure scenarios be considered in designing our communications
               structure.


                 Flashback…
                 One of the funniest communications-related problems I can remember was the case of
                 the lazy robot. It was our first security robot and it was patrolling a relatively small,
                 single-story laboratory. The main route was around the outside perimeter of the office,
                 along an almost continuous window.
                 The robot would occasionally stop and refuse to accept any further orders. A security
                 officer would be sent over in a patrol car, and would loop around the parking lot looking
                 through the windows for the robot. By the time the robot was spotted, it would be
                 running again!

                 The manager of the security force assured me that he was not at all surprised because this
                 was exactly the way humans acted when they were given the same job! In fact, the prob-
                 lem was something called multipath interference.





                                                        99
   111   112   113   114   115   116   117   118   119   120   121