The Pi camera was above the Create 3 and at an angle that took a photo of objects 6 inches away.
The iRobot Create 3 was controlled using a Raspberry Pi that was trained with Teachable Machine using photos of 7 objects
The Create 3 robot moved forward until the internal IR sensors detected an object in front, took a photo, and matched it with the closest data point, before moving in the correct direction
To turn, the Create 3 used the ROS 2 action RotateAngle to turn and the cmd_vel to move forward.
This project aimed to program a Raspberry Pi to use ROS2 to control the movements of an iRobot Create 3 from data collected by a Pi camera. After taking photos of the 7 objects, the photos were sent to Teachable Machine to create a program to identify each object. To ensure the object was within the photo, the Create 3 robot used the internal IR sensors to detect when it was 6 inches away. After determining the object, the Create 3 would turn either left or right depending on the object. At the end, the Create 3 played a short song while spinning twice.
In the initial tests of the forward motion of the Create 3 robots, PID controls were attempted to allow the robot to adjust if it was over-/under-corrected. However, this idea was changed because the IR sensors were on a non-linear scale, so the Create 3's would constantly overcorrect if it traveled past 6mm. This issue was resolved by keeping the Create 3 robots at .10 mm so the robot would not travel too far when the motors shut off.
One challenge faced was the design of the Pi camera holder. In the first design, the camera was accidentally set too low, causing parts of the Create 3 robot to be detected. To resolve this issue, a new camera holder design was made with two parts: a main structure and a Pi camera attachment. With the two parts, the camera could easily adjust to the right angle needed.
The central IR sensors was used to detect when an object was close to the Create 3
Initial testing had the camera directly at the front of the Create 3 robot, but was switched to a central camera mount.
The Create 3 moving through the object maze based on the item detected
Once reaching the last object, the Create 3 danced and played the "Victory! (Gym Leader)" from Pokemon Diamond and Pearl
To improve, the camera holder would be redesigned to have a larger base and connected with wood glue. Although the final design succeeded in the task, the pieces were held together using a rope. This led to the front section falling off and weakening the holder. If the holder were held in place with wood glue, the holder would be more structurally sound.
Another improvement would be to change the linear movement to actions rather than cmd_vel. With the linear movements, cmd_vel was chosen due to its convenience from its use in previous projects. However, it led to the robot being unable to make precise movements and likely contributed to the slight drift experienced during the demonstration. However, the action DriveDistance could have also been used to complete the linear movements. This likely would have resolved the drift issue, as the Create 3 would move small distances over time, whereas the drift only occurred when the robots traveled a continuous long distance.