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(planning_test_utils): add subscriber existance checker and topic name validation #3462

Conversation

kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Apr 19, 2023

Description

  • Add feature to throw an error if there is no subscriber for the topic being published from test_node
  • Add feature to throw an error if the name of the topic being published from test_node is not defined
  • Function consolidation
  • Remove ament_cmake_gtest dependency from the planning_test_utils package
  • Move the message generation for publishing from the test_node to utils

Tests performed

run the test with following command and all success

colcon test --event-handlers console_cohesion+ --packages-select behavior_path_planner planning_validator motion_velocity_smoother motion_velocity_smoother obstacle_stop_planner obstacle_stop_planner obstacle_stop_planner freespace_planne

Effects on system behavior

Not applicable.

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.

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.

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 Apr 19, 2023
kyoichi-sugahara and others added 14 commits April 21, 2023 01:07
Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: kyoichi-sugahara <[email protected]>
… and obstacle_velocity_limiter

Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: kyoichi-sugahara <[email protected]>
@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 14.94% and project coverage change: -0.10 ⚠️

Comparison is base (001a865) 14.05% compared to head (2dd14a8) 13.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3462      +/-   ##
==========================================
- Coverage   14.05%   13.95%   -0.10%     
==========================================
  Files        1397     1397              
  Lines       98030   100151    +2121     
  Branches    29104    30648    +1544     
==========================================
+ Hits        13779    13980     +201     
- Misses      69588    71278    +1690     
- Partials    14663    14893     +230     
Flag Coverage Δ *Carryforward flag
differential 12.75% <14.94%> (?)
total 14.05% <ø> (+<0.01%) ⬆️ Carriedforward from 001a865

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

Impacted Files Coverage Δ
...test/test_behavior_path_planner_node_interface.cpp 27.90% <0.00%> (ø)
...ner/test/test_freespace_planner_node_interface.cpp 12.50% <0.00%> (ø)
...t/test_motion_velocity_smoother_node_interface.cpp 12.50% <0.00%> (ø)
...st/test_obstacle_cruise_planner_node_interface.cpp 13.33% <0.00%> (ø)
...test/test_obstacle_stop_planner_node_interface.cpp 11.11% <ø> (ø)
.../test_obstacle_velocity_limiter_node_interface.cpp 11.76% <0.00%> (ø)
...est/src/test_planning_validator_node_interface.cpp 15.38% <0.00%> (-1.29%) ⬇️
..._manager/planning_interface_test_manager_utils.hpp 12.19% <3.48%> (-6.04%) ⬇️
...test_utils/src/planning_interface_test_manager.cpp 44.01% <21.31%> (+7.81%) ⬆️
...tor/test/test_scenario_selector_node_interface.cpp 34.14% <55.55%> (+24.62%) ⬆️

... and 10 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

obstacle stop planner

@kyoichi-sugahara
Copy link
Contributor Author

@purewater0901 @takayuki5168 @maxime-clem
could you approve this PR?
I confirmed test passed with each node with following command.

colcon test --event-handlers console_cohesion+ --packages-select behavior_path_planner planning_validator motion_velocity_smoother motion_velocity_smoother obstacle_stop_planner obstacle_stop_planner obstacle_stop_planner freespace_planner

@kyoichi-sugahara kyoichi-sugahara enabled auto-merge (squash) April 27, 2023 06:02
@TakaHoribe TakaHoribe merged commit 855188a into autowarefoundation:main Apr 27, 2023
kyoichi-sugahara added a commit to tier4/autoware.universe that referenced this pull request Apr 27, 2023
…opic name validation (autowarefoundation#3462)

* add subscriber existance checker and topic name validation

Signed-off-by: kyoichi-sugahara <[email protected]>

* change function structure

Signed-off-by: kyoichi-sugahara <[email protected]>

* refactor

Signed-off-by: kyoichi-sugahara <[email protected]>

* style(pre-commit): autofix

* refactor

Signed-off-by: kyoichi-sugahara <[email protected]>

* delete ASSERT_NO_THROW

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in motion_velocity_smoother and planning_validator

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in obstacle_velocity_limiter, obstacle_stop_planner and obstacle_velocity_limiter

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in scenario_selector

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in freespace_planner

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in behavior_path_planner

Signed-off-by: kyoichi-sugahara <[email protected]>

* Remove ament_cmake_gtest dependency from the planning_test_utils package

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix typo

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@kyoichi-sugahara kyoichi-sugahara deleted the test/add-subscribers-checker-in-test-utils branch May 12, 2023 04:45
Mingyu1991 pushed a commit to Mingyu1991/autoware.universe that referenced this pull request Jun 26, 2023
…opic name validation (autowarefoundation#3462)

* add subscriber existance checker and topic name validation

Signed-off-by: kyoichi-sugahara <[email protected]>

* change function structure

Signed-off-by: kyoichi-sugahara <[email protected]>

* refactor

Signed-off-by: kyoichi-sugahara <[email protected]>

* style(pre-commit): autofix

* refactor

Signed-off-by: kyoichi-sugahara <[email protected]>

* delete ASSERT_NO_THROW

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in motion_velocity_smoother and planning_validator

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in obstacle_velocity_limiter, obstacle_stop_planner and obstacle_velocity_limiter

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in scenario_selector

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in freespace_planner

Signed-off-by: kyoichi-sugahara <[email protected]>

* modify test files in behavior_path_planner

Signed-off-by: kyoichi-sugahara <[email protected]>

* Remove ament_cmake_gtest dependency from the planning_test_utils package

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix typo

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Mingyu Li <[email protected]>
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants