-
Notifications
You must be signed in to change notification settings - Fork 92
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
planner_cspace: reconstuct GridAstarModel3D only when necessary #751
Conversation
[586] FAILED on noeticTest failed
[586] PASSED on noeticAll tests passed
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #751 +/- ##
==========================================
- Coverage 88.68% 88.64% -0.05%
==========================================
Files 60 60
Lines 4633 4641 +8
==========================================
+ Hits 4109 4114 +5
- Misses 524 527 +3 ☔ View full report in Codecov by Sentry. |
local_range_, | ||
cost_estim_cache_.gridmap(), cm_, cm_hyst_, cm_rough_, | ||
cc_, range_, path_interpolation_resolution_, grid_enumeration_resolution_)); | ||
const bool reset_required = force_reset || (previous_range != range_); |
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.
I think the change of the map_info_
is better to be checked here instead of passing as an argument to prevent distributing the logic.
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.
But doing this might need larger change.
(pass new map_info
, parameters as arguments of resetGridAstarModel
and skip calling GridAstarModel3D::updateCostParameters
when unnecessary)
So, it looks ok to merge it as is for now.
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.
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.
note: path_interpolation_resolution_
and grid_enumeration_resolution_
aren't dynamic reconfigurable now
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.
LGTM
When the parameters of planner_3D are changed using dynamic_reconfigure, the instance of GridAstarModel3D is always reconstructed. This makes the dynamic_reconfigure response time slow when the map is large.
This PR modifies the resetGridAstarModel() function to reconstruct the instance of GridAstarModel3D only when the map is changed or the
range_
parameter, which relates to the primal member variables in GridAstarModel3D, is updated.