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

Revision history [back]

click to hide/show revision 1
initial version

amcl does use the gridmap from map_server, but that is not a costmap. amcl is only for localization (against a static gridmap) and does not deal with the global and local costmap. For the ros navigation stack, global and local costmap are a concept used not for localization, but only for navigation, i.e. for the move_base node. This is path planning and obstacle avoidance, but not localization.

amcl does use the gridmap from map_server, but that is not a costmap. amcl is only for localization (against a static gridmap) and does not deal with the global and local costmap. For the ros navigation stack, global and local costmap are a concept used not for localization, but only for navigation, i.e. for the move_base node. This is path planning and obstacle avoidance, but not localization.

Edit: Even after the update, the answer largely stays the same. For localization, the costmaps in move_base do not play any role. amcl looks at the laser scan, odometry and the map. If you see the robot jumping around, this might indicate that localization is not performing as well as you might want it to. This can have many reasons, but the local costmap is not one of them.

amcl does use the gridmap from map_server, but that is not a costmap. amcl is only for localization (against a static gridmap) and does not deal with the global and local costmap. For the ros navigation stack, global and local costmap are a concept used not for localization, but only for navigation, i.e. for the move_base node. This is path planning and obstacle avoidance, but not localization.

Edit: Even after the update, the answer largely stays the same. For localization, the costmaps in move_base do not play any role. amcl looks at the laser scan, odometry and the map. If you see the robot jumping around, this might indicate that localization is not performing as well as you might want it to. This can have many reasons, but the local costmap is not one of them.

Edit 2: The map from gmapping you load into map_server is a gridmap, not a costmap. However, the global costmap in move_base has a layer that gets initialized from this gridmap. When you add an object in the field of view of your laser scanner, you do see it as an obstacle in the costmaps and these obstacles are considered for path planning and obstacle avoidance. However this new obstacle is not added to the gridmap used by amcl for localization. The gridmap is static, i.e. does not change. To see this, simple disable all displays in rviz relating to move_base (costmaps etc). Only display your robot, the laser scan and the gridmap. Now if you add the obstacle, you will see it in your laser scan, but not in the gridmap. amcl can handle some amount of obstacles and still localize. However, if you significantly change the environment, localization performance will decrease.