Skip to content

pchryss/Scarab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪲 Scarab

📱 Description

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.

🛠️ Tools

  • 3D Printing : Autodesk Fusion, Elegoo Cura, Elegoo Neptune 3 Pro
  • Hardware : Arduino UNO, Raspberry Pi 3 + Camera Module
  • Software : C++ (Arduino), Python (CV)

🧠 What I Learned So Far

  • 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)

🗺️ Roadmap

  • Reinforcement learning through Unity + ML-Agents
  • Transfer the model to Scarab and fine tune in the real world using CV

📸 Dev Log

August 18, 2025

Began training a model using reinforcement learning on a Unity mlagents simulation. Curriculum approach

  1. Taught the cube to hit the ball
  2. Taught the cube to hit the ball in the direction of the goal (the entire wall was the goal)
  3. Shrunk the goal size
  4. Added rounded corners to the walls
  5. 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

  1. The cube was toppling over due to physics instead of sliding
  2. 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.

largest goal smaller goal walls have columns smallest goal size training view

Model in action

July 11, 2025

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.

chassis of 2.0 bottom of 2.0 top of 2.0

July 6, 2025

Channelled my highschool architecture drafting to create a blueprint for 2.0.

top of 2.0 bottom of 2.0

July 2, 2025

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

  1. No space for a camera / brain
  2. Using zipties to hold wheels in place resulted in heavy drift while driving straight
  3. No wire management -> visually unappealing
  4. Controlled via an IR sensor (not very autonomous imo)
scarab 1.0

June 27, 2025

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.

3d printer a bunch of 3d prints 3d printed chassis

June 7, 2025

Created a Python script w/ OpenCV to track a blue ping pong ball, and send controls to the arduino to keep the ball centered.

pi tracking ping pong ball pi tracking ping pong ball

June 6, 2025

Tested serial communication between the pi and arduino for the first time with a little circuit (left of camera -> red, right of camera -> blue).

raspi with arduino red raspi with arduino blue

May 26, 2025

Set up Raspberry Pi and used the camera for the first time

Arduino camera

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages