[TB3] Inconsistent localization in gmapping

Hello,

I am trying to map the turtlebot3.world as explain in wiki. Thus i run this world with gazebo
roslaunch turtlebot3_gazebo turtlebot3_world.launch

then fake TB3
roslaunch turtlebot3_fake turtlebot3_fake.launch

and finally launch default SLAM file with its associated .rviz
roslaunch turtlebot3_slam turtlebot3_slam.launch
rosrun rviz rviz -d rospack find turtlebot3_slam/rviz/turtlebot3_slam.rviz

But I am facing a curious behavior: the robot’s localization is constantly jumping between its right location in Gazebo and another location. This second location correspond to the second array of columns, it looks like the particle filter is hesitating between because of the similarity of the map and the lack of differentiating features.

You can see the result here

I have tried to play with gmapping parameters without success, regarding those posts:
https://answers.ros.org/question/193756/repeated-sideways-jumps-in-gmapping-with-hokuyo/
https://answers.ros.org/question/189159/bad-maps-produced-by-gmapping-in-simulation-with-feature-poor-environments/

However, the default turtlebot3_slam settings are working pretty well with robot in real life.

Has anyone ever tried to map the default world that come with the TB3 package ? Or had an idea about parameters to tune in turtlebot3_slam.launch file ?

Regards

Matt

Finally found what was wrong.

Fake node and turtlebot3_world robot’s node were conflicting.

I don’t run anymore turtlebot3_fake and it’s now working

1 Like