ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

To figure out what's going on, it's important to understand a little bit about how gmapping works. Gmapping maintains a particle filter where each particle represents a tuple containing a possible map, as well as the robot's pose in that map. As the robot moves about and makes observations, gmapping updates the particles in its particle filter, and resamples. When you see the transform between /odom and /map change, the resampling step has caused a different particle to have the highest probability. Because rviz can only display a single map at any given time, it's showing you this one particle with the highest probability.

For more detail, you can check out the paper where this algorithm was proposed: Improved Techniques for Grid Mapping with Rao-Blackwellized Particle Filters.

To figure out what's going on, it's important to understand a little bit about how gmapping works. Gmapping maintains a particle filter where each particle represents a tuple containing a possible map, as well as the robot's pose in that map. As the robot moves about and makes observations, gmapping updates the particles in its particle filter, and resamples. When you see the transform between /odom and /map change, the resampling step has caused a different particle to have the highest probability. Because rviz can only display a single map at any given time, it's showing you this one particle with the highest probability.probability, and because there's no particular relation between the particles, this change can manifest itself as the /odom -> /map transform jumping around.

For more detail, you can check out the paper where this algorithm was proposed: Improved Techniques for Grid Mapping with Rao-Blackwellized Particle Filters.