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

feat(route_handler): add unit tests #6961

Conversation

zulfaqar-azmi-t4
Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented May 9, 2024

Description

This PR aims to add and start unit testing for route handler packages. To avoid numeric inputs (for example start and goal poses) to be hard coded, mock data parser is added. The objective of the mock data parser is to simulate output from mission planner.

image

Related links

None

Tests performed

colcon test

Notes for reviewers

Currently route parser is added to the route handler. Although it is weird, at the moment we do not have any consideration on where to actually place it. If in the future, other packages want to use it for testing, it will be moved into a much more suitable place.

Interface changes

None

ROS Topic Changes

None

ROS Parameter Changes

None

Effects on system behavior

None

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label May 9, 2024
@maxime-clem maxime-clem added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 10, 2024
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review May 10, 2024 08:04
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the route-handler-unit-test branch from a904ef7 to 1970163 Compare May 10, 2024 08:26
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 enabled auto-merge (squash) May 10, 2024 08:28
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the route-handler-unit-test branch from 1970163 to 959b8a9 Compare May 13, 2024 01:55
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 removed the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 14, 2024
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as draft May 14, 2024 14:21
auto-merge was automatically disabled May 14, 2024 14:21

Pull request was converted to draft

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 deleted the route-handler-unit-test branch May 17, 2024 01:00
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 restored the route-handler-unit-test branch May 17, 2024 01:02
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the route-handler-unit-test branch from 959b8a9 to 3f3ed45 Compare May 17, 2024 01:03
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the route-handler-unit-test branch from 66a8518 to 5563a6d Compare May 17, 2024 06:44
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review May 17, 2024 09:49
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 17, 2024
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 added the run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label May 17, 2024
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label May 17, 2024
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 enabled auto-merge (squash) May 21, 2024 01:46
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 merged commit b0a0a39 into autowarefoundation:main May 21, 2024
21 of 22 checks passed
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 deleted the route-handler-unit-test branch May 21, 2024 04:01
zulfaqar-azmi-t4 added a commit to zulfaqar-azmi-t4/autoware.universe that referenced this pull request May 28, 2024
* feat(route_handler): add unit tests

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added route parser

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Completed parser

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added route file for later test

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* pre-commit

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added test for isHandlerReady

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* fix some cppcheck error

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Added additional test

Signed-off-by: Zulfaqar Azmi <[email protected]>

* move to planning test utils

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* renaming route_parser

Signed-off-by: Zulfaqar Azmi <[email protected]>

* rename function

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Renaming several things

Signed-off-by: Zulfaqar Azmi <[email protected]>

* style(pre-commit): autofix

* remove some function

Signed-off-by: Zulfaqar Azmi <[email protected]>

* add additional test

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Update README

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Add more explanation in the readme

Signed-off-by: Zulfaqar Azmi <[email protected]>

* style(pre-commit): autofix

* fix lane change test route width

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
* feat(route_handler): add unit tests

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added route parser

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Completed parser

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added route file for later test

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* pre-commit

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Added test for isHandlerReady

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* fix some cppcheck error

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Added additional test

Signed-off-by: Zulfaqar Azmi <[email protected]>

* move to planning test utils

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* renaming route_parser

Signed-off-by: Zulfaqar Azmi <[email protected]>

* rename function

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Renaming several things

Signed-off-by: Zulfaqar Azmi <[email protected]>

* style(pre-commit): autofix

* remove some function

Signed-off-by: Zulfaqar Azmi <[email protected]>

* add additional test

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Update README

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Add more explanation in the readme

Signed-off-by: Zulfaqar Azmi <[email protected]>

* style(pre-commit): autofix

* fix lane change test route width

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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) run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants