Robot Foundations · Module 7: Knowing Where You Are
Landmarks: Correcting with Something You Recognise
Odometry drifts because it is built from its own past. A landmark is not: it is in the same place whenever you look.
A driver who has lost track of the route does not guess harder. They look for a sign: "High Street". At once they know where they are, to within a few metres, and the confusion of the last ten minutes is gone. The sign did not need to know where the driver had been. It is simply somewhere known, and seeing it is a fact about the present. A robot can do the same with a landmark, and this lesson shows how a single sighting pulls a drifting estimate back to the truth.
What you will be able to do
- Say what a landmark is and what makes a good one.
- Work out the robot's position from a measured range and bearing to a landmark at a known place.
- Apply a correction that moves the estimate part of the way toward an observation.
- Say how the trust placed in the observation changes how fast the error shrinks.
The idea
A landmark is something whose place on the map is known and which the robot can recognise: a pillar, a doorway, a marker on the wall. The landmark map of the lesson What Is a Map? is a list of these.
A landmark does what odometry cannot: it gives information that does not depend on the robot's history. Each sighting is a fresh measurement from the present, with an error that is the same size on the first sighting as on the thousandth. It does not drift.
From a sighting to a position
The robot sees a landmark at distance d and at a bearing β: the angle between its forward direction and the landmark, left positive. In the robot frame that is "d ahead and to the side". The landmark's world position is known. Work backwards: the robot must be d away from the landmark, in the direction it came from.
The robot is at the landmark position minus the measured distance along the direction the landmark was seen in.
robot x = landmark x − d × cos(θ + β)
robot y = landmark y − d × sin(θ + β)
θ is the robot's heading and β the bearing. θ + β is the direction to the landmark in the world frame. This needs a heading estimate: odometry supplies one, or a second landmark can fix it.
In lab 5 the simulation hands the robot the result of this calculation directly, as an observed pose that is wrong by only a few centimetres (about 8 cm) and a couple of degrees (about 2°). It is a fair summary of what a real landmark sighting gives.
Pulling the estimate back
The robot now holds two poses: the odometry estimate, which has drifted, and the observed pose, which has not but is a little noisy. The simplest sensible rule is to move the estimate part of the way toward the observation:
The corrected estimate is the old estimate plus a fraction α of the gap between the observation and the estimate.
new estimate = estimate + α × (observation − estimate)
α ("alpha") is a number from 0 to 1. At 0 the observation is ignored. At 1 the estimate is replaced by the observation. The rule is applied to x, y and θ separately.
One correction does not remove the error unless α is 1. Repeating it, with new sightings, shrinks the error a little each time:
| α | Before | After 1 | After 2 | After 3 | After 4 |
|---|---|---|---|---|---|
| 0.1 | 65 cm | 59 cm | 53 cm | 48 cm | 43 cm |
| 0.5 | 65 cm | 34 cm | 18 cm | 11 cm | 7 cm |
| 1 | 65 cm | 5 cm | 5 cm | 5 cm | 5 cm |
The small α is slow and smooth. The α of 1 jumps to the observation at once and then sits at its error (5 cm here, the noise of the sighting). Which is better depends on how much the observation is to be trusted, and the next lesson takes that up.
A landmark gives a fresh measurement that does not drift. A correction moves the estimate toward it by a fraction α.
What makes a good landmark
- Known place. It must be on the map, with a position as accurate as you hope to get from it.
- Recognisable. If five identical pillars stand in a row, seeing one does not say which. Telling them apart (the data association problem) is a big part of real systems and of the Perception and SLAM tracks.
- Within sight. In lab 5 a landmark is only seen within 4 m. Between landmarks the robot is on odometry alone, and drifting.
- Still there. A landmark that moved is a source of error.
Landmarks are what turn dead reckoning from a guess that decays into an estimate that is bounded. The drift of the last lesson never gets past the next sighting.
Words to know
- Landmark
- A recognisable thing at a known place on the map. On Pip: a post or marker with a surveyed position.
- Observation
- A measurement of a landmark, from which the robot works out its own pose. On Pip: range and bearing, or in lab 5 the pose itself with a small error.
- Bearing (β)
- The angle from the robot's forward direction to the landmark. Left is positive. On Pip: 30° in the worked example.
- Correction
- Moving the estimate toward an observation. On Pip: applied every time a landmark is seen.
- Alpha (α)
- The fraction of the gap between observation and estimate that one correction closes: 0 to 1. On Pip: the slider of lab 5.
- Data association
- Deciding which landmark of the map a sighting is. On Pip: which of the posts it just saw.
A worked example: two steps
Step 1: from a sighting to a pose. A landmark is known to be at (5, 4). Pip's scanner sees it 2 m away at a bearing of 30° to the left. The heading estimate from odometry is 40°.
- Direction to the landmark in the world. θ + β = 40° + 30° = 70°.
- The robot is that far, the other way. x = 5 − 2 × cos 70° = 5 − 0.684 = 4.316. y = 4 − 2 × sin 70° = 4 − 1.879 = 2.121.
- How good is that? A bearing error of 2° moves the position by about 2 × 0.035 = 7 cm. But an error in the heading estimate is worse: 5° of heading error gives 2 × 0.087 = 17 cm. The position fix is only as good as the heading it uses, and a nearer landmark helps because the error is proportional to the distance.
Step 2: the correction. The figure's true pose is (3, 2, 15°). The odometry estimate has drifted to (3.55, 2.35, 25°), an error of 0.65 m. A sighting gives the observed pose (3.04, 1.97, 14°). With α = 0.5:
- x = 3.55 + 0.5 × (3.04 − 3.55) = 3.295.
- y = 2.35 + 0.5 × (1.97 − 2.35) = 2.16.
- θ = 25° + 0.5 × (14° − 25°) = 19.5°.
- The new error is the distance from (3.29, 2.16) to (3, 2): 0.34 m. It has fallen from 0.65 m to 0.34 m, about 51% of what it was.
Try it yourself
Stand in a room you know with your eyes closed, turn around a few times, and try to point at the door. Then open your eyes just long enough to see one familiar object (a window, say) and point at the door again. (a) How much better is the second try? (b) Were you completely sure after seeing only the window? (c) If you had seen the window and the door both, what would you have been able to do that you could not do with the window alone?
What to expect
(a) Much better: one glimpse of something known removes most of the error. (b) Not completely: you saw the window from a slightly wrong angle and your sense of direction still has to be trusted. (c) With two known things you can work out your direction as well as your position: one landmark gives position only if you trust your heading, two give both. Robots also do better with several landmarks in view.
Common mistakes
"A landmark tells the robot where it is, so odometry is no longer needed."
A sighting is only available when a landmark is in view, and only every so often. Odometry carries the estimate between sightings. Each does what the other cannot.
"Set α to 1, to get the most accurate answer."
An observation is noisy, and α = 1 copies its noise. That costs a little jitter on every sighting. The next lesson looks at how to choose.
"One landmark is enough for everything."
One landmark and a bearing gives a position only if the heading is right. Heading errors move the fix. More landmarks, or a heading from another sensor, fix this.
Remember this
- A landmark is a recognisable thing at a known place. Seeing one gives a pose estimate that does not drift.
- Position from a sighting: robot = landmark − d × (cos(θ + β), sin(θ + β)). It is only as good as the heading used.
- A correction is: new = estimate + α × (observation − estimate), for x, y and θ.
- Landmarks must be known, recognisable, in view and still there. Between sightings odometry carries the estimate.
Check yourself
Three questions. Write an answer in your own words, then reveal the explanation. Nothing you type leaves your browser.
Question 1
The odometry estimate is at (2.0, 1.0). A landmark sighting says the pose is (2.4, 1.2). With α = 0.25, what is the corrected position?
Explanation
x = 2.0 + 0.25 × (2.4 − 2.0) = 2.1. y = 1.0 + 0.25 × (1.2 − 1.0) = 1.05. The corrected position is (2.1, 1.05).
Question 2
Why can a single landmark sighting not tell the robot its heading and its position at the same time, using only a range and a bearing?
Explanation
A range and bearing to one known point give one circle of possible positions, and the bearing ties the robot's heading to where on the circle it is. There are more unknowns (x, y and heading) than the two measurements can settle. A second landmark, or an independent heading, provides the missing information.
Question 3
A corridor has ten identical posts. A robot sees one. What is wrong with correcting its pose toward the position of post number 3?
Explanation
It does not know that it is post number 3. If it is another post the correction pulls the estimate toward the wrong place, making the error worse. Identifying which landmark was seen (data association) must be solved first, for instance by choosing the post nearest to where odometry says the robot is.
What’s next
Each tool now has its job: odometry moves the estimate smoothly and drifts, landmarks correct it and are available only now and then. The last lesson of this module puts them in one loop.
Where this goes on the site
Nothing below is needed to continue this course. These pages take the topic of this module further, and most assume more mathematics or Python than this course does.
- LaterLocalization & SLAM
Localization with real sensors and real maps.
- LaterProbability for Robotics
Predict and correct, derived: Bayes, Kalman and particle filters.