Skip to content
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

refactor(autoware_behavior_velocity_stop_line_module): refactor and test #9424

Merged
merged 6 commits into from
Nov 28, 2024

Conversation

yhisaki
Copy link
Contributor

@yhisaki yhisaki commented Nov 21, 2024

Description

Refactor

Remove createDebugMarkerArray Function

I have removed the createDebugMarkerArray function in this PR. I think this function is no longer used and when I test this function, it throws an std::out_of_range exception.

Prevented transition from START state to APPROACH state

See this conversation.

Refactor modifyPathVelocity

Refactoring modifyPathVelocity eliminates complexity and makes it unit-testable.

Screenshot from 2024-11-22 16-48-19

Test

Coverage is low, but tests what should be essentially tested (speed modification and state transitions).

Screenshot from 2024-11-22 17-01-28

Related links

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 21, 2024
Copy link

github-actions bot commented Nov 21, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@yhisaki yhisaki requested a review from satoshi-ota November 22, 2024 07:55
@yhisaki yhisaki marked this pull request as ready for review November 22, 2024 08:03

break;
}
std::pair<double, std::optional<double>> StopLineModule::getEgoAndStopPoint(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write doxygen.


private:
std::shared_ptr<const rclcpp::Time> stopped_time_;
void updateStateAndStoppedTime(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write doxygen.

Copy link
Contributor

@satoshi-ota satoshi-ota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@yhisaki yhisaki added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 25, 2024
@yhisaki yhisaki enabled auto-merge (squash) November 25, 2024 02:08
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 34.32836% with 44 lines in your changes missing coverage. Please review.

Project coverage is 29.50%. Comparing base (c1bbd68) to head (a868a23).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...e_behavior_velocity_stop_line_module/src/scene.cpp 34.92% 34 Missing and 7 partials ⚠️
...e_behavior_velocity_stop_line_module/src/scene.hpp 0.00% 2 Missing ⚠️
...behavior_velocity_stop_line_module/src/manager.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9424      +/-   ##
==========================================
+ Coverage   29.47%   29.50%   +0.03%     
==========================================
  Files        1440     1446       +6     
  Lines      108556   108569      +13     
  Branches    41499    41476      -23     
==========================================
+ Hits        32001    32038      +37     
+ Misses      73443    73411      -32     
- Partials     3112     3120       +8     
Flag Coverage Δ *Carryforward flag
differential 17.81% <34.32%> (?)
total 29.51% <ø> (+0.03%) ⬆️ Carriedforward from 1e37266

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yhisaki yhisaki disabled auto-merge November 25, 2024 10:58
Signed-off-by: Y.Hisaki <[email protected]>
Signed-off-by: Y.Hisaki <[email protected]>
Signed-off-by: Y.Hisaki <[email protected]>
Signed-off-by: Y.Hisaki <[email protected]>
Signed-off-by: Y.Hisaki <[email protected]>
@yhisaki yhisaki force-pushed the test-and-refactor-stop_line branch from edd0697 to a868a23 Compare November 28, 2024 10:03
@github-actions github-actions bot removed the component:common Common packages from the autoware-common repository. (auto-assigned) label Nov 28, 2024
@yhisaki yhisaki enabled auto-merge (squash) November 28, 2024 10:03
@yhisaki yhisaki merged commit 45a3c48 into autowarefoundation:main Nov 28, 2024
32 checks passed
@yhisaki yhisaki deleted the test-and-refactor-stop_line branch February 5, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants