Inconsistent localization in gmapping

asked 2018-01-11 02:12:39 -0500

mattMGN gravatar image

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/1937...

https://answers.ros.org/question/1891...

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

edit retag flag offensive close merge delete

Comments

To me, this seems that something other than gmapping is publishing the map->base_link transform as well. This is when such jumping usually occurs. You could check if it could be the particle filter by visualising the particle_cloud. You should have two areas with a high density of particles

mgruhler gravatar image mgruhler  ( 2018-01-11 02:32:40 -0500 )edit

You can also check which node is publishing which transform with some of the tf tools.

mgruhler gravatar image mgruhler  ( 2018-01-11 02:37:02 -0500 )edit

Yes in fact, running also fake node created conflicts in publishing map->base_link transform. Now i don't run fake_node and everything is fine. Thank you

mattMGN gravatar image mattMGN  ( 2018-01-11 06:26:24 -0500 )edit

great it worked. Mistake in my comment was, however: transform map->odom should be published only by gmapping. (odom->base_link is from the base driver somewhere)

mgruhler gravatar image mgruhler  ( 2018-01-11 06:44:42 -0500 )edit