Navigating a Maze with Machine Learning
Mar 2024
GOAL: Navigate a Create3 through a course with landmark items detected through machine learning
SKILLS: ROS2 (actions and topics), python programming (classes and methods), Google Teachable Machine
By hooking a Raspberry Pi up to a Create3 Robot, we essentially have a Roomba that can be operated with ros2 topics and actions.
We trained a Google Teachable Machine model to recognize the landmark objects and positioned a PiCam to take photos to be assessed. We want the robot to turn 6 inches away from the object, so we used the built in IR sensors on the Create3 to measure the distance.
Video
Code

Operation Code Summary
Theres a RotateNode class and an IRsubscriber class. The RotateNode class controls the motion of the Create3. The IRsubscriber class accesses the data of from the the Create3's distance sensors. In main, the Picam takes pictures and the model makes predictions of what object is in the image.
CAD
Things to adjust in the future:
use both the Create3's built in IR sensors, as well as add external ultrasonic sensors so that the smaller items can be picked up
add in extra code to differentiate between the bear and Mario. Maybe something like using image processing to detect the amount of a certain color is present or the size of the object, etc.