-
Notifications
You must be signed in to change notification settings - Fork 122
Fix ball filter linear regression relative error bug #3538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix ball filter linear regression relative error bug #3538
Conversation
GrayHoang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Andrewyx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, but can you update ball_filter.h to include the fact it returns the value of the error itself now? Additionally, if possible, it would be helpful to note if that value is in terms of the MSE just so that future reference to this function is clearer as to how the regression error is being generated. Otherwise, nice work!
StarrryNight
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Description
Fixes bug where ball velocity is inaccurately being calculated/estimated. The bug is caused by the following logic:
The simple fix is just to use absolute error, since relative error for linear regression in this context of coordinates makes no sense, since we expect similar error for the estimated trajectory of the ball no matter where it is on the field.
Testing Done
Ran tests for ball_filter and passes. Also ran the original test that caused this bug and it is fixed (proper velocity being reported)
Resolved Issues
fixes #3527
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