This is the core framework for WildStang's FRC robot software development. Example robot code can be found in examples. Prior to 2022 the latest version of the robot framework could be found in the latest 20XX_robot_software repo. This repository is the primary working space for the framework, all future robot software repos should fork it.
This repo contains 2 components to the "framework". First, it contains the actual robot framework which acts as the control layer of the robot software. It connects all the pieces together, but does not interact with any hardware on either side. Second, there is the hardware component, it implements others' APIs to connect the hardware to the framework. The framework for this reason should not import any external libraries for specific robot functions, such as WPILib. The framework may import libraries for utility purposes, in this case WPILib's Timer is okay.
In order to create a new code base for a new robot follow these steps:
- Fork this repo into a 20XX_robot_software repo
- In
src/main/java/org/wildstang/
duplicatesample
toyear20XX
- Rename package accordingly in each class and
ROBOT_MAIN_CLASS
inbuild.gradle
- Update
edu.wpi.first.GradleRIO
version inbuild.gradle
to latest WPILib version - Update
frcYear
insettings.gradle
to competition year - Update
projectYear
in.wpilib/wpilib_preferences.json
to competition year - Update
teamNumber
in.wpilib/wpilib_preferences.json
if necessary
The fork.sh
script automates much of the forking process.
To fork a given branch to a given repo run the following:
robot_framework/fork.sh [repo] [branch]
Note, if you are looking to fork the framework to a non-WildStang owned repo you must edit the GITHUB
variable in the script.
Also, the script will automatically update the year in the project if the new repo is named 20XX_...
.
These changes will be automatically committed and pushed.
The fork script can also be used to keep your fork up-to-date with the latest changes on a given branch of the framework, simply run:
./fork.sh update [branch]
- GitHub Desktop
- VS Code and other required components
- Driver Station and Utilities
- RoboRIO Imager
- Instructions
- Included with Driver Station
- Radio Configuration Utility
- Instructions
- Download link in instructions, look for "FRC Radio Configuration XX.Y.Z"
- REV Hardware Client
- Phoenix Tuner (CAN)
To build/deploy/debug the robot code either right click on build.gradle
and choose the desired option or open the command pallete and search and select WPILib: [FUNCTION] robot code
.
Robot code may also be deployed by pressing Shift + F5
.
To open the command palette use:
- F1
- Ctrl + Shift + P
- Cmd + Shift + P
- Select the WPILib Command Palette 'W' button in the top right
./gradlew javadoc
Note: if you have multiple version of the JDK installed you may need to set JAVA_HOME
specifically to 11.