ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
nav_msgs/OccupancyGrid is a ROS message. This is a map that can be passed around between tools, namely gmapping/karto, amcl, and move_base.
costmap2d is a ROS package, which offers a costmap generation tool, which in fact is really 2.5D. That is, it does raytracing from sensor data into a 3d-voxel map, but it outputs a 2d costmap. It is mainly used via a C++ api, not the ROS message api. When used over ROS messages, it posts nav_msgs/GridCells on a variety of topics corresponding to obstacles, inflated obstacles, and unknown space.
Now, in the context of global planner, all planners use the C++ costmap2d interface. And thus, the global costmap2d is typically initialized from some map, which is typically received over a latched topic using nav_msgs/OccupancyGrid. The costmap2d then can do things needed for planning, like inflating obstacles or adding sensor data to the costmap if desired/configured as such.