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 tag: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 enabled auto-merge (squash) May 10, 2024 08:28
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 removed the tag: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
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
zulfaqar-azmi-t4 and others added 3 commits May 17, 2024 17:01
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@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 tag: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 <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 added the tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label May 17, 2024
zulfaqar-azmi-t4 and others added 2 commits May 17, 2024 20:29
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@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 <zulfaqar.azmi@tier4.jp>
@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 <zulfaqar.azmi@tier4.jp>

* Added route parser

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Completed parser

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Added route file for later test

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* pre-commit

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Added test for isHandlerReady

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix some cppcheck error

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Added additional test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* move to planning test utils

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* renaming route_parser

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* rename function

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Renaming several things

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* remove some function

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* add additional test

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Update README

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Add more explanation in the readme

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* fix lane change test route width

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
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) tag:deploy-docs Mark for deploy-docs action generation. (used-by-ci) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants