-
Notifications
You must be signed in to change notification settings - Fork 683
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
perf(dynamic_obstacle_stop): create rtree with packing algorithm #7730
Conversation
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
☔ View full report in Codecov by Sentry. |
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)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
…owarefoundation#7730) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
…owarefoundation#7730) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
…owarefoundation#7730) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
…owarefoundation#7730) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> Signed-off-by: palas21 <palas21@itu.edu.tr>
…owarefoundation#7730) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Description
Improve performance of the
motion_velocity_planner
by creating the Rtree used in thedynamic_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.