Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit c7c4414 Aug 20, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
simulation outputting all matrices in EJML format Jun 28, 2018
src-tests/javacontrols changing path Aug 19, 2018
src/org/rivierarobotics one last javadoc change Aug 19, 2018
.gitattributes inital commit Jun 24, 2018
build.xml inital commit Jun 24, 2018
gradlew inital commit Jun 24, 2018
gradlew.bat inital commit Jun 24, 2018

Diff Swerve

Some Background

This repository houses the code for Team 5818's Differential Swerve Drive prototype. A differential swerve drive is similar to a "classic" swerve drive, except it doesn't have dedicated motors for steering and throttle. Instead, two drive motors are linked through a mechanical differential, which allows for the module to either rotate or translate depending on the ratio of the individual motors' velocities. For more information on the mechanical setup, consult this thread:

If you are looking for a guide on progamming a "standard" swerve drive, much of this code will still be applicable, but the code for controlling the individual modules will be different.

Repository Structure

All of the actual robot code for this project is located in the directory src/org/rivierarobotcs/. There are two other interesting directories in this repo: simulation/ and src-tests/javacontrols/. Both of these directories are remnants of our original intent to use state feedback and kalman filters to control the module. simulation/contains a MATLAB script for simulating a differential swerve module controller, while src-tests/javacontrols/ does the same thing in Java using the Efficient Java Matrix Library (EJML) to take care of the linear algebra. None of the state feedback code has gone on the robot (yet), but writing the simulation code was an excellent learning experience. All state feedback code draws heavy inspiration from 971's 2017 robot code.


This repository uses FRCGrantle, Team 5818's custom build system. FRCGrantle is a hybrid between Gradle and Ant. It uses Gradle tasks to fetch dependencies and automate setup, but the code still deploys using the Ant scripts provided by FIRST. To set up this repository:

  • Clone the repository
  • Navigate to the root directory of the repository and run ./gradlew eclipse
  • After the build finishes, import the project into Eclipse
  • To deploy, click Run As > WPILib Java Deploy in Eclipse.
  • Enjoy!
You can’t perform that action at this time.