Skip to content

feat(estimation): data association for EKF-SLAM, and an example - #264

Merged
pockerman merged 1 commit into
masterfrom
feat/slam-data-association
Nov 30, 2026
Merged

pockerman merged 1 commit into
masterfrom
feat/slam-data-association

Conversation

@pockerman

Copy link
Copy Markdown
Owner

EKFSlam::update_unknown() takes sightings without landmark ids and works out which landmark each is of: it scores every sighting against every landmark by the squared Mahalanobis distance of the innovation, pairs them greedily, the closest first, each landmark at most once a scan, within a match gate (9.21, chi-squared 99 % with 2 degrees of freedom); a sighting beyond a new-landmark gate (25) from every landmark is a new one, and one in between is dropped. EKFSlam::mahalanobis() gives the distance of one sighting from one landmark.

The ekf_slam_data_association example drives the loop of ekf_slam with noisier odometry and two pairs of posts 40 cm apart, and associates the same data four ways: with the ids; by the nearest post within 0.2 m, which maps posts again and again; within 0.5 m, which confuses the close posts and drags the robot 1.8 m off; and by the Mahalanobis distance, which does as well as the ids. Its page has an image of the four maps.

EKFSlam::update_unknown() takes sightings without landmark ids and works out
which landmark each is of: it scores every sighting against every landmark by
the squared Mahalanobis distance of the innovation, pairs them greedily, the
closest first, each landmark at most once a scan, within a match gate (9.21,
chi-squared 99 % with 2 degrees of freedom); a sighting beyond a new-landmark
gate (25) from every landmark is a new one, and one in between is dropped.
EKFSlam::mahalanobis() gives the distance of one sighting from one landmark.

The ekf_slam_data_association example drives the loop of ekf_slam with noisier
odometry and two pairs of posts 40 cm apart, and associates the same data four
ways: with the ids; by the nearest post within 0.2 m, which maps posts again
and again; within 0.5 m, which confuses the close posts and drags the robot
1.8 m off; and by the Mahalanobis distance, which does as well as the ids. Its
page has an image of the four maps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pockerman pockerman self-assigned this Nov 30, 2026
@pockerman pockerman added the enhancement New feature or request label Nov 30, 2026
@pockerman
pockerman merged commit 0e7ee39 into master Nov 30, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant