-
Notifications
You must be signed in to change notification settings - Fork 650
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
fix(vehicle_cmd_gate): fix publisher HZ in the unit test by introducing variable window length #6665
Conversation
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6665 +/- ##
==========================================
+ Coverage 14.78% 14.79% +0.01%
==========================================
Files 1925 1925
Lines 132734 132750 +16
Branches 39529 39531 +2
==========================================
+ Hits 19625 19641 +16
+ Misses 91137 91136 -1
- Partials 21972 21973 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@takayuki5168 -san I think this is ready for review. I've updated the TODO comments to help future developers to adjust the test to the fixed I will now sleep, hopefully the CI passes now 💤 |
Ok 3 also failed but 4 has passed. 4 would correspond to 30ms window. I think it should be ok. |
control/vehicle_cmd_gate/test/src/test_filter_in_vehicle_cmd_gate_node.cpp
Outdated
Show resolved
Hide resolved
@takayuki5168 is it ok to merge this? |
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.
Sorry to be late. LGTM!
control/vehicle_cmd_gate/test/src/test_filter_in_vehicle_cmd_gate_node.cpp
Outdated
Show resolved
Hide resolved
…ng variable window length (autowarefoundation#6665) Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Description
Continuation from:
Attempts to fix:
@takayuki5168 -san, I've implemented this variable window length calculation to smooth out the control values.
autoware.universe/control/vehicle_cmd_gate/test/src/test_filter_in_vehicle_cmd_gate_node.cpp
Lines 84 to 86 in 9f31957
checkFilter(2)
should work same as the original implementation.But higher values will will average over 3 or more values for buffering spiky test results.
Tests performed
Local machine
colcon test --event-handlers console_cohesion+ --packages-select vehicle_cmd_gate
passes successfully with or without this PR.CI runners
Test with
checkFilter(2)
❌, 👌Ok, with
checkFilter(2)
, it has failed the same way as expected.Now removing the
checkFilter(2)
.Test with
checkFilter(3) and checkFilter(4)
✅It worked for the both tests 😄
Now will remove the redundant print line.
autoware.universe/control/vehicle_cmd_gate/test/src/test_filter_in_vehicle_cmd_gate_node.cpp
Line 301 in 3e2f33b
Effects on system behavior
Not applicable.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.