Navigation · Theory · M7
M7-T3 — Navigation Under Pose Uncertainty
A planner draws a path for the robot where it thinks it is. This lesson is about how much that belief should widen the path, and when to distrust it.
Every plan assumes a pose. Scout’s pose is never known exactly: the localizer gives a best estimate and a covariance that says how far off it might be. If the planner ignores the covariance, the margin it leaves around walls is a margin for the estimate, not for the robot. This lesson turns a covariance into a margin or a speed limit, shows that direction matters, and warns about the case that no covariance fixes: the estimate that is confident and wrong.
Learning objectives
After this lesson, you should be able to:
- Compute the standard deviation of the position error along a direction from a 2×2 covariance.
- Convert an accepted collision probability into a number of sigmas and a margin.
- Choose between inflating a margin, lowering speed and avoiding an area, and say what each costs.
- Explain why a small covariance does not prove that the pose is right.
The intuition
Imagine walking a narrow corridor in the dark with a rough idea of where you are. You do not walk faster because you feel sure. You keep your hands out, you stay near the middle, and in the narrowest part you slow down. The more lost you feel, the more room you want, and you want it most in the direction of the walls.
A localizer’s covariance is that feeling in numbers. For position it is a 2×2 matrix whose ellipse shows where the true position probably is, given the estimate. The ellipse is often long in one direction: in a straight corridor the scan matcher locks onto the side walls and is vague along the corridor, so the ellipse is long along the corridor and thin across it. In a glass atrium it can be the other way round.
What matters for a wall is the spread towards that wall, not the biggest spread. A long ellipse along a corridor is harmless; the same ellipse turned across the corridor can use up the margin on both sides. That is why the figure is drawn in the corridor’s own frame: the 0.26 m across the corridor is what decides if the corridor is passable.
The mathematics
The spread along a direction
Let the position error be a zero-mean Gaussian with covariance Σ = [[σxx, σxy], [σxy, σyy]] in the map frame. Take a unit vector u from the robot to the nearest obstacle. The error projected on u is a one-dimensional Gaussian whose variance is
Its extremes are the square roots of the eigenvalues of Σ, along the ellipse’s axes. Reading only σxx or σyy ignores the correlation and is wrong in every direction except along the map axes.
From a probability to a margin
For a wall at the other end of the direction u, a collision means the error towards the wall exceeds the margin beyond the robot’s radius. If the robot may collide with probability at most p, use the one-sided Gaussian tail:
| n (sigmas) | One-sided tail 1 − Φ(n) | Meaning |
|---|---|---|
| 1.0 | 15.9% | Exceeded about one time in six |
| 1.645 | 5% | Exceeded one time in twenty |
| 2.0 | 2.3% | A common default |
| 2.326 | 1% | Exceeded one time in a hundred |
| 3.0 | 0.13% | Exceeded about one time in 740 |
- r
- radius of the robot used in the costmap (inscribed or circumscribed, lesson M2-T2).
- σu
- spread of the position error in the direction of the obstacle.
- n
- number of standard deviations, chosen from the accepted probability p.
- p
- probability per encounter that the real position is beyond the margin. It is not a probability of collision per mission.
The 2-D ellipse is a different thing: the ellipse that holds the true position with probability P has semi-axes scaled by k = sqrt(χ²₂(P)), which is 2.447 for 95% and 3.035 for 99%. Use the one-dimensional rule above for a wall and the ellipse when you need the region.
Three ways to use it
- Widen the margin. Replace r by r + n σu in the inflation layer, per cell or per area. Safe, but narrow places close (lab M7-L2).
- Slow down. Keep the margin and reduce the speed so that the stopping distance and the uncertainty along the direction of travel fit in the free space ahead (lesson M7-T1).
- Avoid or fix it. Route around places where localization is poor, or stop and improve it (a landmark, a longer scan, a human fix).
A worked example
Scout in the atrium corridor. The localizer reports, in the corridor’s frame, σalong = 0.10 m and σacross = 0.2646 m. The corridor is 1.6 m wide (half-width 0.80 m) and Scout’s radius is 0.30 m. Accept p = 1%, so n = 2.326.
At p = 5% (n = 1.645) the margin is 0.30 + 0.435 = 0.735 m, and the corridor is open with 0.065 m to spare. The decision depends on the risk you accept, and that is a decision for people, not for the algorithm.
Why the direction matters. From the same covariance written in the map frame, Σ = [[0.04, 0.03], [0.03, 0.04]], the spread is 0.20 m along x, 0.2646 m along (0.7071, 0.7071) and 0.10 m along (0.7071, −0.7071). The eigenvalues are 0.07 and 0.01. A planner that reads σxx = 0.04 and uses σ = 0.20 for a wall in the diagonal direction gets a margin of 0.30 + 2.326 · 0.20 = 0.765 m instead of 0.9155 m: 0.15 m too small, exactly the amount that decides this corridor.
What σ can Scout afford here? With r = 0.30 m, half-width 0.80 m and n = 2.326, the largest cross-corridor spread is (0.80 − 0.30) / 2.326 = 0.215 m. Above that the corridor is closed for the planner; the choices are to accept more risk, slow down, take another route or localize better.
A confident, wrong pose. Suppose the localizer reports σ = 0.03 m and the robot was in fact carried into another corridor of the same shape. The margin is 0.30 + 2.326 · 0.03 = 0.37 m, and every statement the planner makes about the walls refers to walls that are not there. No margin computed from the covariance protects against this, because the covariance is the filter’s opinion of itself.
Engineering implications and limitations
The covariance is the filter’s belief, not the error
It is correct only if the sensor and motion models are. Particle filters tend to under-report spread when the particle set has collapsed; extended Kalman filters are over-confident when the process noise is too small or the linearisation is poor. The consistency of a filter can be measured: over many steps, the normalised innovation squared should average its dimension, and a filter that sits well below it is over-confident. Many teams add a floor and a multiplier to the reported covariance before using it for anything safety-related.
Rotate before you use it
Covariances are given in the map or odom frame. Rotate them into the frame of the obstacle direction, or use uᵀΣu directly. An axis-aligned reading is the single most common error.
Put the number in one place
As with the footprint margin (lesson M2-T2), pick one place for the uncertainty allowance: the inflation layer, the planner’s cost, or a speed limit. Applying it in two places doubles it, and doors close. Most stacks do not feed the pose covariance into the costmap automatically; you add that link yourself and test it, for example with a map of where localization is known to be poor.
When uncertainty is too big
Set an upper threshold. Above it the right action is not a wider margin but to stop and relocalize (lesson M7-T7), and to tell someone. A robot that keeps driving with a σ of a metre is not being careful.
What this does not cover
Heading uncertainty, the footprint corners swinging out because of it, and correlated errors along a path are all real and ignored here. None of this is a safety case; it is the planning-side use of a covariance (lessons M7-T1 and M7-T2 give the other parts).
Common misconceptions
“The covariance is how wrong the robot is.”
It is how wrong the filter thinks it might be. When the model is wrong or the robot has been moved, the real error can be many sigmas.
“Three sigma means it cannot happen.”
It means about 0.13% per encounter on one side, if the Gaussian model holds. Many encounters add up, and tails of real errors are heavier than Gaussian.
“Take the largest σ and use it everywhere.”
It closes doors where localization is good. The margin should follow the local uncertainty in the direction of the obstacle.
“A small covariance means the pose is right.”
It means the filter is confident. A symmetric corridor, a wrong map or a kidnapped robot can leave it confident and wrong.
Engineering takeaways
- The spread towards an obstacle is σu = sqrt(uᵀΣu); the biggest spread and the relevant spread are not the same.
- A margin is r + n·σu, where n comes from the probability you accept (1.645 for 5%, 2.326 for 1% one-sided).
- You can widen the margin, slow down, or avoid areas where localization is poor; each has a cost.
- The covariance is the filter’s belief: check it for consistency, and add an allowance before using it for safety.
- A confident plan on a wrong pose is the dangerous case, and only independent checks (lesson M7-T7) can catch it.
References and further reading
Probabilistic Robotics and the estimation texts give the background; LQG-MP is a primary source for planning with motion uncertainty.
- S. Thrun, W. Burgard and D. Fox, “Probabilistic Robotics”, MIT Press, 2005.
- Y. Bar-Shalom, X. R. Li and T. Kirubarajan, “Estimation with Applications to Tracking and Navigation”, Wiley, 2001 (consistency tests: NEES and NIS).
- J. van den Berg, P. Abbeel and K. Goldberg, “LQG-MP: Optimized Path Planning for Robots with Motion Uncertainty and Imperfect State Information”, International Journal of Robotics Research, 30(7), 2011.
- F. Dellaert, D. Fox, W. Burgard and S. Thrun, “Monte Carlo Localization for Mobile Robots”, IEEE ICRA, 1999.
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
Σ = [[0.09, 0.02], [0.02, 0.04]]. What is the spread of the position error along u = (0.6, 0.8)?
Explanation
Variance = 0.09·0.36 + 2·0.02·0.6·0.8 + 0.04·0.64 = 0.0324 + 0.0192 + 0.0256 = 0.0772, so σ = 0.278 m.
Question 2
A corridor is 1.2 m wide (half-width 0.60 m), Scout’s radius is 0.25 m and the cross-corridor σ is 0.20 m. Is the corridor open at n = 2?
Explanation
No. The needed clearance is 0.25 + 2 · 0.20 = 0.65 m, more than 0.60 m. The largest σ that would pass is (0.60 − 0.25) / 2 = 0.175 m.
Question 3
The localizer reports a tiny covariance, but the robot has been carried to a corridor with the same shape somewhere else. Why does a covariance-based margin not help?
Explanation
The covariance describes the error of the filter relative to its own model. It says nothing about a model that is wrong, so the planner draws accurate margins around walls that are in the wrong place. Independent checks, such as a scan-to-map match score, are needed (lesson M7-T7).
What’s next
Next: the sensing failures that make the costmap itself lie, and the checks that expose them.
Related content
Nothing below is required to finish this lesson.
- BeforeM7-T2: Safety Filters: Control Barrier Functions for Navigation
Explain how a safety filter minimally corrects an unsafe command, and where it sits in the stack.
- LabM7-L2: Plan with Pose Uncertainty
Localization is poor near the glass atrium: inflate the safety margin with the uncertainty and keep clear.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.