Skip to content

Replace KF in robot localizer with EKF - #3954

Merged
StarrryNight merged 50 commits into
masterfrom
samuel/use_ekf_push
Oct 11, 2026
Merged

StarrryNight merged 50 commits into
masterfrom
samuel/use_ekf_push

Conversation

@StarrryNight

@StarrryNight StarrryNight commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Replaces linear kalman filter of robot localizer with an Extended kalman filter

Testing Done

Tested on sim by hooking up er force simulator with an instance of robot localizer. The robot localizer takes in vision packets generated and synthesize noisy IMU and motor data as filter update inputs.

Results are testing by running sim under identical situations except for robot localizer:
enable realism, CI mode, and record stats for 1 minute
image

Videos of XY tracking:

Resolved Issues

Length Justification and Key Files to Review

Before:

Position estimation is okay, sometimes drifts a bit when turning
Screencast from 2026-09-14 21-58-47.webm

Velocity estimation is horrible and noisy. Notable delay of estimation from ground truth.
Screencast from 2026-09-14 21-58-20.webm

After

Position estimation is notably better during turning
Screencast from 2026-09-14 21-56-53.webm

Big improvement in velocity tracking. The control input fixed the latency from vision.
Screencast from 2026-09-14 21-54-19.webm

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@StarrryNight
StarrryNight added this pull request to stack #3955 September 15, 2026 03:23
@StarrryNight
StarrryNight marked this pull request as ready for review September 15, 2026 03:35

@the-anh-hoang the-anh-hoang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description said you linked sim with an instance of robot localizer to run tests but I don't see any changes in er_force_simulator.cpp, only linked in build file but never used based on the changes.

But otherwise LGTM!

Base automatically changed from samuel/refactor_robot_localizer to master October 11, 2026 00:04
@StarrryNight
StarrryNight merged commit f699ecb into master Oct 11, 2026
14 of 15 checks passed
@StarrryNight
StarrryNight deleted the samuel/use_ekf_push branch October 11, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants