Skip to content

test(path_generator): add extra tests #449

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

mitukou1109
Copy link
Contributor

@mitukou1109 mitukou1109 commented Apr 24, 2025

Description

⚠️ This PR must be merged after #511 ⚠️

This PR adds extra tests for path_generator. It includes:

  • consecutive turn in a short section
  • lane deviation check in a route with dense centerline
  • smooth goal connection

Additionally, the test map added by #399 will be moved to autoware_lanelet2_utils/sample_map/dense_centerline so that it will be installed to the share directory.

How was this PR tested?

colcon test --event-handlers console_cohesion+ --packages-select autoware_path_generator

gives the following result:

1: [----------] 1 test from DenseCenterlineTest
1: [ RUN      ] DenseCenterlineTest.generatePath
1: [       OK ] DenseCenterlineTest.generatePath (34 ms)
1: [----------] 1 test from DenseCenterlineTest (34 ms total)
1: 
1: [----------] 1 test from PlanningModuleInterfaceTest
1: [ RUN      ] PlanningModuleInterfaceTest.NodeTestWithExceptionTrajectory
1: [ERROR] [1748514051.060987437] [path_generator]: input route is empty, ignoring...
1: [       OK ] PlanningModuleInterfaceTest.NodeTestWithExceptionTrajectory (2142 ms)
1: [----------] 1 test from PlanningModuleInterfaceTest (2142 ms total)
1: 
1: [----------] 16 tests from UtilsTest
1: [ RUN      ] UtilsTest.getPreviousLaneletWithinRoute
1: [       OK ] UtilsTest.getPreviousLaneletWithinRoute (25 ms)
1: [ RUN      ] UtilsTest.getNextLaneletWithinRoute
1: [       OK ] UtilsTest.getNextLaneletWithinRoute (25 ms)
1: [ RUN      ] UtilsTest.getLaneletsWithinRouteUpTo
1: [       OK ] UtilsTest.getLaneletsWithinRouteUpTo (26 ms)
1: [ RUN      ] UtilsTest.getLaneletsWithinRouteAfter
1: [       OK ] UtilsTest.getLaneletsWithinRouteAfter (25 ms)
1: [ RUN      ] UtilsTest.getTurnSignalRequiredEndPoint
1: [       OK ] UtilsTest.getTurnSignalRequiredEndPoint (24 ms)
1: [ RUN      ] UtilsTest.getFirstSelfIntersectionArcLength
1: [       OK ] UtilsTest.getFirstSelfIntersectionArcLength (25 ms)
1: [ RUN      ] UtilsTest.GetArcLengthOnPath
1: [WARN] [1748514051.743135134] [path_generator.utils.get_arc_length_on_path]: Input lanelet sequence or path is empty, returning 0.
1: [WARN] [1748514051.743269460] [path_generator.utils.get_arc_length_on_path]: Input lanelet sequence or path is empty, returning 0.
1: [WARN] [1748514051.743285512] [path_generator.utils.get_arc_length_on_path]: Input arc length is negative, returning 0.
1: [       OK ] UtilsTest.GetArcLengthOnPath (25 ms)
1: [ RUN      ] UtilsTest.getPathBound
1: [WARN] [1748514051.815295903] [path_generator.utils.get_arc_length_on_bounds]: Input arc length is negative, returning 0.
1: [WARN] [1748514051.815329947] [path_generator.utils.crop_line_string]: Start of crop range is larger than end, returning input as is
1: [WARN] [1748514051.815336327] [path_generator.utils.crop_line_string]: Start of crop range is larger than end, returning input as is
1: [       OK ] UtilsTest.getPathBound (73 ms)
1: [ RUN      ] UtilsTest.cropLineString
1: [WARN] [1748514051.841439991] [path_generator.utils.crop_line_string]: Start of crop range is negative, returning input as is
1: [WARN] [1748514051.841459846] [path_generator.utils.crop_line_string]: Start of crop range is larger than end, returning input as is
1: [       OK ] UtilsTest.cropLineString (26 ms)
1: [ RUN      ] UtilsTest.GetArcLengthOnBounds
1: [WARN] [1748514051.866228680] [path_generator.utils.get_arc_length_on_bounds]: Input arc length is negative, returning 0.
1: [       OK ] UtilsTest.GetArcLengthOnBounds (24 ms)
1: [ RUN      ] UtilsTest.GetArcLengthOnCenterline
1: [WARN] [1748514051.890267314] [path_generator.utils.get_arc_length_on_centerline]: Input left arc length is negative, returning 0.
1: [WARN] [1748514051.890284907] [path_generator.utils.get_arc_length_on_centerline]: Input right arc length is negative, returning 0.
1: [       OK ] UtilsTest.GetArcLengthOnCenterline (24 ms)
1: [ RUN      ] UtilsTest.modifyPathForSmoothGoalConnection
1: [       OK ] UtilsTest.modifyPathForSmoothGoalConnection (27 ms)
1: [ RUN      ] UtilsTest.refinePathForGoal
1: [       OK ] UtilsTest.refinePathForGoal (25 ms)
1: [ RUN      ] UtilsTest.extractLaneletsFromTrajectory
1: [       OK ] UtilsTest.extractLaneletsFromTrajectory (24 ms)
1: [ RUN      ] UtilsTest.isTrajectoryInsideLanelets
1: [       OK ] UtilsTest.isTrajectoryInsideLanelets (26 ms)
1: [ RUN      ] UtilsTest.isInLanelets
1: [       OK ] UtilsTest.isInLanelets (25 ms)
1: [----------] 16 tests from UtilsTest (449 ms total)
1: 
1: [----------] 8 tests from GetTurnSignalTest
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsStoppingAndBeforeFirstDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsStoppingAndBeforeFirstDesiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsStoppingAndInFirstDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsStoppingAndInFirstDesiredSection (32 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsMovingAndAheadOfFirstDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsMovingAndAheadOfFirstDesiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsInFirstRequiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsInFirstRequiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsInConflictedDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsInConflictedDesiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsInSecondRequiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsInSecondRequiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsInSecondDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsInSecondDesiredSection (33 ms)
1: [ RUN      ] GetTurnSignalTest.getTurnSignal/EgoIsOutsideSecondDesiredSection
1: [       OK ] GetTurnSignalTest.getTurnSignal/EgoIsOutsideSecondDesiredSection (32 ms)
1: [----------] 8 tests from GetTurnSignalTest (262 ms total)
1: 
1: [----------] 7 tests from GetFirstIntersectionArcLengthTest
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithGap
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithGap (33 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithFullCrossing
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithFullCrossing (33 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithHalfCrossing
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/UTurnWithHalfCrossing (33 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/Overpass
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/Overpass (33 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithStartEdgeIntersection
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithStartEdgeIntersection (32 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithIntersectionBehind
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithIntersectionBehind (32 ms)
1: [ RUN      ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithIntersectionAhead
1: [       OK ] GetFirstIntersectionArcLengthTest.getFirstIntersectionArcLength/OverpassWithIntersectionAhead (32 ms)
1: [----------] 7 tests from GetFirstIntersectionArcLengthTest (228 ms total)

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Apr 24, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

@mitukou1109 mitukou1109 force-pushed the test/path-generator-extra-tests branch from 326e820 to 2f39de5 Compare June 3, 2025 00:31
@mitukou1109
Copy link
Contributor Author

Now the test won't pass until #511 is merged.

@mitukou1109 mitukou1109 force-pushed the test/path-generator-extra-tests branch 2 times, most recently from 749f296 to 926c34e Compare June 3, 2025 05:17
@kosuke55 kosuke55 force-pushed the test/path-generator-extra-tests branch from 926c34e to f17a2cb Compare June 6, 2025 11:17
@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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