Raspberry Pi Based SLAM Robot

Technologies used:

  • Raspberry Pi
  • BrickPi
  • Simultaneous Localisation and Mapping
  • Probabalistic (Monte Carlo Method) Localisation
  • LEGO

Skills demonstrated:

  • Programming (Python)
  • Applied Mathematics (Proability)
  • Mechanical Engineering and Mechatronics
  • Teamwork

The Project

This project aimed to use a Raspberry Pi with LEGO Mindstorms and Technic parts to create a mobile robotics platform that could be programmed with advanced localistion features. The basis for the robot is a LEGO chassis with two wheeled motors set up in a differential drive configuration, with a small skid supporting the weight at the back. The Robot was controlled using Python and when finished, was capable of wall following, maintaining a set distance to a moving object and identifying changes to a previously mapped space. We called it GEOFF!

Servoing and Sensing

One of the key requirements of a mobile robot is the ability to combine smooth motion with the available data from outward looking sensors. Using an unltrasound sensor facing either forward or to the side, GEOFF was able to use the difference in speeds between the left and right wheels to smoothly maintain a set distance from a wall. By employing a PID controller, GEOFF could also maintain it's distance to a moving object approaching or retreating.

Waypoint Navigation

Using some basic trigonometry, GEOFF was programmed to move between waypoints given in cm from a pre determined origin. Initially, localisation was assumed to be 0,0,0 at startup and data from the wheels was used to determine good estimates for distances travelled and turned. As a proof of the path finding algorithm used, this worked quite well.

Probabalistic Localisation

The inaccuracies observed in odometry based localisation were caused by GEOFF's model of his own motion not considering all possible variables. Factors like friction, power supply drain and even the give in the carpet could lead to errors in position. The solution was to use data from the ultrasound sensor to determine where GEOFF was on a known map. To do this, GEOFF was programmed with a system of particles that represented many possible positions it could be in. Sensor data and a Monte Carlo Particle filter were then used to select the position that was most likely to be accurate and GEOFF operates under the assumption that this is correct. The potential for errors in the sensor give rise to a small area of particles after each movement, but the effect is that GEOFF's accuracy is much improved.

SLAM

GEOFF's final challenge was to use occupancy mapping to scan a pre-mapped area and identify unexpeccted objects. This was done by scanning large regions and comparing the scanned maps with the stored maps. GEOFF was programmed to confirm identification of an unknown object by driving at it.