Hi, i'm currently working on a project where i have to create a robot capable of performing SLAM. I was thinking i could send the sensor data from the Arduino to the Raspberry Pi 3 Model B+ where it would perform SLAM. The sensors being used are ultrasonic (HC-SR04), MPU-6050, LM-393 speed sensors, and a GY-273 HMC5883L magnetometer.
The goal of this project is to create an inexpensive system capable of performing SLAM. The goal is NOT to produce accurate maps of the environment, just a rough one. I have also attached a picture of the robot if you want to see what it looks like.
Anyway, to the question in the title, i know how to calculate the pitch and roll using the MPU along with a contemporary filter but have no clue what to do with the magnetometer. I have already looked into quaterions and Kalman filters and all that stuff but struggle to understand them. However, i think i'll have to use kalman filters anyway for SLAM unless there is another alternative.
My question is, how would i implement, in terms of the code, the magnetometer with the MPU and contemporary filter in order to calculate pitch, roll, and yaw for use in SLAM?
Also, please feel free to suggest any possible improvements and ideas you would have for the robot. I'm open to all ideas.
Thanks.