Page 278 - The Definitive Guide to Building Java Robots
P. 278
Preston_5564C07.fm Page 259 Monday, September 26, 2005 5:38 AM
CHAPTER 7 ■ NAVIGATION 259
Section Summary
With localization, your robot should be able to figure out its start position with relative ease,
providing the environment is not that noisy. By repeating this process at the end of your algo-
rithm, your robot can determine whether it’s close enough to its goal to move again or exit.
The classes created in this section were
• NavPoint: A class that extends java.awt.Point but provides a name field
• SonarServos: A class that controls the sonar servos on top of the robot
• Localization: A class that extends Navigation that provides for the robot to estimate its
start position
Next, it’s time for the robot to move into a real environment with obstacles and avoid them.
7.3 Obstacle Detection
In the last two sections, we spoke of dead reckoning and localization in a finite known environ-
ment. How a robot deals with obstacles in this finite environment translates directly into how
it deals with noisy environments and obstacles. To start with, I’ll classify obstacles into six types:
Useful Static, Useful Semi-static, Useful Dynamic, Useless Static, Useless Semi-static, and
Useless Dynamic. They’re shown in Table 7-2.
Table 7-2. Obstacle Classification
Obstacle Type Useful Useless
Static Walls, furniture, landmarks, Floor lamps, closely spaced items,
sidewalks, lawn trees, creeks, potholes
Semi-static Beverage cans, toys? Toys on the floor, boxes, lawn
sprinklers
Dynamic Faces, hands, puppies Walking person, toy or box on the
floor, tree
The useful items are things that assist us in navigation. Static items like walls, landmarks,
sidewalks are all items that don’t move but can be used to give us a start point, way point, or
end point. The semi-static items don’t help the robot navigate because even though they don’t
move, they are not always at the same location. However, they could be goals for a robot (for
example, cleaning the floor of items before I vacuumed or getting cans out of the refrigerator).
The final ones don’t help the robot navigate, but like semi-static obstacles they can be end
points or goals for a robot (for example, following hand signals, or following a specific person
in a crowded room).
The useless items are things that create noise for the robot. Noise can cause large or small
errors in how the robot determines its routes or whether it hits anything. Static items that are
useless are things that are very difficult for the robot to detect with its sensors. These are obstacles
that it may hit and that could damage the robot (or the obstacle, too). Semi-static obstacles are
items that we don’t really care about but are not moving and have to be adjusted for during