Is it possible to perform SLAM using an Arduino MEGA 2560 and Raspberry Pi 3 B+?

Right now i have built a obstacle avoiding robot with speed sensors, an MPU, an ultrasonic sensor, an Arduino MEGA 2560 and a Raspberry Pi Model B+.

My goal here is not to build a very accurate map of the environment but more to build a functioning map in order to show that it is possible (for my project).

I was thinking i could send the data from the sensors to the Raspberry Pi via USB and have the Raspberry Pi perform some SLAM calculations.

Or could an alternative be to send the sensor data to a PC and have that perform the SLAM calculations? Ideally, i don't want to this.

Thanks.

Also, this is my very first post so don't rekt me too hard guys :slight_smile:

The Pi has the computing grunt, yes. You would probably do well to add a magnetometer at least so you
have basic orientation sensor. Mapping with just ultrasound is probably quite hard due to the spread
but I suppose this doesn't stop bats and dolphins from negotiating their environments well!

Would using 2 or more ultrasonic sensors help or will it just add more error to the results? I was hoping to use just one ultrasonic sensor as i just need to create a very rough map of the environment. How efficient would SLAM be on a system with only one ultrasonic sensor?

Right now i'm trying to create a working SLAM system while keeping it as inexpensive as i can (that's why i decided to go for ultrasonic).

Final question, what would be the best way for the Arduino and Raspberry Pi to communicate, USB or wireless? I'm worried that the connection might bottleneck the flow of data between them (if that's even possible idk).

P.S. Sorry for the late response. I'm on holiday right now :sunglasses: :sunglasses:

Also, BATS :astonished:

Well that all depends on the data rate you need doesn't it? I'd have thought ultrasound range values are
a very low bandwidth option (compared to the usual CV approach). Why would you need anything but
serial? The grunt is all on the Pi and all the Arduino has to do is shovel orientation, speed and ultrasound
rangings at the Pi to process.

Sounds quite ambitious though, the quality of the data is important. Multiple ultrasound sensors are
probably useful (don't fire them off simultaneously though!). I can imagine some sort of point-cloud
being formed, possibly fairly noisy.

I'd google around to see what others have achieved using similar setups.

I'll go ahead and do that, thanks for the help!