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

Typically, the gmapping package is used for mapping an environment:

Using slam_gmapping, you can create a 2-D occupancy grid map (like a building floorplan) from laser and pose data collected by a mobile robot.

and other packages such as amcl are used for localization. Some packages, such as google cartographer, do simulatenous mapping and localization. So, you should either

  • use a mapping package (e.g., gmapping) and a separate localization package (e.g., amcl)
  • use a package that does simultaneous mapping and localization (e.g., Google cartographer)

As a side note, it is not a good idea to modify the source of packages that you don't control. If/when that package gets updated any changes that you made will be lost when it's updated.