SLAM_Toolbox: Localization offset when robot is not moving
While I am able to get generally good results running slam_toolbox
in localization mode with a prerecorded (serialized/de-serialized) map , I am getting a unexpected and proportionally larger localization offset whenever the robot stops moving.
The error seems to be indirectly proportional to the previous direction of movement. E.g. when the robot stops after rotating clockwise, the laser scan has an offset in the counterclockwise direction. The same goes for linear movements.
The GIF below shows such a situation. As you can see the robot is well localized while driving around randomly. When stopped, the localization shows the described offset. After continuing to move around the localization is good again.
I am basically using the default parameters as described here, except of course mode
is set to localization
.
Any thoughts on what could be causing this issue or how I can improve localization in such situations?
I have experienced this with amcl as well.