-
Notifications
You must be signed in to change notification settings - Fork 0
FIR filters #81
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: main
Are you sure you want to change the base?
FIR filters #81
Conversation
…ing in changes made to position refiners
…finer's constructor
…ored classes, added new datasets
…e testing utilities
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.
Pull request overview
This PR implements FIR (Finite Impulse Response) filtering for noise reduction in robot position tracking from vision data. The implementation includes a new filter module, comprehensive unit tests validating MSE reduction, and integration into the position refinement pipeline with support for both friendly and enemy robot tracking.
Key Changes:
- New FIR filter implementation with configurable parameters for position smoothing
- Unit tests demonstrating filter effectiveness across 6 robots using real simulation data
- Updated PositionRefiner API to accept team color and robot count parameters for filter initialization
- Added visualization and analysis dependencies (scipy, seaborn, pyqtgraph, pyside6)
Reviewed changes
Copilot reviewed 17 out of 24 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
utama_core/run/refiners/filters.py |
New FIR filter implementation with position and orientation filtering support |
utama_core/tests/refiners/noise_filter_test.py |
Comprehensive unit tests validating MSE reduction for x, y, and vector positions |
utama_core/run/refiners/position.py |
Integration of filters into position refiners (not shown in diff) |
utama_core/tests/refiners/position_unit_test.py |
Updated test signatures to match new PositionRefiner constructor |
utama_core/tests/refiners/position_refiner_integration_test.py |
Updated integration test with new PositionRefiner parameters |
utama_core/run/strategy_runner.py |
Updated PositionRefiner instantiation with team and robot count parameters |
utama_core/entities/data/vision.py |
Added Gaussian noise injection method for testing |
pixi.toml |
Added scipy, seaborn, pyqtgraph, and pyside6 dependencies |
vision_data/*.csv |
Test data files for filter validation |
vision_data/.jupyter/* |
Jupyter workspace configuration (should not be committed) |
main.py |
Changed mode from "rsim" to "grsim" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vision_data/.jupyter/desktop-workspaces/default-37a8.jupyterlab-workspace
Outdated
Show resolved
Hide resolved
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
…ned off filtering by default with a flag to PositionRefiner
…-SSL/Utama-Core into position_filtering_2
…-SSL/Utama-Core into position_filtering_2
Finite Impulse Response (FIR) filters for noise filtering
Results achieved
When testing with grSim using the PID controller under random noise with standard deviation of 10 cm, we achieved a 45% improvement in robot positioning accuracy.
However, under the DWA controller, it creates random oscillations. We suspect it is due to the phase delay that FIR filters inherently caused. As such, we have since focused on developing a Kalman filter.
Note:
Kindly keep the additional unused parameters to the Position Refiner. It is required for Kalman filters, and removing it will require double work.
Completed by @szeyoong-low and @JiamingLiu5