Our robot is a modern-day Wall-E. The main objectives of the robot are to:
- Safely drive around the sidewalks in the city
- Detect and locate cigarette butts on the ground
- Collect and dispose of the cigarette butts
Our basic idea was to build a robot with a camera that could find cigarette butts on the ground and collect those cigarette butts with a roller-mechanism. Below are more in-depth explanations of each part of our robot.
We needed a method to be able to easily detect cigarette butts on the ground, thus we used computer vision. We made use of this open-source project: Mask R-CNN for Object Detection and Segmentation and pre-trained weights. We used a Raspberry Pi and a Pi Camera to take pictures of cigarettes, process the image Tensorflow, and then output coordinates of the location of the cigarette for the robot. The Raspberry Pi would then send these coordinates to an Arduino with UART.
The Arduino controls all the hardware on the robot, including the motors and roller-mechanism. The basic idea of the Arduino code is:
- Drive a pre-determined path on the sidewalk
- Wait for the Pi Camera to detect a cigarette
- Stop the robot and wait for a set of coordinates from the Raspberry Pi to be delivered with UART
- Travel to the coordinates and retrieve the cigarette butt
- Repeat
We use sensors such as a gyro and accelerometer to detect the speed and orientation of our robot to know exactly where to travel.
We used Solidworks to design the chassis, roller/sweeper-mechanism, and mounts for the camera of the robot. For the robot, we used VEX parts to assemble it. The mount was 3D-printed based on the Solidworks model.
- Clone Repo using
git clone https://github.com/ChealsieBains01/CigaretteBot.git - Run
pip install -r requirements.txt - Download trained weights froom https://www.immersivelimit.com/datasets/cigarette-butts
- Place the
mask_rcnn_cig_butts_0008.h5file into theMask_RCNNfolder - Run
./install_venv.sh