Roomba has a built-in sensor that detects when it reaches the edge of the room.