Team 6940's 2022 FRC robot code. The whole Code is written in Java and is based off WPILib's Java control system.
The code is divided into several packages, each responsible for a different aspect of the robot function. This README explains setup instructions, the function of each package, and some of the variable naming conventions used. Additional information about each specific class can be found in that class' Java file.
- Clone this repo
- Run
./gradlew
to download Gradle and needed FRC/Vendor libraries (make sure you're using Java 11 or greater) - Run
./gradlew
downloadAll to download FRC tools (ShuffleBoard, etc.) - Run
./gradlew
tasks to see available options - Enjoy!
- Get the WPILib extension from the release page on this repository
- In
.vscode/settings.json
, set the User Setting,java.home
, to the correct directory pointing to your JDK 11 directory
- Run
./gradlew idea
- Open the
2022RapidReact.ipr
file with IntelliJ - When prompted, select import Gradle build
- Run
./gradlew eclipse
- Open Eclipse and go to File > Open Projects from File System...
- Set the import source to the
2022RapidReact
folder then click finish
- Run
./gradlew deploy
to deploy to the robot in Terminal (*nix) or Powershell (Windows) - Run
./gradlew build
to build the code. Use the--info
flag for more details - Run
./gradlew test
to run all of the JUnit tests
-
Path following with PathPlanner(Credit @mjansen4857)
-
Shooter algorithm. We have two modes for shooting. One depends on the Ball Trajectory equation, the other depends on the interpolation table.
-
State machine control. We use state machine control in our subsystems, which brings tremendous convenience.
-
Pixy camera. We use Pixy2 to help us detect balls automatically both in tele-operated period and in autonomous period.