Steering a robot
Now, we've made a robot drive forward. But how do we steer it? How does it turn left or right? In order to understand this, we need to first learn about a few significant forms of steering that exist. Let's take a look at some, settle on the one our robot uses, and write some test code to demonstrate it.
Types of steering
The most common techniques for steering a wheeled vehicle (including a robot) fall into two major categories—steerable wheels and fixed wheels, as discussed in the following subsections. Each of them comes with a couple of slightly unusual variants.
Steerable wheels
In movable wheel designs, one or more wheels in a robot face in a different direction from the others. When the robot drives, the differently positioned wheel makes the robot turn. There are two common styles of movable wheel steering on a robot, as shown here in Figure 7.2:
The green arrows...