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

perf(dynamic_obstacle_stop): create rtree with packing algorithm #7730

Conversation

maxime-clem
Copy link
Contributor

Description

Improve performance of the motion_velocity_planner by creating the Rtree used in the dynamic_obstacle_stop planner using the packing algorithm.

How was this PR tested?

Psim

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
@maxime-clem maxime-clem requested a review from soblin as a code owner June 27, 2024 13:18
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jun 27, 2024
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@maxime-clem maxime-clem added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.76%. Comparing base (507e3f4) to head (f211565).
Report is 176 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #7730       +/-   ##
==========================================
- Coverage   14.84%   8.76%    -6.09%     
==========================================
  Files        1999     195     -1804     
  Lines      139163   16987   -122176     
  Branches    43716    2232    -41484     
==========================================
- Hits        20661    1489    -19172     
+ Misses      95731   15317    -80414     
+ Partials    22771     181    -22590     
Flag Coverage Δ
differential 8.76% <100.00%> (?)
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maxime-clem maxime-clem enabled auto-merge (squash) June 28, 2024 01:32
for (auto i = 0UL; i < ego_data.trajectory_footprints.size(); ++i) {
const auto box = boost::geometry::return_envelope<autoware::universe_utils::Box2d>(
ego_data.trajectory_footprints[i]);
ego_data.rtree.insert(std::make_pair(box, i));
rtree_nodes.push_back(std::make_pair(box, i));
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a must, but I recommend

rtree_nodes.emplace_back({box, i}) // or meybe rtree_nodes.emplace_back(box, i)

ego_data.rtree = std::move(rtree_nodes);

for performance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment and sorry the branch was auto-merged.
I will try building the pairs in place and if it improves performance I will open a new PR.

@maxime-clem maxime-clem merged commit 4a34865 into autowarefoundation:main Jun 28, 2024
36 of 39 checks passed
@maxime-clem maxime-clem deleted the perf/dyn_obs_stop-rtree_packing branch June 28, 2024 05:20
maxime-clem added a commit to tier4/autoware.universe that referenced this pull request Jul 1, 2024
maxime-clem added a commit to tier4/autoware.universe that referenced this pull request Jul 1, 2024
mitukou1109 pushed a commit to mitukou1109/autoware.universe that referenced this pull request Jul 2, 2024
palas21 pushed a commit to palas21/autoware.universe that referenced this pull request Jul 12, 2024
…owarefoundation#7730)

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Signed-off-by: palas21 <palas21@itu.edu.tr>
tby-udel pushed a commit to tby-udel/autoware.universe that referenced this pull request Jul 14, 2024
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants