The present application discloses a map generation method and apparatus, a
robot, and a storage medium. The method comprises: when
local map statistical information in a storage device satisfies a
loop closure detection condition, acquiring
current point cloud data and storing same into a memory (step 202); in the memory, on the basis of a location distance that is calculated using location information contained in the
current point cloud data and location information corresponding to each
local map identifier, determining a target
local map identifier from among the local map identifiers, extracting, from the storage device, a target local map corresponding to the target local map identifier, and storing the target local map into the memory (step 204); in the memory, on the basis of a
pose error between
pose information contained in the
current point cloud data and
pose information corresponding to the target local map identifier, performing pose correction on
initial point cloud data corresponding to each local map identifier in the storage device to obtain target
point cloud data corresponding to the local map identifier, and extracting each piece of target
point cloud data from the storage device and storing the target
point cloud data into the memory (step 206); and in the memory, respectively generating each updated local map on the basis of each piece of target point cloud data, replacing a historical local map corresponding to each local map identifier in the storage device with the corresponding updated local map, and on the basis of the updated local maps, generating a target
global map (step 208).