We've all seen robot vacuum cleaners scuttling around people's homes. These robotic suckers scoot around the floor, picking up dust and dirt and then returning to their electronic nests to recharge. We have reviewed products like thethat include a scary amount of electronic smarts. So, how do these marvels of modern cleaning technology navigate their way around your home? There are two parts to the answer: sensors and smarts.
Sensors: How a robot vacuum sees the world
Robotic vacuum cleaners don't use cameras to see the world. Instead, they use various types of sensors to detect and measure the worlds around them and their own progress through it, including cliff sensors, bump sensors, wall sensors and optical encoders. Cliff sensors measure the distance between the robot base and the floor, usually by bouncing infra-red light off the floor. If there is a sudden increase in the distance to the floor, that means the robot is getting close to a stair edge or something similar, so it will back off to avoid falling over it (hence the "cliff sensor" name).
The name of the bump sensors also gives away what they do: if the robot vacuum bumps into something (like a wall or a chair leg), the impact triggers the sensor. Wall sensors are like cliff sensors, but in a different direction: they tell the robot when it is close to a wall or other object, so it can follow the wall.
Optical encoders are the most important: these sensors on the wheels of the robot tell it how far it has gone. They are called optical encoders because they use a light sensor to detect how many times the wheels have rotated. From this (and any difference between wheels, which indicates a turn), the robot can figure out how far it has traveled. Different models may include additional sensors (such as a dust scanner to see how much dust is being picked up), but those are the basic sensors that all robotic vacuums include.
This combination of sensors means that the robot knows a few things about the world around it: how far it has gone, things it has bumped into and things it could fall off from. These are the things that a basic robot vacuum will need to know to navigate the world around it.
Smarts: How a robot vacuum navigates the world
So, the robot knows a few things about the world as it moves around it. What gives a robotic vacuum the smarts to work out what it has(and has not) cleaned yet? The answer might surprise you: insects.
Most modern robot vacuums were born of the work of Rodney Brooks, a roboticist at MIT (and one of the founders of iRobot, makers of the Roomba) who was studying simple animals like insects and flatworms. He was part of a new wave of artificial intelligence (AI) research that stepped away from complex problems like teaching a computer to play chess to focus on the basics of intelligence. This movement reasoned that an ant isn't smart, but it navigates the world. How? They realized that, by following a simple set of rules, these simple animals could create complex behaviors. An individual ant doesn't have much brainpower, but it has a simple set of rules that allow it to search for food, return to the nest and guide others. Likewise, a robotic vacuum doesn't need to know the exact dimensions of a room to clean it. Instead, it just needs to know how to react in a few different situations, and it will be able to clean a room. Roboticists call these rules "behaviors," and they are simple things like if you hit a wall, turn away from it.
These behaviors are outlined in a patent filing from iRobot from 2002. These behaviors are extremely simple: the "straight" behavior tells the robot to keep going straight until it hits something. The "bounce" behavior tells it that when it hits something, it should stop, turn to an angle away from the wall and move straight again. The "spiral" behavior tells it to move outward in a spiral, cleaning the floor in expanding circles. The "wall-following" behavior tells it to, well, follow the wall by "bouncing" and going "straight" until the wall is constantly a certain distance away.
When you apply them to a robotic vacuum, these rules allow it to navigate a room. The patent outlines a typical sequence of behaviors:
- Assuming that the user has plonked it on top of a dirty spot, the vacuum starts going in a "spiral" until it "bounces" off something, or has traveled far enough to cover a decent-size area
- If it has bumped into something, it changes to a "wall-following" behavior for a short time.
- After a certain distance, the vacuum switches to a "straight" behavior at a random angle. In the patent, iRobot calculates this distance as (3/4 × average distance between "bumps") + ( 1/4 × most recent distance between "bumps").
- The vacuum goes "straight" until it "bounces" off something, then goes straight again.
- At a point determined by the same calculation as above, it will turn at a random angle, then go "straight," or go "straight" and then do a "spiral."
A similar set of behaviors determine what to do if the vacuum cleaner gets stuck: it has a variety of moves (moving slowly, rotating, backing up) that it will try to free itself, before it gives up and starts beeping pathetically to be rescued.
If you want to see these behaviors in action, the Flickr photo pool of Roomba art is a good place to look. The artists behind these stick LED lights on Roombas in dark rooms and use long-exposure photos to capture the result, creating a trail of light that shows how the vacuum moved around the room.
It is quite edifying to look at these and to trace what the cleaner was doing at the time. We usually think of robots like this as being smart machines that use lasers to map the room and a complex computer to plan a path. But really, robotic vacuums are more like ants than megabrains: they are stupid creatures that slavishly follow a few simple instincts. Personally, that makes me feel a little better: I can't count the number of these things that I have accidentally kicked, tripped over, or tried to persuade my cats to climb onto and ride. Knowing that they are rather dim makes me feel less like I will have offended them. Or at least if I have, the worst they can do when they eventually become intelligent is to "spiral" around me, and "bounce" off me until I submit.