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

Chapter 6

            For this and other reasons, it is imperative that the communications task copy all of
            the requested data into a buffer before beginning transmission. This transfer can take
            place with interrupts disabled, or through the use of a data transfer instruction that
            cannot be interrupted.

            There are even more subtle forms of errors.
             Flashback…

             I am reminded of one of the most elusive bugs I ever experienced. The problem showed
             up at very rare times, only in a few installations, always along the same paths, and in
             areas with marginal radio communication. The robot would receive a new program,
             begin executing it, and suddenly halt and announce an “Event of Path” error. This error
             meant that the robot had been instructed to perform an action as it drove over a point
             on a path, but that it did not believe the point was on the path!  More rarely, the robot
             would suddenly double back to the previous node and then turn back around and con-
             tinue on. It was very strange behavior for a major appliance!

             This bug happened so rarely that it was at first dismissed as an observer-related problem,
             then as a path-programming problem. Finally, a place was found where the problem
             would occur fairly regularly (one time in 100) and we continued to exercise the robot
             until we were able to halt the robot at the problem and determine the cause. This is what
             was happening:

             When the robot finished a job, it would halt. At that point, it would be sent a new
             program and then it would be told to begin execution of the program at step one. The
             program was loaded in blocks, but no block would be sent until the block before it had
             been successfully transmitted. Once the whole program was successfully loaded, the in-
             struction pointer would be set to the first instruction and the mode would be set to
             automatic. As a final check, the program itself contained a 16-bit checksum to assure
             that it had been put into memory without modification.
             The problem, it turned out, was caused when the robot was sent the message setting its
             program pointer and mode. If this message was not confirmed within a certain time, it
             was retransmitted. It had been assumed that a message timeout would be the result of this
             message not being received by the robot. In that case, the code worked fine. The real
             problem came when the robot did receive the message, but its reply saying that it had
             received the message did not get back to the host. The host would then wait a few sec-
             onds and retransmit the reply, causing the robot to jump back to the beginning of its











                                                   102
   114   115   116   117   118   119   120   121   122   123   124