introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
965 stars 557 forks source link

rtabmap_viz has low frame rate #1106

Open borongyuan opened 8 months ago

borongyuan commented 8 months ago

Hi @matlabbe ,

When I ran RTAB-Map through ROS, I found that the visualization of rtabmap_vis had a clear sense of lag. The visual interface is much smoother when running RTAB-Map standalone. This seems to be just a visualization problem, because the data also looks smooth when visualized using rviz. I checked the frame rate of all the data and there is no problem. I've tried approx sync and exact sync, neither helped with the problem. I also tried to modify and use multi-threaded callback, but it had no effect.

Any idea what might be causing this? I'm using ROS Noetic and haven't checked if there is a similar problem in ROS2 version.

matlabbe commented 8 months ago

On ROS, rtabmap_viz needs to uncompress data to show it (on map updates), maybe it is where the lag is coming from. Note that if odometry topic is not subscribed to rtabmap_viz, you will only see the map updates (at 1Hz). Other things are synchronization issues that could happen, though it should not be too bad if you visualize on same computer.

You can open Statistics panel and look at the GUI timing statistics, this could give some idea where the lags could come from (if there is a spike of processing).