Page 113 - Hacking Roomba
P. 113
94 Part I — Interfacing
Converting Radius/Velocity to Left/Right Speeds
The Roomba’s two-wheel differential steering is common for robots. If you want to make it
move in nice curves instead of the simple “drive straight, pivot, drive straight” method, you
have to do some math to convert the curves to speeds for the left and right motors. Luckily
the ROI does this for you, but it’s useful to know how it does it in case you want to do some
special-case movements.
Roomba has a wheelbase diameter (the distance between the centerline of its two drive wheels)
of 258 mm. The diameter of the Roomba itself is around 340 mm (see Figure 5-5). All turning
motion is based off of the 258 mm wheelbase. (The front caster wheel is not used for turning;
it’s a free spinning wheel that skids during non-straight turns.)
~340 mm
258 mm
Roomba
FIGURE 5-5: Schematic of important drive distances
The special-case move of turning with only one drive wheel moving can be accomplished by
setting the DRIVE radius to one-half the wheelbase diameter, or 129 mm. This seems intu-
itively obvious, but the description needs a diagram and a little math. Figure 5-6 shows a dif-
ferential steering system with wheelbase b turning through an arc with angle θ and radius r.