Inspiration

I've been captivated by automation and robotics for more than a decade now, but feel that understanding the fundamentals behind how they work is particularly difficult. SwerveSim addresses that problem by helping users understand the basic physics behind the swerve drivetrain.

What it does

SwerveSim uses kinematics to show users the behavior of the swerve drivetrain under different conditions, such as the max motor velocity, max turning velocity, and friction. In addition, running the program writes a list of positions and velocities to a csv file, which can be reviewed in the future.

How I built it

JavaFX was used to create the UI.

Challenges I ran into

As I didn't have JavaFX experience coming into the hackathon, learning the library took time. Manipulating graphics like performing rotations and scaling lines also took time.

Accomplishments that I'm proud of

Because Java doesn't support multiple-key-pressing on its own, figuring out how to keep track of the keys was a significant accomplishment for me. In addition, creating a functioning simulation of basic kinematic equations was fun to work on.

What I learned

I learned how to use JavaFX and CSV writing in java. In the larger scope of hackathons, I learned not to spend too much time thinking about what to work on.

What's next for SwerveSim

The aforementioned CSV file can be used to "remember" past paths. This can be done using control theory like PID closed-loop control. In addition, having the vectors follow points after rotations are performed is important in making the application more user-friendly.

Built With

Share this project:

Updates