Model NITI Aayog, 24-27 Dec, online. Write an original white paper.

How Does a Robot Find Its Way Around a Room? | How It Works

12 min read

On this page

What is the short answer?

A mobile robot, such as a robot vacuum or a hospital delivery robot, finds its way by repeating four jobs.

It senses the room with wheel counters, motion sensors, range sensors and cameras. It maps the room, often as a grid of cells marked free, occupied or unknown. It localises, working out where it is on that map. Then it plans a path and steers around anything in the way.

No sensor is reliable alone. Wheels slip and readings are noisy. So the robot treats its position as a best guess and keeps correcting it against its map.

Definition: Robot navigation is the combined task of sensing the surroundings, building or using a map, estimating the robot's own position on it and planning a safe path to a goal.

What does a robot sense, and what does each sensor miss?

Some sensors measure the robot's own motion. Others measure the world around it.

  • Wheel encoders. These count small steps of each wheel's turn. Adding up the turns to estimate position is called odometry. Hans Moravec of Carnegie Mellon University, in the United States, wrote in 2003 that wheel turns track position only approximately, with drift to correct.
  • Inertial measurement unit (IMU). Gyroscopes sense turning and accelerometers sense changes in speed and tilt. A 2022 NASA paper on the Mars rover Perseverance describes its attitude estimate drifting from gyroscope noise, then being corrected with accelerometer readings for tilt and Sun images for heading.
  • Bump and cliff sensors. A bumper switch reports a touch. A cliff sensor shines infrared light at the floor. IEEE Spectrum, a technical magazine, reported in 2015 that black carpet absorbs this light, so one robot vacuum read black carpet as a drop.
  • Ultrasonic sensors. These time an echo. A 1984 Carnegie Mellon paper used sonar with a beam about 30 degrees wide, so an echo showed only that something lay inside a wide cone.
  • Lidar and cameras. The US National Oceanic and Atmospheric Administration (NOAA) describes lidar as pulsed laser light used to measure ranges. Cameras spot landmarks, but IEEE Spectrum noted that mapping is hard in a very dark room.

How does a robot turn range readings into a map?

A common indoor map is an occupancy grid. The floor is divided into equal square cells, and each cell holds a belief about whether it is empty or filled.

Hans Moravec and Alberto Elfes of Carnegie Mellon's Robotics Institute set out the idea in July 1984. Each cell held a value from minus 1 to 1. Below zero meant probably empty, above zero meant probably occupied and exactly zero meant unknown.

Each range reading adds evidence. The space before the echo is likely empty, because the beam passed through it. Cells at the measured range are likely occupied. Cells the beam never reached stay unknown.

The 1984 robot carried a ring of 24 sonar sensors, and its map grew more detailed as readings piled up. Hundreds of readings that agree reveal walls and doorways.

Why must a robot keep asking where it is?

A map is useless if the robot does not know where it stands. Working this out is called localisation, and it never stops, because odometry drifts.

The robot corrects drift by comparison. It asks what its sensors would read if it stood at a given spot, then compares that prediction with the real reading. Good matches make a position more believable.

A widely used method is Monte Carlo localisation, or particle-filter localisation. In May 1999, Frank Dellaert, Dieter Fox, Wolfram Burgard and Sebastian Thrun represented the robot's uncertain position as a set of randomly drawn samples. Each sample, or particle, is one guess.

When the robot moves, every particle moves too, with a little random spread for slip. When a reading arrives, particles that explain it well are copied and poor ones fade. The authors said the method could find a robot's position without knowing where it started.

How can a robot map a room it has never seen?

A robot in a new room faces a loop. To build an accurate map, it needs to know where it is. To know where it is, it needs an accurate map.

Solving both at once is called SLAM, simultaneous localisation and mapping. MIT News described it in November 2025 as a robot recreating a map of its surroundings while orienting itself within that space.

In outline, SLAM treats the map and the robot's path as one shared guess, adjusting both so that they agree.

The big correction comes when the robot returns somewhere it has been. IEEE Spectrum's 2015 report described a camera-equipped robot vacuum whose floor-tracking sensor, which built its first rough map, slowly drifted. When its camera recognised a known landmark, it recalculated its position and readjusted the whole map. Recognising an old place is called loop closure.

How does a robot plan a path and dodge things that move?

On a grid, each free cell links to its neighbours. Finding a route means searching these cells for the cheapest path.

The best-known method is A*, pronounced "A star". It comes from a July 1968 paper by Peter Hart, Nils Nilsson and Bertram Raphael of the Stanford Research Institute, now SRI International.

A* scores each cell by the distance travelled so far plus a heuristic, an estimate of the distance still to go, such as the straight-line distance. It explores the most promising cells first. The IEEE milestone page on Shakey says Mars rovers use Field D*, a method derived from A*.

A plan goes stale when a person steps in, so robots also run a fast local planner. A 2024 University of Bonn paper says its museum robot used A* for the route and the Dynamic Window Approach for real-time obstacle avoidance.

Where did these ideas come from?

The IEEE calls Shakey the world's first mobile intelligent robot. It was developed at SRI in California, in the United States, from 1966 to 1972, IEEE Spectrum reported.

SRI wrote in 2021 that Shakey had a TV camera, an optical range finder and bump detectors. It could locate a specific spot in a seven-room environment and avoid obstacles. The IEEE milestone page says its camera had only 120 lines of resolution.

Sonar grid maps followed in 1984. In 1997, a robot called RHINO guided visitors at the Deutsches Museum Bonn, in Germany. University of Bonn researchers wrote in 2024 that it gave tours to more than 2,000 visitors over six days, scanning with lasers and sonar.

A July 1998 paper by RHINO's builders says it moved through dense crowds and avoided obstacles, some of which it could not sense. Monte Carlo localisation followed in 1999.

What have a regulator and researchers found about home maps?

A robot that maps a home also records how that home is laid out.

On 14 September 2026, South Korea's Personal Information Protection Commission (PIPC), a government data-protection regulator, published recommendations after reviewing robot vacuums from five makers. It said such devices can collect video, voices and floor maps, which are closely connected to living spaces and need careful management.

The PIPC found no significant privacy risks in how this information was collected, transferred or stored. Its recommendations asked makers to explain the legal basis for each use more clearly, give users more choice, say more about overseas transfers and how long data is kept, name a local agent where required and strengthen access controls. It said most makers had already acted, though some had not.

On 17 November 2020, the University of Maryland, in the United States, reported research with the National University of Singapore. The team showed that a robot vacuum's lidar, once the device was taken over, could pick up recorded speech played through computer speakers from the vibrations of nearby objects such as a bin, matching spoken numbers with about 90 per cent accuracy.

How does this work with real numbers?

Both examples use illustrative inputs. Only the speed of light is sourced.

How far off does odometry drift over a 20 m run?

Take an illustrative wheel 7 cm across and an illustrative encoder giving 360 counts a turn.

  • One turn: circumference = π × 7 cm ≈ 21.99 cm.
  • One count: 21.99 cm ÷ 360 ≈ 0.061 cm, or about 0.61 mm.
  • After 3,600 counts: exactly 10 turns, so 10 × 21.99 cm ≈ 220 cm, or about 2.2 m.
  • Counts for 20 m: 2,000 cm ÷ 21.99 cm ≈ 90.9 turns, and 90.9 × 360 ≈ 32,700 counts.

Now add an illustrative 1 per cent error, for example from slip. It grows with distance: 5 cm after 5 m, 10 cm after 10 m and 20 cm after 20 m. Without a map, nothing pulls it back.

How does a lidar turn time into distance?

The US National Institute of Standards and Technology (NIST) gives the speed of light in a vacuum as exactly 299,792,458 m per second. A pulse goes out and back, so distance = speed of light × time ÷ 2.

  • An illustrative wall 3 m away: the round trip is 6 m, and 6 ÷ 299,792,458 ≈ 20 billionths of a second, or 20 nanoseconds.
  • A timing slip of 1 nanosecond: 299,792,458 × 1 billionth ÷ 2 ≈ 0.15 m, or 15 cm.
  • The grid those readings fill: an illustrative 5 m by 4 m room at 5 cm a cell needs 100 × 80 = 8,000 cells.

Where can the student go deeper in World 101?

This page follows one robot as it senses a room, maps it, finds itself on the map and plans a route. The World 101 subject Robotics takes the wider view of the field, from the parts a robot is built from to the work robots do.

Three related subjects carry the ideas further. Algorithms and Computation explains how searches such as A* are designed and why some finish faster than others. Signal and Image Processing shows how noisy sensor readings and camera images become useful measurements.

Data Privacy Law covers the rules on data collected inside a home, including the floor maps that a cleaning robot stores, and who may see or share them.

Sources

  • SRI International, "75 Years of Innovation: Shakey the Robot", 3 April 2021.
  • T. S. Perry, IEEE Spectrum, on Shakey's IEEE Milestone, 17 February 2017 (Shakey developed 1966 to 1972).
  • IEEE History Center, "Milestones: SHAKEY: The World's First Mobile Intelligent Robot, 1972", dedicated 16 February 2017, citing Hart, Nilsson and Raphael, IEEE Transactions on Systems Science and Cybernetics, July 1968.
  • H. P. Moravec and A. Elfes, "High Resolution Maps from Wide Angle Sonar", Carnegie Mellon University, July 1984.
  • H. P. Moravec, "Robotics", Encyclopaedia Britannica, July 2003, author's archive at Carnegie Mellon.
  • F. Dellaert, D. Fox, W. Burgard and S. Thrun, "Monte Carlo Localization for Mobile Robots", ICRA, May 1999, Carnegie Mellon record.
  • W. Burgard and others, "The Interactive Museum Tour-Guide Robot", AAAI-98, July 1998, Carnegie Mellon record.
  • E. Schlachhoff and others, University of Bonn, "RHINO-VR Experience", arXiv, 10 June 2024 (RHINO, 1997).
  • A. Zarifian and others, Mars 2020 attitude operations, NASA Technical Reports Server, 5 March 2022.
  • E. Ackerman, IEEE Spectrum, review of a camera-equipped robot vacuum, 14 December 2015.
  • NOAA National Geodetic Survey, "What is LIDAR?", last modified 23 October 2019.
  • NIST, CODATA 2022 value of the speed of light in vacuum, read 15 November 2026.
  • A. Zewe, "Teaching robots to map large environments", MIT News, 5 November 2025.
  • University of Maryland, "Could your vacuum be listening to you?", EurekAlert, 17 November 2020.
  • PIPC, South Korea, "The PIPC Issues Recommendations on Robot Vacuum Makers", 14 September 2026.

Common errors and misconceptions

  • Misconception: A robot knows exactly where it is once it has counted its wheel turns. Correct: Wheels slip and small errors add up, so odometry drifts and must be checked against a map.
  • Misconception: A person must draw a map before a robot can use one. Correct: With SLAM, a robot builds the map and tracks its own position on it at the same time.
  • Misconception: One sensor reading tells the robot where a wall is. Correct: Single readings are noisy; an occupancy grid combines many readings before a cell counts as free or occupied.
  • Misconception: The robot plans one route and simply follows it. Correct: A fast local planner keeps steering around people and objects that appear later.
  • Misconception: A* was invented for modern apps and games. Correct: It was published in July 1968 by researchers working on SRI's Shakey robot.

Key takeaways

  • A mobile robot navigates by repeating four jobs: sensing the room, mapping it, localising itself on the map and planning a path.
  • Wheel encoders and inertial sensors track the robot's own motion, but their small errors grow, so the position estimate drifts.
  • An occupancy grid divides the floor into cells, and many range readings together mark each cell as probably free, probably occupied or unknown.
  • Monte Carlo localisation keeps many guesses, called particles, and favours those whose predicted readings best match the real ones.
  • SLAM builds the map and tracks the robot's position at once, and recognising a place seen before pulls a drifted map back into shape.
  • A* adds the distance travelled to an estimate of the distance left to find the cheapest route, while a local planner avoids moving obstacles.

Test yourself

Why does odometry drift over time?

Each wheel count can carry a small error from slip or wear, and the errors add up because each new position builds on the last.

What do the three kinds of cell in an occupancy grid mean?

A free cell is probably empty, an occupied cell probably holds an obstacle, and an unknown cell has not been reached by any beam.

How does a particle filter decide which position guesses to keep?

It predicts what each guess would sense, compares that with the real reading, and copies the guesses that match best.

What is the chicken-and-egg problem that SLAM solves?

A robot needs a map to know where it is, and must know where it is to build a map, so SLAM estimates both together.

A wheel 7 cm across gives 360 counts a turn. About what distance does one count stand for?

The circumference is π × 7 ≈ 21.99 cm, and 21.99 ÷ 360 ≈ 0.061 cm, or about 0.61 mm.

A lidar pulse returns after about 20 nanoseconds. About how far away is the object?

Distance = speed of light × time ÷ 2, so 299,792,458 × 20 billionths ÷ 2 ≈ 3.0 m.

Go deeper in World 101: Robotics & Automation

Write about it

Turn a question from this chapter into a paper.

The Writing Studio has a structure guide, a rubric and citation tools for 15 formats, from essays to research papers. A free account keeps up to five drafts. Learnacy Essential adds feedback from an AI writing coach and submission to The OYI Review.

Publication depends on review and is not guaranteed.