-
Notifications
You must be signed in to change notification settings - Fork 646
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(autoware_ndt_scan_matcher): remove evecs_, evals_ of Leaf for memory efficiency #9281
perf(autoware_ndt_scan_matcher): remove evecs_, evals_ of Leaf for memory efficiency #9281
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
… threshold (autowarefoundation#9279) fix computation of maximum lane changing length threshold Signed-off-by: mohammad alqudah <[email protected]> Signed-off-by: taisa1 <[email protected]>
Signed-off-by: taisa1 <[email protected]>
d766f86
to
158928f
Compare
Signed-off-by: taisa1 <[email protected]>
planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp
Outdated
Show resolved
Hide resolved
…/autoware.universe into perf_ndt_scan_matcher_shrink_leaf
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9281 +/- ##
==========================================
- Coverage 29.23% 29.22% -0.01%
==========================================
Files 1335 1335
Lines 102959 102963 +4
Branches 39954 39958 +4
==========================================
- Hits 30102 30093 -9
- Misses 69976 69995 +19
+ Partials 2881 2875 -6
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Looks Good To Me
I would like to wait for one more approval before merging.
Description
By investigating the memory usage during scan matching, I found that the memory consumption was dominated by
std::vector<MultiVoxelGridCovariance<pcl::PointXYZ>::Leaf>
in addition to the map itself.The following figure shows the memory usage when executing autoware's
ndt_scan_matcher
withsample-map-rosbag
. The bottom area corresponds tostd::vector<MultiVoxelGridCovariance<pcl::PointXYZ>::Leaf>
(7.9MB).The struct
Leaf
contains threeEigen::Matrix3d
, andsizeof(Leaf)
is 288, so having this for each voxel may consumes a lot of memory with large maps.In this PR, I propose to remove
evecs_
(Eigen::Matrix3d
) andevals_
(Eigen::Vector3d
) fromLeaf
. These variables are only used to calculatecov_
and not be used directly. This will reducesizeof(Leaf)
from 288 to 192.When tested with
sample-map-rosbag
, the memory usage ofstd::vector<MultiVoxelGridCovariance<pcl::PointXYZ>::Leaf>
was reduced from 7.9MB to 5.2MB.Related links
How was this PR tested?
I did a regression test on https://github.com/tier4/ndt_omp and got the following result:
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.