Hi!
My RPB-202 robot got multiple upgrades since my last post:
- Fully functionnal encoders
- Two additional Sharp GP2Y0A60SZLF Analog Distance Sensors (4 total) for obstacle avoidance
- A front ball caster (with rubber band as mentionned by @JonathanKosh)
- A Raspberry Pi V2 Camera on a pan-tilt support replacing my old USB camera
- Cleaner wiring (no more breadboard)
My python code library has evolved and now includes an odometer class that uses the encoder counts to calculate the robot’s x, y coordinates and phi angle, speed and turn rate. I also developed a motion controller class that provide simple to use high level functions to control the movements of the robot.
My son (14 yo) used the library to implement his own version of simple maze solving using vision (video below) for his science fair project. His vision algorithm emulates a 5 wide array or IR reflectance sensors by cropping the image to keep the lower 25% and then splitting this band in five images. He runs thresholding on hue values to isolate the green masking tape color then runs blob detection to determine if the line is visible in each of the images. The remainder of the code is a “typical” left hand simple maze solver. A cleaned-up & commented version of his code is available here.
I am now working of finishing my maze solver for mazes with loops using the NetworkX python graph library. as well as testing dead reckoning accuracy of my encoders/odometer classes.
My next big project will be getting into SLAM. For the mapping, I will be using three VL53L0X Time-of-Flight Distance Sensors installed at 120° from each other on top of a “mast” that I will rotate with a servo to get a 360° scan of the area around the robot. I left an empty space between the Raspberry Pi and the pan-tilt system to install the servo. Thanks to this forum post, I have been able to easily connect the three sensors to the A-Star and set their individual I2C addresses using the XSHUT pin on two of the sensors.
For those interested in SLAM and other AI topics applied to robotics, I found this excellent free course (and others) on Udacity.

