Autonomy, Navigation and AI
Explore how robots find their way: dead reckoning, landmarks, mapping and SLAM, plus where machine learning helps robots see and decide.
Welcome back!
Step 1 of 11Learn
Lost in a warehouse
A warehouse robot carries shelves from storage to packing stations, hundreds of trips a day, among dozens of other robots. It can't drift by even a few centimeters, or it will miss the shelf it's supposed to lift. How does it know exactly where it is?
If it relied only on its wheel encoders (dead reckoning), errors would pile up with every meter: a tiny slip here, a slightly worn wheel there. After an hour of driving, it could be meters off. So many warehouse robots use landmarks: small codes stuck to the floor in a grid. Each time a camera under the robot spots one, the robot knows its exact position and resets its dead-reckoning error to nearly zero. Between codes, the encoders fill in the gaps.
This is the basic idea behind most robot navigation: combine a sensor that's smooth but drifts with a sensor that's occasionally exact. Encoders and gyros give smooth, fast estimates that slowly drift; landmarks, GPS, lidar maps or cameras give absolute corrections. Merging different sensors into one better estimate is called sensor fusion.
Autonomy describes how much a robot can do without human help. It ranges from fully remote-controlled, through robots that handle some tasks alone (like a Mars rover driving to a point a scientist picked), to robots that plan and work for long periods on their own.
Step 2 of 11Practice · Choose one
Why do many warehouse robots read codes on the floor even though they have wheel encoders?
Step 3 of 11Practice · Chart
Dead-reckoning drift, with and without floor codes
Tap the distance where the encoder-only robot is first off by more than 5 cm.
Tap the point that answers the question, then press Check.
| Distance driven (m) | Encoders only | Encoders + code every 2 m |
|---|---|---|
| 0 | 0 cm | 0 cm |
| 1 | 0.5 cm | 0.5 cm |
| 2 | 1.1 cm | 0 cm |
| 3 | 1.8 cm | 0.5 cm |
| 4 | 2.6 cm | 0 cm |
| 5 | 3.5 cm | 0.5 cm |
| 6 | 4.5 cm | 0 cm |
| 7 | 5.6 cm | 0.5 cm |
| 8 | 6.8 cm | 0 cm |
| 9 | 8.1 cm | 0.5 cm |
| 10 | 9.5 cm | 0 cm |
Step 4 of 11Learn
Mapping and path planning
To navigate a space it has never seen, a robot needs two abilities: building a map and planning a path through it.
Many robots map with lidar or cameras, often as a grid of small squares marked free, occupied or unknown. The tricky part is that to build an accurate map, the robot needs to know where it is, and to know where it is, it needs a map. Roboticists solve both at once with SLAM (simultaneous localization and mapping): as the robot moves, it matches new sensor readings against what it has already seen, updating both its map and its estimate of its own position. Robot vacuums with lidar or cameras use SLAM to clean in neat rows instead of bouncing around randomly.
Once there's a map, path planning finds a route from start to goal that avoids obstacles. A common family of methods searches the grid like a maze, expanding outward from the start until it reaches the goal, preferring squares that head toward the goal. One well-known algorithm of this type is called A* (pronounced "A-star"), also used for characters in video games.
Finally, the robot must handle surprises: a person stepping into the path or a box left on the floor. Local obstacle avoidance reacts to these in real time, while the planner recalculates the route if the way is blocked.
Step 5 of 11Practice · Put in order
A new robot vacuum explores an unknown apartment and then cleans the kitchen. Put its tasks in a sensible order.
Drag the items, or use the arrow buttons, to put them in order.
- Scan the surroundings with its lidar
- Follow the path, avoiding unexpected obstacles
- Clean the kitchen in rows using the map
- Plan a path from its current spot to the kitchen
- Build a map while tracking its own position (SLAM)
Step 6 of 11Learn
Where AI fits in
"AI robot" can mean many things, so it helps to be precise. Much of what robots do uses classic, hand-written algorithms: the state machines, feedback controllers and path planners you've seen. These are predictable and well understood.
Machine learning (ML) is different: instead of writing rules, engineers train a model on lots of examples. ML shines where rules are hard to write:
- Vision: recognizing people, packages, weeds or fruit in camera images. Nobody can write precise rules for "this is a ripe strawberry," but a model trained on thousands of labeled images can learn it.
- Speech: understanding spoken commands.
- Grasping: learning how to pick up oddly shaped objects through many attempts, sometimes in simulation first.
- Walking: some legged robots learn balance and gait through trial and error in simulated worlds before running on real hardware.
ML also brings challenges. Models can fail in situations unlike their training data, such as a camera model trained in daylight struggling at night. It can be hard to explain why a model made a choice, which matters when safety is at stake. So real robots usually mix both: ML for perception and hard-coded safety rules (stop if anything is too close) that always override it.
Step 7 of 11Practice · Diagram
Hand-coded algorithms and machine learning in robots
Where do most real-world robots belong?
Tap the shape that answers the question, then press Check.
- Hand-coded
Hand-written, predictable, easy to test.
- Machine learning
Learned from examples; good with messy real-world data.
- Hand-coded only
State machines and feedback controllers live here too: predictable and easy to test.
- Speed control
- Path planning
- Machine learning only
- Spotting weeds in photos
- Grasping odd shapes
- Hand-coded + Machine learning (overlap)
Most real robots combine both: learning for perception, classic code for control and safety.
- Self-driving cars
- Warehouse robots
Step 8 of 11Note
Step 9 of 11Practice · Chart
One-way radio delay from Earth
Tap the case where a "stop!" command would take longest to arrive.
Tap the bar that answers the question, then press Check.
Step 10 of 11Practice · Select all that apply
Which tasks are especially good fits for machine learning in robots? Select all that apply.
Select all that apply.
Step 11 of 11Practice · True or false
Because they can learn, machine learning models in robots never need hard-coded safety rules.
Lesson complete!