Unit tests: UKF sigma points and their weights
Opened by @ShisatoYano · Assignees: @leninworld
Claim Status & GitHub Signal
Assigned on GitHub (@leninworld). Check recent comments before starting duplicate work.
The issue involves writing unit tests for specific functions in a class, which is a common task for beginners in software development. It requires understanding of basic testing principles and familiarity with pytest, but does not require extensive knowledge of the entire codebase or complex algorithms.
What It's About
Adding unit tests for the sigma points and weights in the Unscented Kalman Filter localization component.
Why It Matters
Unit tests are crucial for ensuring the correctness of the algorithms in the Unscented Kalman Filter, which is fundamental for accurate localization in autonomous vehicles.
Expected Outcome
A set of unit tests that validate the behavior of sigma points and weights in the Unscented Kalman Filter, ensuring they meet specified criteria.
Log in to compare this issue's requirements against your profile skills. Required concepts: unit testing, pytest, Unscented Kalman Filter, sigma points, weights.
Progressive AI Hints
Hint #1 is always free and calibrated to your experience level. Extra hints unlock with coins without spoiling the full solution.
Skill-Gap Learning
Issue Description
Part of #103.
Problem
test_ukf_localization_path_tracking.py only runs the simulation. Nothing checks the sigma points and weights that UnscentedKalmanFilterLocalizer builds, which are the core of the unscented transform.
Expected change
Add unit tests for UnscentedKalmanFilterLocalizer (src/components/localization/kalman_filter/unscented_kalman_filter_localizer.py), using _decide_sigma_weights() and _generate_sigma_points():
- The state weights
STATE_WEIGHTSadd up to 1 _generate_sigma_points()returns 2n + 1 = 9 points for the 4-dimensional state, and the first one is the state itself- The weighted mean of the sigma points (with
STATE_WEIGHTS) gives back the state - The weighted covariance of the sigma points around the state (with
COV_WEIGHTS) gives back the covariance you passed in - Use a non-diagonal, positive definite covariance, so a mistake in the matrix square root would show
How to contribute
- Comment
/claimhere to get assigned - Add the test file under
test/, followingtest/test_polar_histogram.py(sys.path.append(...)to load the module, small deterministic inputs, no plots) - Each test should check a result you can know without running the code, and say in its name what it checks
- Run
. run_test_suites.shbefore opening the PR, and writePart of #103in the description
Good first issue: it needs only the class above and pytest, not the whole simulation.
Linked Pull Requests (0)
No linked or cross-referenced pull requests detected via GitHub timeline. Check comments below for informal claims before starting.
GitHub Comments (2)
/claim
@leninworld This issue is now assigned to you. Thank you!
- Open a pull request with
Closes #338in the description. - If neither a pull request nor a comment from you on this issue appears within 14 days, you are unassigned so that someone else can take it. You can claim it again later.
Issue Troubleshooting Threads (0)
No troubleshooting threads opened for this issue yet. If you hit a test, build, or navigation blocker, post what you've tried so fellow contributors can help.
PR Verification & Rewards
Sign in and link GitHub to verify your PR against this issue and earn XP + coins.
Contribution Workflow
Track your local progress before opening a pull request on GitHub.
Repository Context
Top Repository Paths
Advisory PR Assistant
Helps structure your PR description or unpack reviewer feedback. Does not perform GitHub actions.