-
Notifications
You must be signed in to change notification settings - Fork 62
Added U-turn detection function (issue #362) #507
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?
Added U-turn detection function (issue #362) #507
Conversation
…accumulated rotation angle to judge
Make the error message more detailed Co-authored-by: Vasco Schiavo <[email protected]>
Avoid long lines
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
=======================================
Coverage 99.87% 99.87%
=======================================
Files 28 28
Lines 1568 1579 +11
=======================================
+ Hits 1566 1577 +11
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi @Angelneer926, you may have noticed some CI checks are not passing. It seems some added lines of code are not covered by tests. Would you mind investigating this? As per our guidelines, all our code contributions should be fully tested. Thanks! |
Add a test of Value Error,
for more information, see https://pre-commit.ci
|
Added an U-turn detection function.
Description
What is this PR
Why is this PR needed?
This PR implements U-turn detection, as requested in issue #362.
What does this PR do?
Using the extreme value difference of the accumulated rotation angle to judge. (support setting extreme value threshold)
References
#362
How has this PR been tested?
The new code has been tested using a fixture that provides a mock dataset for U-turn detection, ensuring that the function detect_u_turns works correctly for both "forward_vector" and "displacement" directions. Tests also verify that the U-turn detection results match the expected values, with results under different thresholds all meeting the expectations.
Is this a breaking change?
No
Does this PR require an update to the documentation?
The docstring has been updated to explain the new detection method and parameters.
Checklist: