← Back to the chapter · Previous detail
Technical detail · Particle Filters for Localization
Trigger resampling and choose copies
Worked example: resampling trigger particle count N: 5 normalized weights: 0.62, 0.18, 0.10, 0.06, 0.04 ESS = 1 / (0.62^2 + 0.18^2 + 0.10^2 + 0.06^2 + 0.04^2) ESS = 1 / 0.432 ESS = 2.31 particles example threshold: 0.5 * N = 2.5 decision: ESS is below threshold, so resample. Operational note: After resampling, copy high-weight particles more often, drop weak particles, then add realistic motion noise. Without noise, the copied particles can become identical and the filter may not recover when the next measurement contradicts them.
The resampling step itself has a standard, concrete mechanic worth naming: build a cumulative-weight table from the normalized weights, then map a stream of independent random draws in [0, 1) onto that table to pick which particle each new copy comes from. Continuing the resampling-trigger example above, the cumulative weights are 0.62, 0.80, 0.90, 0.96, and 1.00 for particles P0 through P4. A random draw of 0.30 lands before 0.62, so it selects P0; a draw of 0.75 lands between 0.62 and 0.80, so it selects P1; draws of 0.85, 0.95, and 0.99 select P2, P3, and P4 in turn. Because P0’s weight spans 62 percent of the [0, 1) range, most random draws land there and P0 is copied several times, while P4’s narrow 0.04 span means it is rarely picked and often drops out of the population entirely.
Inspect the full reject-to-copy mechanism in Figure 3.
In the diagram Figure 3, p3 receives 0.00 when it crosses the Corridor wall, then Normalize valid mass gives it no cumulative interval. Random u maps three example draws to particles, and Copy and re-noise explains why high-weight hypotheses multiply without becoming identical forever.