-
Notifications
You must be signed in to change notification settings - Fork 466
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
Map Display jumps due to Qt::QueuedConnection #1826
Comments
PR with code changes for my workaround: #1827 @StefanFabian: for your information |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/preparing-for-noetic-sync-2024-05-09/37602/9 |
Thanks for reporting this issue. Could you please provide a bagfile with your map data to experiment with the issue? |
Thanks for the quick response. Here's a minimal example bag with only an occupancy grid topic The effect should be visible when you set the RViz fixed frame to "map" and enable the grid. For reference, here's how a replay of that bag looks like on my computer: example_bag.mp4and without the queued connection: example_bag_patched.mp4 |
Thanks for providing the bag file. I can reproduce the glitches with that file. However, a simple test example (map_test.py) doesn't exhibit the issue. Thus I don't yet understand, where your particular issue comes from. |
The issue seems to be visible with the following conditions:
With the queued connection enabled, the previous grid gets first moved to the new position. Then the content gets updated with a short delay. It's not the grid moving to the wrong position, this is easier to see when replaying the videos with slower playback speed. Here's a modified version of your script that makes it a bit better visible, it uses the RViz logo image from this repository: It looks like in the video below in RViz 1.14.23. Also here I'd recommend to reduce playback speed, but it's also visible in normal speed. screencap-2024-05-14_13.42.46.mp4With the modified source without queued connection: screencap-2024-05-14_13.48.22.mp4 |
The queued connection update introduced in ros-visualization#1793 caused the map display to first update the pose of the map and then the map itself (in the next update cycle). This can be perfectly seen when throttling the rviz frame rate. Updates to the visualization should be handled in update() only. Thus, now, if a map update is received, a flag is set to perform the costly map update. If that flag is not set, only the transform is updated.
I filed a PR to fix this issue: #1828. Could you please review? |
The queued connection update introduced in #1793 caused the map display to first update the pose of the map and then the map itself (in the next update cycle). The resulting jittering can be perfectly seen when throttling the rviz frame rate. Updates to the visualization should be handled in update() only. Thus, now, if a map update is received, a flag is set to perform the costly map update. If that flag is not set, only the transform is updated.
After the recent upgrade from 1.14.20 to 1.14.23, we observed glitches when rendering dynamic maps such as costmaps.
I tracked the problem down to this commit: 93ac44b (PR #1793)
This "hack" seems to cause a delay in map rendering that leads to a broken map display.
With QueuedConnection
Using an unmodified 1.14.23 from the ROS noetic package distro. The costmap is jumping while moving. Note that the costmap frame_id is in a fixed frame.
broken.mp4
Without QueuedConnection
I cloned RViz from source at 1.14.23, removed that
Qt::QueuedConnection
flag, and built it. Using this patched RViz, the costmap is rendered at the correct spot again without jumping:patched.mp4
Your environment
echo "$LANG $LC_NUMERIC"
:en_US.utf8
(LANG=C rviz
doesn't change anything here)Before reporting a rendering issue, try running RViz with
LANG=C rviz
!The text was updated successfully, but these errors were encountered: