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

Communications and Control


                                                     10
                 program like a record jumping a track . Thus, it would begin the program over even
                 though it might now be 50 feet from where that program was supposed to start. If it had
                 crossed through a node before the second message arrived, the robot would throw an
                 error. If it had not reached a node, then the second transmission would not cause a
                 problem because the program pointer was still at the first step anyway.

                 The result was that the problem only occurred in areas of poor communications where
                 the distance from the first node to the second node was relatively short. The reason it
                 was so hard to detect was because it occurred so rarely and because of the assumption that
                 the message did not go through if a reply was not received. This was a classic assumption
                 bug. 11


               Other issues
               There are other issues that arise in some situations. One of these occurs when com-
               munication is routed over a network that has excessive message persistence. If the
               protocol handler or post office has given up on a message due to a time-out, but one
               of the networks along the way is still repeating the message, then a return message
               may eventually arrive that is badly out-of-date. Worse yet, we may believe that it is
               the reply to a new message, causing great confusion. For this reason, if possible, it is
               best to set the message persistence of such systems to a minimum value.

               Another safeguard involves tagging messages with message numbers so that it can be
               determined for sure whether a reply belongs to a particular message. If a messaging
               system is full duplex, then messages are being sent without waiting for replies, and
               this type of tagging is essential.

               Books have been written about single aspects of the issues discussed here. The im-
               portant thing is to recognize the value of a good communications system, and to
               anticipate as many problem scenarios as possible in structuring it. Once the structure
               has been selected, you can research specific areas to the depth required. It is also
               crucial not to fall into the trap of sacrificing bandwidth for development conve-
               nience. It may seem that a system has more than enough bandwidth to allow such
               waste, but as it grows this will almost universally prove to be untrue.




               10  For the reader who is not eligible for senior discounts, I should explain that records were an
                 ancient means of storing and playing back music. They were plastic disks imprinted with grooves
                 whose bumpy sides crudely represented a series of sounds.
               11  See Chapter 17.



                                                       103
   115   116   117   118   119   120   121   122   123   124   125