Ball Kalman Filter and KF base class#3698
Draft
StarrryNight wants to merge 72 commits into
Draft
Conversation
…into Andrewyx/realistic_dribble
Blends damping from 0.994 toward 0.3 after 1s grace period to prevent the filter from predicting unbounded motion when the ball is occluded.
59687c5 to
a50d26a
Compare
Member
|
@StarrryNight just a note, this PR should wait for #3723 to be merged first. I think you already have the same kalman filter code, but I'll write tests first and merge into master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DO NOT REVIEW
(Changes for now also includes using true locations for validation. That has been moved to a separate PR #3699 .
Testing Done
Currently:
KF improves occluded predictions dramatically
Master predicts position ~2cm better than kalman filter.
KF is being tuned to predict position more accurately
More heuristics are being added to the KF to account for the non-linearity caused by robot, like kicking, dribbling, etc.
Test EKF/UKF and compare the results. We only need to change the prediction step in the kalman filter class to use a different algorithm, as the interface can be kept the same.
Results
./tbots.py run thunderscope --enable_realism --record_stat x--record_stats 200Overall Statistics
Velocity-Stratified Error
Error Distribution
Occlusion Handling
Master: Occlusion causes ball to stop completely at the last known position
https://github.com/user-attachments/assets/d5f64634-9ffa-4712-8221-cc4df7b6105f
Kalman filter: Model predicts ball motion under occlusion pretty accurately.
https://github.com/user-attachments/assets/826ca853-c4f1-446f-96fe-d684f13b0031
Resolved Issues
#3386
#3381
#3538
Length Justification and Key Files to Review
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue