fix shouldProcessScan() to do what is advertised #709
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basic Info
Description of contribution in a few bullet points
minimum_travel_heading
parameter does what is intended - make SLAM process scans if the robot heading has changed enough. See Issue tickets above for more infoMapper::HasMovedEnough()
, breaking the function into three, so thatshouldProcessScan()
are implemented in a single placeMapper::HasMovedEnough()
does not do more than it says it doesminimum_time_interval
parameter is propagated from the ROS node to the internalMapper
instanceContribution in more detail
slam_toolbox_common
, there is a check whether to process the incoming scan. If the node is not paused or throttled out, we process the scan if either of these is true:minimum_time_interval
)minimum_travel_distance
)minimum_travel_heading
)iv
at all, and the parameter inii
is set in the node, but is not propagated to theMapper
instance.shouldProcessScan()
would use the checks already implemented inMapper
class, which is already instanced in the ROS node and holds all of the relevant parameters, instead of implementing them againMapper::HasMovedEnough()
function that is also misleadingly named, as it not only checks has the robot moved enough, but also:shouldProcessScan()
, and introduce clarity intoMapper.cpp
. It seems to me this is not a huge change, as the functionMapper::HasMovedEnough()
is only called in two places in total, when processing scans.minimum_time_interval
parameter is properly propagated from the ROS parameters to the internalMapper
instance, so that we can use the newly createdMapper::EnoughTimeHasPassed()
function