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

test(bpp_common): add unit test for safety check #9386

Merged

Conversation

go-sakayori
Copy link
Contributor

@go-sakayori go-sakayori commented Nov 19, 2024

Description

Add unit test for autoware_behavior_path_planner_common/utils/safety_check.cpp
image

Related links

None

How was this PR tested?

Colcon test

4: [==========] Running 28 tests from 3 test suites.
4: [----------] Global test environment set-up.
4: [----------] 16 tests from BehaviorPathPlanningSafetyUtilsTest
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.isTargetObjectOncoming
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.isTargetObjectOncoming (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.isTargetObjectFront
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.isTargetObjectFront (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.createExtendedEgoPolygon
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.createExtendedEgoPolygon (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.createExtendedObjPolygon
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.createExtendedObjPolygon (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.convertToPredictedPath
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.convertToPredictedPath (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.calcRssDistance
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.calcRssDistance (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.calc_minimum_longitudinal_length
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.calc_minimum_longitudinal_length (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.get_interpolated_pose_with_velocity_and_polygon_stamped
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.get_interpolated_pose_with_velocity_and_polygon_stamped (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.filterPredictedPathAfterTargetPose
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.filterPredictedPathAfterTargetPose (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.checkSafetyWithRSS
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.checkSafetyWithRSS (4 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.checkSafetyWithIntegralPredictedPolygon
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.checkSafetyWithIntegralPredictedPolygon (8 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.checkCollision
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.checkCollision (8 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.checkPolygonsIntersects
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.checkPolygonsIntersects (1 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.calc_obstacle_length
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.calc_obstacle_length (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.checkObjectsCollisionRough
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.checkObjectsCollisionRough (0 ms)
4: [ RUN      ] BehaviorPathPlanningSafetyUtilsTest.calculateRoughDistanceToObjects
4: [       OK ] BehaviorPathPlanningSafetyUtilsTest.calculateRoughDistanceToObjects (0 ms)
4: [----------] 16 tests from BehaviorPathPlanningSafetyUtilsTest (21 ms total)

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

go-sakayori and others added 4 commits November 19, 2024 18:20
Signed-off-by: Go Sakayori <[email protected]>
Signed-off-by: Go Sakayori <[email protected]>
Signed-off-by: Go Sakayori <[email protected]>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 19, 2024
Copy link

github-actions bot commented Nov 19, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@go-sakayori go-sakayori added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.91%. Comparing base (5778e01) to head (525ead7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9386      +/-   ##
==========================================
+ Coverage   29.77%   29.91%   +0.14%     
==========================================
  Files        1338     1344       +6     
  Lines      103364   103408      +44     
  Branches    40234    40235       +1     
==========================================
+ Hits        30773    30934     +161     
+ Misses      69606    69474     -132     
- Partials     2985     3000      +15     
Flag Coverage Δ *Carryforward flag
differential 20.00% <ø> (?)
total 29.77% <ø> (ø) Carriedforward from 5778e01

*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.


🚨 Try these New Features:

@go-sakayori go-sakayori merged commit 2e0d5de into autowarefoundation:main Nov 19, 2024
41 of 42 checks passed
@go-sakayori go-sakayori deleted the test/bpp_common_safety_check branch November 19, 2024 12:12
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) tag: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.

2 participants