Inspired by my favorite game of all time, Rocket League, Scarab is an autonomous robotic car capable of playing soccer (in the future)!
Scarab is a project I have been wanting to work on for over a year now, and this summer I decided stop worrying about my limited knowledge of robotics, hardware, computer vision, machine learning, etc and just do it.
- 3D Printing : Autodesk Fusion, Elegoo Cura, Elegoo Neptune 3 Pro
- Hardware : Arduino UNO, Raspberry Pi 3 + Camera Module
- Software : C++ (Arduino), Python (CV)
- Operating a 3D printer
- Designing models in Fusion 360 for 3D printing
- Building an RC car from scratch
- Headless Raspberry Pi Setup
- Raspberry Pi <-> Arduino Serial Communication
- Fundamentals of Computer Vision (OpenCV)
- Reinforcement learning through Unity + ML-Agents
- Transfer the model to Scarab and fine tune in the real world using CV
Began training a model using reinforcement learning on a Unity mlagents simulation. Curriculum approach
- Taught the cube to hit the ball
- Taught the cube to hit the ball in the direction of the goal (the entire wall was the goal)
- Shrunk the goal size
- Added rounded corners to the walls
- Shrunk the goal size even more
One mistake : I never tested the environment manually first before testing. Once I hit a point of satisfaction with the training, I decided to watch the model in real-time and noticed two big problems
- The cube was toppling over due to physics instead of sliding
- The cube was moving WAY too fast
Although the cube is pretty good at hitting the ball into the goal, these two factors capped the ceiling of the model.
Built 2.0! Fixed a lot of the issues that I noted in 1.0. To test it out I was able to control the car using wasd on my keyboard -> raspi -> arduino -> wheel motors. Honestly surprised with how smooth it drives...
This build is more than enough to start testing some of the harder aspects of this project.
Channelled my highschool architecture drafting to create a blueprint for 2.0.
Since it was my first time building an RC car and I really had no clue where to start, I followed some guides online and built 1.0.
This build has 3 major issues, which I plan to address in 2.0
- No space for a camera / brain
- Using zipties to hold wheels in place resulted in heavy drift while driving straight
- No wire management -> visually unappealing
- Controlled via an IR sensor (not very autonomous imo)
Bought a 3D printer! It took a couple days to get consistently good prints, but I ended up with a solid print of a car chassis I found online.
Created a Python script w/ OpenCV to track a blue ping pong ball, and send controls to the arduino to keep the ball centered.
Tested serial communication between the pi and arduino for the first time with a little circuit (left of camera -> red, right of camera -> blue).
Set up Raspberry Pi and used the camera for the first time














