How SLAM Lets a Robot Map a Room It's Never Seen
Simultaneous localization and mapping solves a genuine chicken-and-egg problem: you need a map to know where you are, and you need to know where you are to build the map.
SLAM (simultaneous localization and mapping) lets a robot build a map of an unfamiliar space while simultaneously tracking its own position within that same map, using a stream of sensor data (typically cameras, LiDAR, or both) plus motion estimates.
The core trick
As the robot moves, it tracks distinctive visual or geometric features across successive sensor frames, estimating both how it moved and where those features sit in the world. Small errors compound over time (drift), so most SLAM systems periodically recognize a previously visited location (loop closure) and use that to correct accumulated error across the whole map.
Why it matters for humanoids specifically
A walking robot's motion is noisier and less predictable than a wheeled robot's (footsteps aren't perfectly repeatable the way wheel rotations are), which makes accurate motion estimation harder and puts more weight on the sensor data itself to keep the map and position estimate accurate.