fix(velocity_smoother): missing unit tests for resampling and invalid subscribed input topic#562
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an incorrect topic in the smoother node interface tests and adds comprehensive unit tests for trajectory resampling to prevent regressions.
- Updated test topic strings from
output/trajectorytoinput/trajectory - Introduced
test_resample.cppwith extensive resampling scenarios - Ensures new tests cover velocity smoother functionality without breaking existing behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| planning/autoware_velocity_smoother/test/test_velocity_smoother_node_interface.cpp | Corrected the input trajectory topic name |
| planning/autoware_velocity_smoother/test/test_resample.cpp | Added new unit tests for trajectory resampling |
Comments suppressed due to low confidence (1)
planning/autoware_velocity_smoother/test/test_resample.cpp:126
- Add a test case for backward (negative) velocities to verify that the resampler correctly handles reverse driving scenarios, since the PR aims to address backwards driving errors.
class TrajectoryResampleTest : public ::testing::Test
69244d5 to
22e4111
Compare
|
|
||
| publishMandatoryTopics(test_manager, test_target_node); | ||
|
|
||
| const std::string input_trajectory_topic = "velocity_smoother/output/trajectory"; |
There was a problem hiding this comment.
here is the fix, the input topic published to the output
2942908 to
c122748
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #562 +/- ##
==========================================
- Coverage 49.60% 48.86% -0.75%
==========================================
Files 338 338
Lines 21271 23726 +2455
Branches 9694 10850 +1156
==========================================
+ Hits 10552 11594 +1042
- Misses 9743 11031 +1288
- Partials 976 1101 +125
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically marked as stale because it has not had recent activity. |
|
@sasakisasaki friendly ping |
|
@ralwing Sorry for being late to reply, let me do review soon (within a few hours) 🙏 |
sasakisasaki
left a comment
There was a problem hiding this comment.
Thank you very much for providing the tests. Nice PR 👍 Not only the code, and also the enriched comments with ASCII diagrams are super helpful for understanding.
First of all, let me put a quick comment from my side. Please feel free to let me know if there is any my misunderstanding and so on.
| const double ds = std::max( | ||
| current_velocity * resample_param_.dense_resample_dt, | ||
| resample_param_.dense_min_interval_distance); | ||
| const int expected_min_points = static_cast<int>(input.back().pose.position.x / ds); |
There was a problem hiding this comment.
(Note for myself) ds would be > 0.5 as this line: resample_param_.dense_min_interval_distance = 0.5;
7419cc5 to
9d5a66d
Compare
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
cdca5b3 to
bff625d
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
63b4afc to
fc436af
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@sasakisasaki Could I kindly ask you to spare some time to review this PR? I believe it is now ready to be merged. I think it's good to go. |
sasakisasaki
left a comment
There was a problem hiding this comment.
Looks fine! I agree with merging this PR while I put a minor comment 👍
|
@autowarefoundation/autoware-core-global-codeowners Review request 😉 |
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
|
@go-sakayori kindly ping :-) |
Description
A few error has been reported regarding the backwards driving in autoware. We'd like to contribute by fixing them.
Firstly to allow proceeding on these errors we need to fix and add some unit tests to confirm that the changes doesn't brake any other functionallties.
This PR fixes
Related links
Parent Issue:
autowarefoundation/autoware_universe#5938
autowarefoundation/autoware_universe#5976
How was this PR tested?
(ADDED by @sasakisasaki) Unit tests passed in CI
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.