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

Revision history [back]

I presume you are using gmapping to build a map -- right? If so, you're seeing the classic "hall shortening" problem. gmapping was designed for long-range (30m rated, often get points out to 80m) lasers, and so it assumes that the laser knows better than the odometry (this would be the case if you had a 30m laser). Unfortunately, with your 4m "laser" and a 35m hallway, you don't see the end of the hallway, and so each update of the gmapping filter it runs the scan matcher and decides that the most likely solution is that you have gone nowhere.

The 2008 paper How To Learn Accurate Grid Maps With a Humanoid describes in detail the "hall shortening" problem, with pretty pictures that explain it a whole lot better than I have here. It also proposes a solution based on the scan matcher only using the points which could have been previously seen (those that fall in unknown territory are discounted, thus avoiding the filter deciding that you have not moved when you in fact have). That enhancement is not currently part of the ROS version of gmapping.

To confirm that your odometry is mostly OK, you could pull up the robot in RVIZ and watch as you drive along, both in the odom and map frames as your fixed frame, and you will probably see that motion is "kinda correct" in odom, and "totally wrong" in map.