Position lag in RViz during navigation

I have been having some problem in navigation for position accuracy. Due to the slippage of the wheel, the physical position of the robot lags too much behind the the position in RViz, and it is taking some time to update its position in the map.

I tried increasing the value of update_frequency and publish_frequency in local_costmap_params.yaml file, but did not get any result.

Can you please help me with that?

Hi @Rupesh, the position lag in Rviz might actually result from network lag if you are using ROS Remote Master to visualize the robot’s position while it is untethered. I’ve experienced this before, and while the robot is estimating its state in real time, I see a 2-3 second lag before Rviz displays the latest state estimate. In my experience, the severity of the lag varies with the interference in the environment.

A easy way to verify if this is happening to you is to run the same visualization in Rviz while Stretch is tethered (either HDMI or ethernet cable). Could you see if this is what you’re experiencing?