Building a map using SLAM