The WildStang Robotics Program's robot framework has evolved from over 10 years of Java software development. It is the foundation of each robot, providing hardware enumerations, autonomous handling, and common utilities.
- GitHub Desktop
- VS Code and other required components
- Driver Station and Utilities
- RoboRIO Imager
- Instructions
- Included with Driver Station
- Radio Configuration
- REV Hardware Client
- Phoenix 6
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
If running on a system with Podman or Docker installed, the included Dev Container can be used instead of installing dependencies.
This container is based off Microsoft's Java image and will automatically install the latest WPILib extension.
VS Code should automatically detect the Dev Container and ask if you would like to use it.
If you don't get this pop-up open the Command Pallet and select Dev Containers: Reopen in Container.
If you don't see this option you may need to install the Dev Containers extension.
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/duplicatesampletoyear20XX - Rename package accordingly in each class and
ROBOT_MAIN_CLASSinbuild.gradle - Update
edu.wpi.first.GradleRIOversion inbuild.gradleto latest WPILib version - Update
frcYearinsettings.gradleto competition year - Update
projectYearin.wpilib/wpilib_preferences.jsonto competition year - Update
teamNumberin.wpilib/wpilib_preferences.jsonif necessary
./gradlew javadoc
Note: if you have multiple version of the JDK installed you may need to set JAVA_HOME specifically to 11.
The scripts/fork.sh script automates much of the forking process.
To fork a given branch to a given repo run the following:
robot_framework/scripts/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.
The script will automatically update the year across the project if the new repo is named 20XX_....
To automatically push these changes append a third argument push to the command.
The scripts/pull-upstream.sh script automatically pulls in changes from an upstream repository.
This can be used to pull in changes after the repo is forked.
scripts/pull-upstream.sh [repo] [branch]
The scripts/push-upstream.sh script automatically pushes in changes from the current repo to an upstream repository.
scripts/push-upstream.sh [repo] [branch]
Automatically builds the project every time a commit is pushed. No setup is required.
Automatically builds javadocs every time a commit is pushed to main.
Then force-pushes the docs to the docs branch.
This repo requires a personal access token to be added as a repository secret UPDATE_PAT.
Repository secrets are found in Settings > Secrets and variables > Actions.
Automatically pushes the contents of the public branch to the corresponding public repo.
That corresponding repo is wildstang/YEAR_TEAM_robot_software where YEAR and TEAM are read from .wpilib/wpilib_preferences.json.
This repo requires a personal access token to be added as a repository secret PAT.
Repository secrets are found in Settings > Secrets and variables > Actions.
Automatically updates the WPILib version used for the repo daily at 1:11.
This is really only intended to be used on the robot_framework repo.
This repo requires a personal access token to be added as a repository secret UPDATE_PAT.
Repository secrets are found in Settings > Secrets and variables > Actions.