You can make SLAM Robot using raspberry with help of lidar and ROS. You can use Hector SLAM for that. Here is the article you have a look for reference ROS SLAM Robot