Team 2 ECE/MAE 148 Final Report
:wave: The Team: 2 Fast 2 Furious
(Left to Right) - Elias Fang (CSE) - Ainesh Arumugam (ECE) - Matthew Merioles (ECE) - Junhao "Michael" Chen (MAE)
📝 Project Overview
Mario Kart in real-life? That's basically what we did. We designed a boost system similar to those in Mario Kart, where detecting colored pieces of paper on the track can change throttle for a short period of time. Depending on the color of the "pad" the car drives over, it will either speed up, slow down, or stop for a few seconds, just like in the game!
🏎 Our Robot
Bird's Eye
Front
Left
Right
Back
Schematic
🍄 Final Project
What We Promised
Must haves
[X] Distinguishing different colors through the camera
[X] Adjust the throttle based on the color
Nice to haves
[X] Have the car detect a flat piece of paper on the track (like a booster pad)
[ ] Combine with lane-following algorithm
Gantt Chart
https://sharing.clickup.com/9010060626/g/h/8cgn7aj-87/769d44f22562beb
What We Accomplished
Color Detection
- Used OpenCV for color detection and edge tracing
- Used color mask algorithm to detect proportion of frame that color takes up
- Detected multiple colors at the same time
- Determined HSVs for orange, pink, and blue
PyVESC
- Connection through external webcam
- Different RPM values are sent through PyVesc to achieve different speed for different colors marked by different states:
- Blue (Boost) = speed up for 3 sec
- Pink (Slow)= slow down for 3 sec
- Orange (Stop) = stop for 3 sec
- Neutral (Normal) = constant rpm
Presentation
https://docs.google.com/presentation/d/1oJPRLYIKvHUXEIK9hoYpPFoFAyHuG6sE7ZrU9NQPG8g/edit?usp=sharing
Code
https://github.com/UCSD-ECEMAE-148/winter-2023-final-project-team-2/blob/main/MarioKart.py
Possible Future Work
- Change the colored paper into Mario Kart items (mushroom, bananas, etc.) for the car to identify
- Allow the car to run autonomously on a track and still apply speed changes
- Race with other teams 😉
🏁 Autonomous Laps
Additional Work Done
- Our team was tasked with implementing a depth feature with our contour function, using depthAI to integrate with the OAK-D Camera!
- Our updated code is now able to measure how far the contoured object is, measured in cm!
[Depth Demo] https://www.youtube.com/watch?v=NYIz7--TpgY [Updated Code] https://github.com/UCSD-ECEMAE-148/winter-2023-final-project-team-2/blob/main/MarioKart_depth.py
Acknowledgements
Thanks for Professor Jack Silberman, TA Kishore Nukala, and TA Moises Lopez!