Skip to the lesson
FixTheRobot Explore Robotics / Localization & SLAM / M3 Mapping and State Estimation / M3-T2

Localization & SLAM · Theory · M3

M3-T2 — Landmark-Based Mapping

A map made of points with error bars: where each landmark is, and how sure the robot is about it.

  • Lesson 2 of 8
  • Module 3: Mapping and State Estimation
  • Theory
  • About 7 minutes to read

When the world has recognisable, isolated features, such as corner reflectors, trees or fiducial markers, the map can be a short list of landmarks. Each one has a position and a covariance. This lesson works out how a single measurement becomes a landmark with an uncertainty ellipse, how the next measurement sharpens it, and why a landmark seen only along one line of sight stays vague.

Learning objectives

After this lesson, you should be able to:

  • Initialise a landmark position and covariance from a range-bearing measurement with known pose.
  • Fuse a second observation with a Kalman update and read the resulting covariance.
  • Explain how viewpoint geometry determines how much a second observation helps.
  • List the assumptions of landmark maps: known pose, known identity, point features.

The intuition

If you stand in a field and see a tree, you know roughly how far it is and which direction it is in. Your distance estimate may be good to a few centimetres, but being off by one degree at 50 m puts the tree nearly a metre sideways. So the uncertainty of one sighting is a long thin ellipse, elongated across your line of sight. Walk to the side and look again: the second ellipse is long in a different direction. Where the two overlap is much smaller than either. Triangulation is just that.

Where you measure from decides how much you learn. Two sightings along the same line give almost no new information about depth sideways.

Two views shrink the landmark uncertaintyTwo elongated uncertainty ellipses for the same landmark seen from two directions, one elongated vertically and one horizontally. Their intersection is a small, nearly round ellipse.view 1 (from the left) view 2 (from below) bearing noise stretches each ellipse across the line of sight fused estimate +=
Each observation constrains the landmark along the line of sight (range) much better than across it (bearing). Observations from different directions complement each other.

The mathematics

With the pose x = (x, y, θ) known exactly (mapping, not SLAM), a range-bearing measurement z = (r, b) with noise covariance R places the landmark at

Landmark initialisation
ϕ=θ+b\phi =\theta +b
l=[x+rcos⁡ϕy+rsin⁡ϕ]l=\begin{bmatrix}x & +r & \cos & \phi \\ y & +r & \sin & \phi \end{bmatrix}

Its covariance follows from first-order error propagation (Σ′ = J R Jᵀ) through that function with respect to the measurement:

Initial landmark covariance
J=∂l∂(r, b)=[cos⁡ ϕ−r sin⁡ ϕ]J=\frac{\partial l}{\partial (r,\,b)}=[\cos \,\phi -r\,\sin \,\phi ]
∑l=J R J⊤\sum _{l}=J\,R\,J^{\top}
[ sin φ r cos φ ]
l
landmark position (2×1) in the map frame.
R
measurement noise covariance, for example diag(σr², σb²).
J
Jacobian of the landmark position with respect to the measurement. Its second column has length r: bearing noise is multiplied by range.
Σl
landmark covariance (2×2): an ellipse long across the line of sight.

When the landmark is observed again, with the pose known, it is a plain Kalman update with the observation model h(l) = (|l − p|, atan2(…) − θ) and Jacobian Hl from M2-T6:

Landmark Kalman update
S=H ∑l H⊤+RS=H\,\sum _{l}\,H^{\top}+R
K=∑l H⊤ S−1K=\sum _{l}\,H^{\top}\,S^{-1}
l←l+K νl\leftarrow l+K\,\nu
∑l←(I−K H) ∑l\sum _{l}\leftarrow (I-K\,H)\,\sum _{l}

Because the poses are known, each landmark is estimated independently from all the others: N small 2×2 problems instead of one large one. This independence disappears as soon as the poses are uncertain, which is the SLAM problem (M3-T6).

Assumptions

  • The pose is known (here exactly; with noisy poses the landmark estimates become correlated).
  • Each measurement is correctly identified with a landmark (data association, M2-T7).
  • Landmarks are static points. Walls, lines and large objects need other representations (M3-T3).
  • Noise is Gaussian and independent from measurement to measurement.

A worked example: triangulating a post

  1. First sighting. The robot at the origin facing +x measures r = 5.0 m, b = 0. With σr = 0.1 m and σb = 0.03 rad: l = (5, 0). J = [[1, 0], [0, 5]], so Σl = diag(0.1², (5 × 0.03)²) = diag(0.0100, 0.0225): σx = 10 cm along the line of sight, σy = 15 cm across it. The bearing noise dominates.
  2. Second sighting, same direction. The robot moves forward to (1, 0) and measures r = 4, b = 0. J = [[1, 0], [0, 4]]: Σ = diag(0.01, 0.0144), σy = 12 cm. Fusing in information form: 1/0.0225 + 1/0.0144 = 113.9, so σy = 9.4 cm. A modest gain: both views see the post from the same direction.
  3. Second sighting, perpendicular direction. Instead suppose the robot sees the post from a point 5 m away along the y axis, so the post’s uncertainty is diag(0.0225, 0.01) in the map frame (long in x, tight in y). Fusing information: x: 1/0.01 + 1/0.0225 = 144.4 and y: 1/0.0225 + 1/0.01 = 144.4, so σx = σy = 8.3 cm. The ellipse is now round, and 8.3 cm is better than either view’s tight direction.
  4. Compare. Viewing from the same direction improved the worst axis from 15 to 9.4 cm; viewing from the perpendicular improved both axes to 8.3 cm. The same two measurements, taken from different places, carry different information.
  5. Cost of getting it wrong. If the first pose was off by 5 cm and nobody knows, the landmark is displaced by 5 cm with a stated uncertainty of 10–15 cm: the error is hidden inside the plausible range. Only a second look from an independent pose would reveal the disagreement.

The lab for this module builds exactly this, with the pose estimate no longer exact.

Engineering implications and limitations

Engineering implications

  • Plan the viewpoints. If you can choose where to drive (survey, calibration), cover each landmark from at least two directions separated by 60° or more. Seeing it again from the same line wastes effort.
  • Add a landmark only when it is stable. A tentative landmark that has been seen once should not enter the map until it has been confirmed, to avoid spurious points from clutter.
  • Use fiducials when you can. Reflectors and visual tags (AprilTag, ArUco) give identity for free, removing the hardest part (data association).
  • Report covariance with the map. A landmark map without Σl hides the information needed for localization against it.
  • Close to the sensor, small errors. Position error scales with range through the bearing noise (σy = r σb): prefer near, well-spread landmarks over far ones.

Limits

A landmark map is sparse: it says nothing about where free space is, so it cannot be used for planning on its own. It needs landmarks that are distinct and easy to detect, which is rarely true in plain corridors or natural scenes. And the independence between landmarks relies on perfect poses; as soon as the poses are estimated the estimates become coupled, and the filter must carry them jointly (EKF-SLAM).

Common misconceptions

“A landmark’s uncertainty is the sensor’s accuracy.”

It also contains the range multiplied by the bearing noise, and the pose error. A 1° bearing error at 30 m is 52 cm.

“More observations always shrink the uncertainty at the same rate.”

Observations along the same line of sight constrain the same direction again and again; those from different directions complement each other.

“Each landmark is independent.”

Only when the poses are known exactly. With estimated poses, landmarks observed from the same pose share its error.

Engineering takeaways

  1. A landmark from a range-bearing measurement is l = p + r (cos(θ+b), sin(θ+b)); its covariance is J R Jᵀ.
  2. The ellipse is long across the line of sight because bearing noise is multiplied by range.
  3. Repeated observations fuse with a Kalman update; viewpoint diversity decides how much each observation helps.
  4. With known poses landmarks are independent; with uncertain poses they become correlated.
  5. Landmark maps are compact and probabilistic but sparse, and need reliable data association.

References and further reading

Primary papers and authoritative documentation.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A reflector 40 m away is measured with σb = 0.01 rad. How large is the sideways uncertainty of a single observation?

Explanation

About 40 m × 0.01 rad = 0.4 m. Bearing noise is multiplied by the range, so distant landmarks from one view are poorly localised sideways even with a precise sensor.

Question 2

Why does observing a landmark a second time from the opposite side of the first view help little, while observing it from the side helps a lot?

Explanation

From the opposite side the line of sight is along the same axis, so the second observation constrains the same direction (range), which was already good, and leaves the sideways direction as vague as before. From the side the roles of range and bearing swap, so the good direction of the second view covers the poor direction of the first.

Question 3

What changes in the mapping problem when the robot poses are estimated rather than exact?

Explanation

The landmark estimates are no longer independent: every landmark seen from the same pose inherits that pose’s error. Correcting one landmark then also changes the pose and the other landmarks. A joint estimate (filter or optimisation) is needed.

What’s next

Landmarks are points. Real environments are mostly walls, corners and edges, which suggests another kind of feature.

Practice this lesson

Implement a Simplified EKF-SLAM

Complete the prediction and update steps of a landmark EKF-SLAM with known association.

Next lesson

M3-T3 — Feature-Based Mapping

Extract lines and corners from scans as features, and compare feature, grid and landmark maps.

Nothing below is required to finish this lesson.