Fix tolerance calculation precision #934
Merged
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.
Currently there is an open issue #852 that laser scan error flickers and warns about
extrapolation
errors. I've found myself hitting on this issue as well, so i tracked it down a bit and found probably the culprit.According to ros-perception/laser_geometry#83 fix (it has been merged despite the wrong icon) there is some precision lost due to the multiplication
float32
andint64
leading to some other errors on their repo.So, i incorporated the same fix in
laser_scan_display.cpp
as well, and the flickering has gone for me as well and no more extrapolation errors.rclcpp::Duration::from_seconds(double)
was introduced fromeloquent
distro, so this fix should apply for all currently available distros.Give it a try and pull it if it does indeed solve the issue! :)