Autonomous navigation architecture and localization
UAT 461 Autonomous Navigation and Multi-UAV Systems
Lesson
By the end of this module you will be able to
- Explain the layers of an autonomous navigation system (perception, state estimation, maps, planning, control) with their rates, and compute how old data is when it reaches the actuators
- Read GNSS and RTK fix types and judge how usable the position is under a canopy, and which stretches of a route must rely on other sources
- Choose a state estimator (EKF, particle filter, factor graph) to match the character of the problem
- Use a particle filter to resolve ambiguity between look-alike corridors, and use a smoother to correct positions retrospectively
Why this matters
An autonomous navigation system is not one program but a chain of smaller jobs that hand results to each other. Sensors feed the state estimator, the estimator feeds the maps and the planner, the planner feeds the controller. If a job early in the chain is wrong but still reports confidently, everything downstream obeys it faithfully, and the vehicle drives straight at a tree with full confidence. This module lays two foundations: the overall layering of the chain, and its first layer, which answers “where am I?”, when the satellites are not cooperating.
The first part of the course (modules 1–5) follows the chain. Module 1 covers architecture and localization, module 2 sensor fusion, module 3 maps and global path planning, module 4 obstacle avoidance, trajectories and trajectory tracking, and module 5 real-time replanning, ROS 2 architecture and system verification. The emphasis is on outdoor work for both drones and ground robots. Problems specific to buildings, such as configuring an autopilot without GNSS and positioning with UWB, belong to UAT 458; this course does not repeat them but applies the same principles where the signal degrades only in places. The basics of the Kalman filter are in UAT 305 and ROS 2 is in UAT 308.
The first part of the course (modules 1–5) follows one fictional case through all of its modules: a durian plantation in eastern Thailand wants a ground robot and a drone to move and fly on their own in the orchard. The block is 150 × 120 m with trees planted 8 × 8 m apart, about 9 m tall with canopy radius about 3.5 m, so under the trees there are stretches with a view of the sky and stretches where leaves block nearly all of it. Drip-irrigation hoses run along the rows, there is one drainage gully, and an open yard in front of the shed. The ground robot is a four-wheeled vehicle 0.8 m wide and 60 kg that inspects hoses and carries equipment along the lanes between rows. The drone is a multicopter 0.6 m wide including propeller guards that surveys above the canopy and flies along row lanes at about 3 m to inspect tree bases. Workers are in the block all the time. All figures and data are fictional. The Python code can be downloaded from /downloads/uat-461/.
Layers of an autonomous navigation system
An autonomous navigation system divides its work into layers running at different rates (Siegwart et al., 2011; Thrun et al., 2005). Figure 1 shows the layers used throughout the course. Each layer takes the result of the one above it and passes its own result down, and each has its own job.
The contracts between layers matter more than the details inside a layer. The estimator’s output must carry its uncertainty (covariance) and a validity status, not a bare position, because downstream layers must know how far to trust it. If the position may be off by 2 m in a lane that is 1 m wide on each side, the planner must not send the vehicle through that lane.
ROS 2 splits position into two frames for the same reason (REP 105; Nav2 Maintainers, n.d.). The odom frame is continuous and never jumps, but drifts with time. The map frame agrees with the real world in the long run but may jump when new reference data arrives, for example when RTK returns. Controllers that need smoothness use odom, while mission goals live in map, so a jump in map does not make the steering twitch. Example 4 shows where such a jump comes from.
Every layer adds delay, so the data a controller is using right now is always older than what the sensors see. In an asynchronous pipeline, if layer runs every seconds and takes seconds to process, fresh data may arrive just after the previous cycle began and wait almost a full . The worst-case age is therefore , and on average the wait is half a cycle, .
Example 1 How old is the data when it reaches the wheels?
The ground robot’s obstacle-avoidance pipeline has five stages: obstacle detection from a 10 Hz LiDAR taking 40 ms, a local costmap update at 10 Hz taking 20 ms, the local planner at 10 Hz taking 15 ms, a velocity command to the controller at 50 Hz taking 2 ms, and motors and steering that respond 100 ms late (all assumed values). The team allows at most 0.3 m of position slip due to delay and wants to know how old the data at the wheels is, how far the robot travels in that time, and how fast it may drive.
import numpy as np
# Example 1: how old is the data when it reaches the wheels? (stages, periods and processing times are assumed values)
stages = [
# name, update rate (Hz, None = continuous), processing time (ms)
("LiDAR scan and obstacle detection", 10, 40),
("local costmap update", 10, 20),
("local planner (DWA)", 10, 15),
("velocity command to controller", 50, 2),
("motor and steering lag", None, 100),
]
worst = typical = 0.0
for name, hz, proc in stages:
period = 0.0 if hz is None else 1000.0 / hz # ms a fresh sample may wait for the next cycle
worst += period + proc # worst case: just missed the previous cycle
typical += period / 2 + proc # on average the wait is half a period
print(f"{name:36s} wait up to {period:5.1f} ms + {proc:5.1f} ms processing")
print(f"end-to-end age of data: typical {typical:.0f} ms, worst case {worst:.0f} ms")
for vehicle, v in (("ground robot 1.5 m/s", 1.5), ("drone 5 m/s", 5.0)):
print(f"{vehicle:22s} travels {v * typical / 1000:.2f} m (typical) and {v * worst / 1000:.2f} m (worst) before a command reflects what was seen")
limit = 0.3 # position slack the team allows for latency (m)
print(f"speed keeping the worst-case travel under {limit} m: {limit / (worst / 1000):.2f} m/s")
LiDAR scan and obstacle detection wait up to 100.0 ms + 40.0 ms processing
local costmap update wait up to 100.0 ms + 20.0 ms processing
local planner (DWA) wait up to 100.0 ms + 15.0 ms processing
velocity command to controller wait up to 20.0 ms + 2.0 ms processing
motor and steering lag wait up to 0.0 ms + 100.0 ms processing
end-to-end age of data: typical 337 ms, worst case 497 ms
ground robot 1.5 m/s travels 0.51 m (typical) and 0.75 m (worst) before a command reflects what was seen
drone 5 m/s travels 1.69 m (typical) and 2.48 m (worst) before a command reflects what was seen
speed keeping the worst-case travel under 0.3 m: 0.60 m/s
The average age of the data is 337 ms but in the worst case it reaches 497 ms. At 1.5 m/s the robot travels 0.75 m before the command reflects what the sensor saw, more than the 0.3 m slack the team set. Based on the worst case, the safe speed is 0.60 m/s. A drone flying at 5 m/s is worse off, moving 2.48 m. The conclusion is that reducing the delay of one stage means looking at the whole pipeline. The three stages running at 10 Hz contribute up to 300 ms of waiting out of 497 ms in total, so they dominate, and speeding up the 50 Hz controller would hardly help.
Position sources and their errors under the canopy
Position in the orchard comes from several sensors, each good in one place and poor in another.
| Source | Gives | Weakness in the durian orchard |
|---|---|---|
| GNSS (single, DGPS, RTK) | Position in the world, no accumulating error | Leaves absorb and reflect the signal, low satellites are blocked, the fix degrades in stretches |
| IMU | Continuous rates, attitude and acceleration | Bias makes position drift with the square of time (UAT 305) |
| Barometer | Relative height | Pressure changes with weather, propeller wash disturbs it |
| Wheel odometry | Distance the vehicle has rolled | Wheels slip on wet soil, wear changes diameter, error accumulates with distance |
| Visual or LiDAR odometry | Relative motion from the surroundings | Needs texture or structure; trunks give plenty under the canopy, but glare and flickering shade distort images |
| Compass | Absolute heading | Disturbed by the vehicle and electric motors |
GNSS works best with a clear sky. The review by Popovici et al. (2026) concludes that vegetation weakens the signal, causes multipath and degrades satellite geometry. The figures reported in that review are that standalone GNSS often errs by 15 to 30 m under dense forest, multi-constellation RTK reaches about 0.5 to 2.03 m under comparable conditions, and combining with an IMU and LiDAR improves continuity, though validation in real operations is still thin. The authors stress that these ranges are indicative, not statistically aggregated estimates. A durian orchard is not dense forest, but under a nearly closed canopy it meets the same problems.
A GNSS receiver reports the quality of its solution as a fix type. MAVLink defines the codes as 0 no GPS, 1 no fix, 2 2D fix, 3 3D fix (single), 4 DGPS or SBAS, 5 RTK float and 6 RTK fixed (MAVLink Development Team, n.d.). RTK fixed means the carrier-phase integer ambiguities are resolved, which gives centimetre-level accuracy (PX4 Autopilot, n.d.-a). RTK float has not resolved them, so it is less accurate and noisier. The standard deviations used in this example (fixed 0.02 m, float 0.30 m, single 2.5 m) are assumed planning values; a real team must measure them with its own receiver in the orchard.
Autopilots also screen GNSS quality before trusting it. In the PX4 parameter reference (main branch, checked on 2 October 2026), the GNSS checks default to at least 6 satellites (GNSS_REQ_NSATS), a PDOP of at most 2.5 (GNSS_REQ_PDOP) and a reported horizontal error (EPH) of at most 3 m (GNSS_REQ_EPH), and the receiver must stay healthy for a minimum continuous period (GNSS_REQ_TIME) before GNSS is used (PX4 Autopilot, n.d.-b). Parameter names differ between firmware versions, so read the documentation for the version in use.
Wheel odometry is not blocked by anything, but its error grows with distance. Systematic errors such as unequal wheel diameters or a mis-measured wheelbase make the error accumulate in proportion to the distance travelled (Borenstein & Feng, 1996). If the error is a fraction of the distance, the distance the wheels can carry the position before the error exceeds the limit is .
Example 2 Under the canopy, how far must the wheels carry the position?
The team logs the fix type each second in three zones: Z1 the open yard in front of the shed, Z2 a row of young trees whose canopy is still small, and Z3 a row of mature trees under a closed canopy. The simulation runs ten minutes per zone at 1 Hz, and each second’s fix persists with probability 0.80. The robot drives at 1.5 m/s, odometry errs by 1.5% of distance, and the lane tolerates a position error of 0.5 m (all assumed). Compute the share of each fix type, the longest stretch without a usable fix (float or better), and the error if the wheels carry the position through that stretch.
import numpy as np
# Example 2: GNSS fix types along the route and how far the wheels must carry the position (assumed zone statistics)
FIX = {6: "fixed", 5: "float", 3: "single", 1: "none"} # MAVLink GPS_FIX_TYPE codes used here
SIGMA = {6: 0.02, 5: 0.30, 3: 2.5, 1: np.inf} # assumed horizontal 1-sigma (m)
zones = {
"Z1 open yard": [0.97, 0.03, 0.00, 0.00],
"Z2 young trees": [0.70, 0.20, 0.10, 0.00],
"Z3 mature canopy": [0.12, 0.38, 0.35, 0.15],
}
rng = np.random.default_rng(484)
DRIFT, SPEED, CLEAR = 0.015, 1.5, 0.5 # odometry drift per metre, speed (m/s), tolerable error (m)
print("zone fixed float single none | usable longest gap bridging drift")
for name, p in zones.items():
codes, state, seq = [6, 5, 3, 1], 0, []
for t in range(600): # 10 minutes at 1 Hz
if t == 0 or rng.random() > 0.80: # a state persists with probability 0.80
state = rng.choice(4, p=p)
seq.append(codes[state])
seq = np.array(seq)
share = [(seq == c).mean() * 100 for c in codes]
usable = np.isin(seq, (5, 6)) # sigma <= 0.30 m
gap = best = 0
for u in usable:
gap = 0 if u else gap + 1
best = max(best, gap)
dist = best * SPEED
print(f"{name:18s} {share[0]:5.1f} {share[1]:5.1f} {share[2]:6.1f} {share[3]:4.1f} | {usable.mean() * 100:5.1f}% {best:7d} s {dist:8.1f} m {DRIFT * dist:5.2f} m")
print(f"distance the wheels can carry the position within {CLEAR} m: {CLEAR / DRIFT:.1f} m")
zone fixed float single none | usable longest gap bridging drift
Z1 open yard 95.2 4.8 0.0 0.0 | 100.0% 0 s 0.0 m 0.00 m
Z2 young trees 70.0 22.8 7.2 0.0 | 92.8% 9 s 13.5 m 0.20 m
Z3 mature canopy 13.2 46.3 23.0 17.5 | 59.5% 37 s 55.5 m 0.83 m
distance the wheels can carry the position within 0.5 m: 33.3 m
The open yard has no gaps at all. Under the Z3 canopy the usable fix is available only 59.5% of the time and the longest gap is 37 seconds, during which the robot travels 55.5 m. Letting the wheels carry the position through that stretch gives 0.83 m of error, more than the 0.5 m limit, although the wheels can carry it only 33.3 m. Two conclusions follow. First, route stretches under the canopy need a second position source (LiDAR or vision) that does not depend on GNSS. Second, the system must know it is in a stretch where GNSS is unusable, and slow down or stop; that is the subject of module 2.
Three families of state estimators
A state estimator fuses several sources into a belief about the position. The families differ in the form of that belief.
| Family | Belief stored as | Suits | Limits |
|---|---|---|---|
| EKF | Mean and covariance (a single Gaussian) | A position that is well determined and a near-linear model; used in common autopilots | Single-peak assumption: if the belief has several peaks it picks the wrong one and can become overconfident |
| Particle filter | A set of weighted particles, any shape | Multi-peak beliefs, such as not knowing which corridor you are in; localization in a known map (Dellaert et al., 1999) | Cost grows with the number of particles, and particles can degenerate until few carry weight (Arulampalam et al., 2002) |
| Factor graph | A graph of “factors”, each one measurement, solved all together | Highest accuracy in hindsight, SLAM mapping (Dellaert & Kaess, 2017) | Needs future data, so it suits post-processing or sliding windows, not direct control |
A practical rule is to use an EKF as the real-time estimator that feeds the controller, a particle filter when “where am I?” has several possible answers, and a factor graph when you need to correct data in hindsight or build a map. In practice they are combined, for example an autopilot running an EKF while a companion computer runs graph-based SLAM and supplies reference positions (Thrun et al., 2005).
The orchard has a problem that the EKF cannot handle: look-alike corridors. The lanes between rows are identical. If canopy GNSS is off by half a lane or more, the filter will think it is in a neighbouring lane, and a sensor that sees only the trunks on both sides cannot say which lane it is.
Example 3 EKF versus particle filter when you do not know which corridor you are in
The block has five corridors 8 m wide, centred at y = 4, 12, 20, 28 and 36 m. The vehicle is in corridor 4 (y = 28 m). Canopy GNSS reads 21.5 m, which is 6.5 m wrong because of multipath, yet the receiver reports an error of 2.5 m. A LiDAR can measure the lateral offset to the lane centre (error 0.30 m), but every corridor gives the same value. At the end of the row there is a water tank on the map at y = 31 m, visible only from corridor 4. Both filters start from the same GNSS value. The EKF starts from the belief N(21.5, 2.5²) and associates with the nearest lane centre. The 2,000-particle filter starts from a wider belief N(21.5, 6²) because we know canopy GNSS understates its error (all assumed values).
import numpy as np
# Example 3: five identical corridors between tree rows; an EKF and a particle filter start from the same canopy GNSS reading
rng = np.random.default_rng(7)
Y_TRUE, Y_TANK = 28.0, 31.0 # true lateral position (corridor 4) and the water tank on the map (m)
SIG_Z, SIG_G, STEPS = 0.30, 2.5, 30 # offset sensor noise, stated GNSS sigma, seconds before the tank is seen
GNSS = 21.5 # canopy fix: really 6.5 m off (multipath), but the receiver claims 2.5 m
centre = lambda y: 4.0 + 8.0 * np.round((y - 4.0) / 8.0) # nearest corridor centre line
# --- EKF: Gaussian belief N(21.5, 2.5^2), data association to the nearest corridor
x, P, y = GNSS, SIG_G ** 2, Y_TRUE
for _ in range(STEPS):
y += rng.normal(0, 0.02)
z = (y - centre(y)) + rng.normal(0, SIG_Z) # lateral offset from the centre of the corridor
P += 0.02 ** 2
nu = z - (x - centre(x)); S = P + SIG_Z ** 2; K = P / S
x += K * nu; P *= 1 - K
print(f"EKF after {STEPS} s: y = {x:.2f} m, sigma = {np.sqrt(P):.2f} m (truth {Y_TRUE})")
z_tank = (Y_TANK - y) + rng.normal(0, SIG_Z) # the tank is seen 3 m to the side
nu = z_tank - (Y_TANK - x); S = P + SIG_Z ** 2
print(f"EKF sees the tank: innovation {nu:+.1f} m, NIS {nu ** 2 / S:.0f} -> {'rejected' if nu ** 2 / S > 3.84 else 'used'} (gate 3.84)")
# --- particle filter: honest broad prior N(21.5, 6^2), 2000 particles
N = 2000
pts = np.clip(rng.normal(GNSS, 6.0, N), 0.0, 40.0)
w = np.full(N, 1.0 / N)
def mass(p, w): # probability mass per corridor
k = np.clip(np.round((p - 4.0) / 8.0).astype(int), 0, 4)
return np.bincount(k, weights=w, minlength=5)
def resample(p, w):
idx = rng.choice(len(p), len(p), p=w / w.sum())
return p[idx] + rng.normal(0, 0.05, len(p)), np.full(len(p), 1.0 / len(p))
y = Y_TRUE
for _ in range(STEPS):
y += rng.normal(0, 0.02)
z = (y - centre(y)) + rng.normal(0, SIG_Z)
pts = pts + rng.normal(0, 0.02, N)
w = w * np.exp(-0.5 * ((z - (pts - centre(pts))) / SIG_Z) ** 2) + 1e-300
w /= w.sum()
if 1.0 / np.sum(w ** 2) < N / 2:
pts, w = resample(pts, w)
m = mass(pts, w)
print("PF mass per corridor before the tank: " + " ".join(f"c{k + 1} {v:.2f}" for k, v in enumerate(m)))
z_tank = (Y_TANK - y) + rng.normal(0, SIG_Z)
w = w * np.exp(-0.5 * ((z_tank - (Y_TANK - pts)) / SIG_Z) ** 2) + 1e-300
w /= w.sum()
m = mass(pts, w)
print("PF mass per corridor after the tank: " + " ".join(f"c{k + 1} {v:.2f}" for k, v in enumerate(m)))
print(f"PF effective sample size after the tank: {1.0 / np.sum(w ** 2):.0f} of {N}; estimate y = {np.sum(w * pts):.2f} m")
EKF after 30 s: y = 19.82 m, sigma = 0.08 m (truth 28.0)
EKF sees the tank: innovation -7.9 m, NIS 657 -> rejected (gate 3.84)
PF mass per corridor before the tank: c1 0.00 c2 0.15 c3 0.56 c4 0.28 c5 0.01
PF mass per corridor after the tank: c1 0.00 c2 0.00 c3 0.00 c4 1.00 c5 0.00
PF effective sample size after the tank: 565 of 2000; estimate y = 28.05 m
The EKF believes y = 19.82 m, which is corridor 3, with a sigma of only 0.08 m, although it is 8 m wrong. On seeing the tank, the innovation is 7.9 m, giving an NIS of 657, far past the gate of 3.84, so the measurement is thrown away. Because sigma is small, the filter rejects correct data and stays confident in a wrong answer. The particle filter, with a belief wide enough to keep every corridor alive, assigns probability 0.56 to corridor 3 and 0.28 to corridor 4, the true one, before the tank is seen: not yet the winner, but not discarded. After the tank, corridor 4 gets 1.00 and the estimated position is 28.05 m. The effective number of particles drops to 565 of 2,000, showing how much possibility this one measurement removed. If the data contradicted the old belief even more strongly, too few particles might remain and the filter would need resampling or a fresh start.
The example teaches three lessons. First, the belief must be as wide as the real uncertainty, not as wide as the receiver reports. Second, do not multiply in GNSS measurements again and again if their errors are correlated in time (here the 6.5 m error persists throughout), because that makes the filter ever more sure of a wrong answer; that is why GNSS is used only once, as the starting belief. Third, a gate protects against bad measurements, but when the filter is confidently wrong the gate also throws away the good ones, so a detector for continued rejection is needed to restart the belief.
Smoothing and factor graphs
All the filters above estimate the position at the current time from past data only (filtering). If later data show that an earlier position was wrong, for example when RTK returns after the vehicle leaves the canopy, a filter cannot fix the past; it can only jump to the new position. Smoothing uses the whole data set to estimate every position at once.
A factor graph states the problem as a graph. The variables are the positions at each time, and a factor is one measurement linking variables: an odometry factor links the positions at two consecutive times, a GNSS factor ties one time to the value the receiver read. When the noise is Gaussian, finding the positions that best fit all factors is a least-squares problem, solved in one step if it is linear or by repeated iterations if not. Mapping software uses this structure as its back end (Dellaert & Kaess, 2017).
Example 4 Filter versus smoother when RTK returns
The robot drives a 120 m row. The first 20 m and the last 20 m are outside the canopy and get RTK fixed; the middle 80 m has no GNSS. Wheel odometry has a 1.5% scale error and 2 cm of noise per step (assumed). A one-dimensional filter moves forward in time on odometry and resets when a fix arrives. The smoother builds an odometry factor for every step and a GNSS factor at every fixed point, then solves them all together by least squares.
import numpy as np
# Example 4: filter versus smoother along a 120 m row (RTK fixed at both ends, no GNSS under the canopy in between)
rng = np.random.default_rng(3)
N = 121
truth = np.arange(N, dtype=float) # one pose per metre
odo = np.diff(truth) * 1.015 + rng.normal(0, 0.02, N - 1) # wheel odometry: 1.5 % scale error plus 2 cm noise (assumed)
fix = np.zeros(N, bool); fix[:21] = True; fix[100:] = True # RTK fixed at 0-20 m and 100-120 m
gnss = truth + rng.normal(0, 0.02, N)
SIG_G, SIG_O = 0.02, 0.03
# forward filter: dead-reckon, reset to the fix when there is one (one-dimensional Kalman filter)
est, P = np.zeros(N), np.zeros(N)
est[0], P[0] = gnss[0], SIG_G ** 2
for k in range(1, N):
est[k], P[k] = est[k - 1] + odo[k - 1], P[k - 1] + SIG_O ** 2
if fix[k]:
K = P[k] / (P[k] + SIG_G ** 2)
est[k] += K * (gnss[k] - est[k]); P[k] *= 1 - K
# smoother: all factors at once, solved as one linear least-squares problem (a tiny factor graph)
rows, rhs = [], []
for k in range(N - 1): # odometry factor between pose k and k+1
r = np.zeros(N); r[k], r[k + 1] = -1 / SIG_O, 1 / SIG_O
rows.append(r); rhs.append(odo[k] / SIG_O)
for k in np.flatnonzero(fix): # GNSS factor on pose k
r = np.zeros(N); r[k] = 1 / SIG_G
rows.append(r); rhs.append(gnss[k] / SIG_G)
smooth = np.linalg.lstsq(np.array(rows), np.array(rhs), rcond=None)[0]
canopy = slice(21, 100)
for name, e in (("filter ", est - truth), ("smoother", smooth - truth)):
print(f"{name}: error at 60 m {abs(e[60]):.2f} m, largest {np.abs(e).max():.2f} m, RMS in the canopy {np.sqrt(np.mean(e[canopy] ** 2)):.2f} m")
print(f"filter jump when RTK returns at 100 m: {abs((est[100] - est[99]) - odo[99]):.2f} m")
filter : error at 60 m 0.63 m, largest 1.10 m, RMS in the canopy 0.66 m
smoother: error at 60 m 0.05 m, largest 0.10 m, RMS in the canopy 0.05 m
filter jump when RTK returns at 100 m: 1.15 m
The filter is off by 0.63 m at 60 m and by at most 1.10 m before RTK returns, then jumps 1.15 m in a single step at 100 m. The smoother is off by only 0.05 m at 60 m and 0.10 m at most, because on finding the far end 1.2 m away from what odometry said, it spreads the difference back across the whole stretch in proportion to the confidence of the factors, which matches a scale error that grows in proportion to distance.
A smoother suits work done in hindsight, such as assigning coordinates to images the drone took under the canopy before they go into mapping software, or building a map of the orchard from a survey run. A real-time controller cannot use a full smoother because it would need future data. What is usable is smoothing over a short sliding window, or using the smoothed result as a reference position in map while the controller keeps relying on the continuous odom, matching the two-frame split mentioned at the start.
Module lab
Lab: log fix types and compare the filter with the smoother
- Pick a walking route at least 100 m long on campus that passes both open ground and under large trees, get permission from the area’s keeper first, and mount a GNSS receiver (with RTK if available) on a cart or a robot that has a wheel odometer, or mark every 10 m with a tape.
- Walk the route at constant speed and log time, fix type, satellite count, HDOP and wheel distance. Do three runs at different times of day.
- Divide the route into zones, then adapt the code of Example 2 to read the real data and compute the fix-type shares, the longest gap, and the wheel error across that gap.
- Measure the wheel scale error by comparing the distance the wheel reports with the tape distance, and use it instead of 1.5% in Examples 2 and 4.
- Run Example 4 on the logged data and compare the filter and the smoother at a check point measured by tape in the middle of the route.
- Write a one-page report naming the zones where the wheels cannot carry the position and proposing a second position source for them.
Common mistakes
Watch out
- Passing on a position without its uncertainty, so the layer below cannot tell how much to trust it
- Believing the sigma a GNSS receiver reports under a canopy, when the true value may be several times larger
- Multiplying in measurements whose errors are correlated in time as if independent, which makes the filter overconfident
- Using an EKF on a multi-peak problem, such as identical corridors, and letting the gate reject the correct data
- Estimating pipeline delay from a single stage when all stages are in series
- Letting the controller use a position that jumps instead of a continuous frame
- Using a smoother in a real-time control loop when it needs future data
Summary
- An autonomous navigation system is layered, with layers running at different rates, and the contract between layers must carry both the estimate and its uncertainty.
- Worst-case age of data reaching the actuators is and the average is ; consider the whole pipeline.
- GNSS fix types express quality, degrade in stretches under a canopy, and wheel odometry can carry the position at most .
- An EKF suits a single-peak belief, a particle filter suits several peaks, and a factor graph suits correcting data in hindsight.
- The belief must be as wide as the real uncertainty, and a gate needs a detector for continued rejection.
- A smoother spreads the correction back over the whole stretch, so it suits hindsight work, while control uses the continuous frame.
Self-check questions
- A two-stage pipeline: the first stage runs at 20 Hz and takes 30 ms, the second runs at 10 Hz and takes 20 ms. What are the average and worst-case ages of the data?
- A robot drives at 1.2 m/s through a 40-second stretch with no usable fix. Odometry errs by 1.5% of distance. What is the error, and does it exceed 0.5 m?
- Why did the EKF in Example 3 not recover when it saw the water tank, even though the measurement was correct?
- Particle weights are 0.5, 0.3, 0.1 and 0.1. What is the effective number of particles ?
- Why can a smoother reduce the error in the middle of the canopy, yet not be used directly as the controller’s estimator?
Answers
- On average ms; worst case ms.
- Distance m, error m, which exceeds 0.5 m.
- The EKF chose corridor 3 from the start and became confident (sigma 0.08 m). The innovation of 7.9 m exceeded the gate, so the correct measurement was rejected and the filter never corrected its own belief.
- . Fewer than three effective particles remain, so resampling is needed.
- The smoother uses the RTK data at the end of the row to go back and correct positions in the middle. A real-time controller has no future data at the moment it must command, so it can use only the filter or a short-window smoother.
Key formulas
| Age of data in an asynchronous pipeline (worst case and typical) | |
| Distance the wheels can carry the position before the error exceeds the limit | |
| Effective number of particles | |
| A smoother as a least-squares problem |
Key references
- Thrun, S., Burgard, W., & Fox, D. (2005). Probabilistic robotics. MIT Press. link
- Groves, P. D. (2013). Principles of GNSS, inertial, and multisensor integrated navigation systems (2nd ed.). Artech House. link
- Dellaert, F., Fox, D., Burgard, W., & Thrun, S. (1999). Monte Carlo localization for mobile robots. In Proceedings 1999 IEEE International Conference on Robotics and Automation (Vol. 2, pp. 1322–1328). IEEE. link
- Arulampalam, M. S., Maskell, S., Gordon, N., & Clapp, T. (2002). A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking. IEEE Transactions on Signal Processing, 50(2), 174–188. link
- Dellaert, F., & Kaess, M. (2017). Factor graphs for robot perception. Foundations and Trends in Robotics, 6(1–2), 1–139. link
- Popovici, B., Pelorosso, R., Herbei, M. V., Sala, F., & Avădanei, M. (2026). GNSS positioning accuracy in forest environments: A structured critical review of canopy effects and mitigation strategies. Geodetski list, 80(3), 207–226. link
- MAVLink Development Team. MAVLink common message set (common.xml). link
- PX4 Autopilot. RTK GNSS (GPS). PX4 user guide (main). link
- PX4 Autopilot. Parameter reference. PX4 user guide (main). link
- Borenstein, J., & Feng, L. (1996). Measurement and correction of systematic odometry errors in mobile robots. IEEE Transactions on Robotics and Automation, 12(6), 869–880. link
- ROS Enhancement Proposals. REP 105: Coordinate frames for mobile platforms. link
- Nav2 Maintainers. Navigation concepts. Nav2 documentation (rolling). link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Lab or field practice from worksheets with a safety checklist
Learning evidence: Checked worksheets and quiz results