SLAM

The two problems depend on each other, which is what makes SLAM hard. To place a new wall on the map you need to know where you are; to know where you are you need a map. SLAM solves both together, matching new sensor readings against what has been recorded so far and correcting the whole map when the robot recognises a place it has visited before, called loop closure.

Lidar SLAM uses laser scans, visual SLAM uses camera images and tracked image features. Many systems combine both with IMU data.

Everyday examples: a robot vacuum mapping a flat on its first run, a warehouse AMR being driven through the aisles once during commissioning, and headsets or drones tracking their position without GPS.