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

fix(obstacle stop/slow_down): early return without point cloud #10289

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Mar 17, 2025

Description

The obstacle_stop and obstacle_slow_down modules without point cloud were very heavy since the point cloud processing was not skipped.
This PR returns early without the point cloud processing when the point cloud is disabled.

TODO: With another PR, the heavy calculation of the point cloud processing should be handled.

before:

⏰ Worst Case Execution Time ⏰
100.00% plan: total 90.28 [ms], avg. 90.28 [ms], run count: 1
    ├── 6.85% filter_stop_obstacle_for_predicted_object: total 6.18 [ms], avg. 6.18 [ms], run count: 1
    │   ├── 6.84% for_each_object: total 6.18 [ms], avg. 1.54 [ms], run count: 4
    │   │   ├── 3.26% get_decimated_traj_polys: total 2.94 [ms], avg. 2.94 [ms], run count: 1
    │   │   ├── 3.31% get_dist_to_traj_poly: total 2.99 [ms], avg. 2.99 [ms], run count: 1
    │   │   ├── 0.01% filter_inside_stop_obstacle_for_predicted_object: total 0.01 [ms], avg. 0.01 [ms], run count: 1
    │   │   ├── 0.01% filter_outside_stop_obstacle_for_predicted_object: total 0.01 [ms], avg. 0.01 [ms], run count: 1
    │   │   └── 0.24% rest: 0.22 [ms]
    │   ├── 0.00% check_consistency: total 0.00 [ms], avg. 0.00 [ms], run count: 1
    │   └── 0.01% rest: 0.01 [ms]
    ├── 91.06% filter_stop_obstacle_for_point_cloud: total 82.20 [ms], avg. 82.20 [ms], run count: 1
    │   ├── 90.04% convert_point_cloud_to_stop_points: total 81.29 [ms], avg. 81.29 [ms], run count: 1
    │   └── 1.01% rest: 0.91 [ms]
    ├── 0.02% plan_stop: total 0.02 [ms], avg. 0.02 [ms], run count: 1
    ├── 1.51% publish_debug_info: total 1.37 [ms], avg. 1.37 [ms], run count: 1
    └── 0.56% rest: 0.51 [ms]

after:

⏰ Worst Case Execution Time ⏰
100.00% plan: total 8.13 [ms], avg. 8.13 [ms], run count: 1
    ├── 87.41% filter_stop_obstacle_for_predicted_object: total 7.10 [ms], avg. 7.10 [ms], run count: 1
    │   ├── 87.30% for_each_object: total 7.09 [ms], avg. 1.77 [ms], run count: 4
    │   │   ├── 27.96% get_decimated_traj_polys: total 2.27 [ms], avg. 0.57 [ms], run count: 4
    │   │   ├── 53.38% get_dist_to_traj_poly: total 4.34 [ms], avg. 1.08 [ms], run count: 4
    │   │   ├── 0.21% filter_inside_stop_obstacle_for_predicted_object: total 0.02 [ms], avg. 0.00 [ms], run count: 4
    │   │   ├── 0.34% filter_outside_stop_obstacle_for_predicted_object: total 0.03 [ms], avg. 0.01 [ms], run count: 4
    │   │   └── 5.40% rest: 0.44 [ms]
    │   ├── 0.01% check_consistency: total 0.00 [ms], avg. 0.00 [ms], run count: 1
    │   └── 0.10% rest: 0.01 [ms]
    ├── 0.01% filter_stop_obstacle_for_point_cloud: total 0.00 [ms], avg. 0.00 [ms], run count: 1
    ├── 0.21% plan_stop: total 0.02 [ms], avg. 0.02 [ms], run count: 1
    ├── 3.77% publish_debug_info: total 0.31 [ms], avg. 0.31 [ms], run count: 1
    └── 8.60% rest: 0.70 [ms]

Related links

How was this PR tested?

psim

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 17, 2025
Copy link

github-actions bot commented Mar 17, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

Comment on lines 151 to -153
obstacle_filtering_param_ = ObstacleFilteringParam(node);
use_pointcloud_ =
get_or_declare_parameter<bool>(node, "obstacle_stop.obstacle_filtering.object_type.pointcloud");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The parameter was duplicated.

@takayuki5168 takayuki5168 marked this pull request as ready for review March 17, 2025 17:05
@takayuki5168 takayuki5168 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 17, 2025
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 26.04%. Comparing base (e69b61d) to head (5d79a8e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...slow_down_module/src/obstacle_slow_down_module.cpp 0.00% 4 Missing ⚠️
..._obstacle_stop_module/src/obstacle_stop_module.cpp 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10289      +/-   ##
==========================================
- Coverage   26.04%   26.04%   -0.01%     
==========================================
  Files        1375     1375              
  Lines      106439   106465      +26     
  Branches    40902    40901       -1     
==========================================
  Hits        27726    27726              
- Misses      76009    76035      +26     
  Partials     2704     2704              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 26.05% <ø> (+<0.01%) ⬆️ Carriedforward from b1aab08

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@PanConChicharron PanConChicharron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@takayuki5168 takayuki5168 merged commit 0d4b1ca into autowarefoundation:main Mar 18, 2025
34 of 35 checks passed
@takayuki5168 takayuki5168 deleted the fix/fast-return-obstacle-stop-without-point-cloud branch March 18, 2025 05:18
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)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants