Page 100 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 100
Communications and Control
fielded robots with the first protocol, however, our new version of the base station
control will not be compatible with our old robots, even if the old robots have no
camera controls.
D 40 C0 80 <CR>
80h - Negative checksum
C0h - Right motor speed
40h - Left motor speed
D - Message Type (D=Drive, P=Pan)
Figure 6.2. Rigid protocol with message identifier
If we decide to keep the old message formats as we add new ones, things will eventu-
ally become very confusing. Worse, the receiving decoder will need to test incoming
messages for all of these formats. This will make the decoding process absorb more
system resources, and the possibilities for bugs abound. After years of patching such
protocols, we will have created a nightmare. Worse yet, whenever we decide to read
or set any parameter we had not previously included, we must replace the messaging
program(s) at both ends of the communications link before the new data can be
accessed.
The problem is that we cannot predict all of the messages we will eventually need
for any but the simplest systems. To believe that it is possible to think of all the
things you will want to communicate is a dangerous conceit. Within hours of estab-
lishing a link to the robot, you will find you need a bit more data, or you will realize
that you need to influence the robot in an additional way. The protocol needs to be
flexible enough to support the unexpected.
Flashback…
I am reminded of a very painful example. We were working on a project to adapt our
commercial security robot for use in a military rack warehouse environment. A rack ware-
house is one based on row after row of rack shelving. The problem was that the robot
had been designed to operate in office environments. In its native habitat, it used sonar
to look for walls and other flat surfaces from which it could correct its dead reckoning.
We were given access to a rack warehouse site where we could do testing. While racks
could be at any height, there were always support posts on regular intervals, and we
decided to base our approach on these. In the course of early development, we had used
our limited funding to add some simple navigation tricks. These tricks used retro-reflec-
tive infrared sensors to detect strips of reflective tape mounted to the posts of the racks.
83

