https://github.com/xiaoxiae/swervedrivevisualisation
A visualisation of the math behind swerve drive used in FRC robots using the Processing library.
https://github.com/xiaoxiae/swervedrivevisualisation
frc java jinput processing swerve swerve-drive
Last synced: about 1 year ago
JSON representation
A visualisation of the math behind swerve drive used in FRC robots using the Processing library.
- Host: GitHub
- URL: https://github.com/xiaoxiae/swervedrivevisualisation
- Owner: xiaoxiae
- Created: 2018-06-15T21:44:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-21T20:55:33.000Z (almost 8 years ago)
- Last Synced: 2025-04-28T14:14:33.736Z (about 1 year ago)
- Topics: frc, java, jinput, processing, swerve, swerve-drive
- Language: Java
- Homepage:
- Size: 2.52 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Swerve Drive Visualisation
This project is a simple visualisation of the speeds and angles of the vectors of a swerve drive for a given 3-axis input.
It serves both as a nice visualisation for an omnidirectional drive system, and as a help for those trying to understand the math behind a system like this.

## Controls
The simulation features minimalistic controls for the **Logitech Extreme 3D Pro** controller (currently the only supported controller):
* **Left Mouse Click** resizes the chassis of the robot.
* **X axis** of the controller controls the left/right motion.
* **Y axis** of the controller controls the forward/backward motion.
* **Rotation axis** of the controller controls the rotation motion.
## Resources
* [JInput](https://github.com/jinput/jinput) was the library used for the controller input.
* [Processing 3](https://processing.org/) is the graphic library used to visualise the simulation.
* Ether's [derivation of inverse kinematics of swerve drive drive](https://www.chiefdelphi.com/media/papers/download/3027) was an absolutely awesome resource for working through the math of the system.
* Jacob Misirian's [FRC Swerve Drive Programming guide](https://legacy.gitbook.com/book/jacobmisirian/frc-swerve-drive-programming/) was quite helpful as well, as it went over the Java implementation of such system on FRC robots.