Fix LaserScan reset not invalidating the time_tolerance_#1700
Open
Hugal31 wants to merge 1 commit into
Open
Conversation
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Hugal31
force-pushed
the
fix/laser-scan-tolerance-reset
branch
from
June 22, 2026 10:24
c930a57 to
47ca6c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fix the LaserScanDisplay not working after a reset (disable-enable, change topic, etc...).
In order to transform a LaserScan, the LaserScanDisplay tf_filter is configured with a time tolerance in order to call processMessage only if the transform is known for the beginning and the end of the scan.
LaserScanDisplay only wants to increase the tolerance, and because tf2_ros::MessageFilter doesn't have a
getTolerance()accessor, LaserScanDisplay stores it locally to only update it when the required tolerance is greater than the configured one:rviz/rviz_default_plugins/src/rviz_default_plugins/displays/laser_scan/laser_scan_display.cpp
Lines 91 to 95 in 5f7848c
However, when re-subscribing, MessageFilterDisplay resets the tf filter, thus setting its time_tolerance back to 0. This is not caught in LaserScanFilter, which never updates the tolerance on the new filter again.
This fix sets the cached copy filter_tolerance_ back to 0. after subscribing.
Is this user-facing behavior change?
This doesn't introduce unwanted behavior, it is only a fix.
Did you use Generative AI?
Only 100% human brain juice was used.
Additional Information
A back-port down to jazzy would be great.