Page 256 - The Definitive Guide to Building Java Robots
P. 256
Preston_5564C07.fm Page 237 Monday, September 26, 2005 5:38 AM
CHAPTER 7 ■ NAVIGATION 237
In order for a robot to do this, it must accomplish the following:
• Move in a straight line.
• Face a specific direction.
• Move a specified distance.
Setup
Our robot will require the following to perform basic dead reckoning:
• SpeedDiffDrive.java (Chapter 4)
• A Compass Reading (Chapter 5)
To refresh the differential drive class and how it relates to movement, please see the
diagram in Figure 7-7.
Figure 7-7. The SpeedDiffDrive class diagram from Chapter 2
Next, I decided not to calibrate our robot to move in a straight line since the speed control
and servo controllers send precise analog voltages to the motors. As long as your motors have