Table of contents
- Setup & Installation
- Building the project
- Code deployment
- Using FieldSim
- Vendor Libraries
- Game resources
Project setup & Installation
This project has multiple components, each requiring their own tools and software versions.
For robot software development, we are using the following tools:
Java: Version 11 Python: Version 3.7 or later Gradle: Version 5.0 WPIlib: 2020.3.2
Java should be automatically installed by the WPILib installer, and Python can be installed from HERE.
Robot UI is handled by Shuffleboard, which should be installed when installing WPILib.
Some additional tools are required for working with other Robot hardware. Make sure to install each tool:
- Phoenix framework (for working with devices from CTRE)
- RoboRIO imaging tool (installed as part of the FRC Game Tools bundle above)
- FRC Radio configuration utility
- Limelight flashing tool (grab the "new tool" from the downlods page)
Our computer vision system is handled by a Limelight 2.0 camera. No tools are needed for using this device.
Documentation generation is handled by a Gradle plugin, and a Perl script. The perl script can only be run on *nix systems.
Building the project
This project runs on Gradle, so most of the work of installing dependancies, and configuring builds is automatically handled. The first time the code is built, Gradle will automatically download all the tools you need.
There are two ways to build the robot project.
CTRL+SHIFT+Pin VSCode, searching for
WPILib: Build robot code, and running the task
- Opening the project in a terminal, and running
.\gradlew.bat build(Windows) or
Every time code is pushed to GitHub, or a pull request is opened, our CI Pipeline will automatically build a copy of the code on GitHub's servers, and report back with a status. This can be checked with the badge at the top of the README file, or by looking for an icon beside each commit. Checkmark is a success, Yellow circle is "Build in progress", and a red X is "failure".
All code deployment to the robot is done over the robot's internal network. In the shop, you can either connect to the robot's wifi access point, or connect with an ethernet cable to the grey networking switch mounted inside the robot.
Once connected, robot code deployment should be done through the VSCode task:
WPILib: Deploy robot code. It will handle almost everything for you.
Here are the links to the multiple documentation sources for this project
- Robot information
- Robot javadoc
- General FRC documentation
- WPILib API
- NavX API
- CTRE documentation
- CTRE API
- Limelight documentation
Building robot documentation
The robot javadoc must be built manually. This must be done on a linux system, or inside a WSL environment.
There is a Perl script in the project root that will handle generation. Just
cd into the project root, and run:
perl doctool.pl -p
Many of the libraries used by this codebase are available in the WPILib vendor JSON format. The JSON files for each library can be found at:
https://raw.githubusercontent.com/wpilibsuite/allwpilib/master/wpilibNewCommands/WPILibNewCommands.json https://raw.githubusercontent.com/wpilibsuite/allwpilib/master/wpilibOldCommands/WPILibOldCommands.json https://www.kauailabs.com/dist/frc/2020/navx_frc.json http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/Phoenix-latest.json http://revrobotics.com/content/sw/color-sensor-v3/sdk/REVColorSensorV3.json http://www.revrobotics.com/content/sw/max/sdk/REVRobotics.json
These should auto-update each time the project is built.
As mentioned in the Deployment section, all robot communications are done through the robot's internal network.
This network uses the following topology:
RoboRIO | Other Wireless devices (( Robot AP | Network Switch | | Limelight --+ +-- Other Wired devices
The "Other Wired/Wireless devices" would be things like
- Programmer's laptops when deploying code
- The Laptop running DriverStation
The network uses the
10.50.24.x address space with dynamic IP addresses assigned from
10.50.24.20 and up.
Some devices on the network have static addresses
Note: The wireless AP's password is
FRC Game resources
FIRST provides us with a few useful documents containing information about the competition. For convenience, the two most important of these are included in this repo in the
docs/gameseason folder. The following links will bring you to the rest of the needed files. Make sure to keep a copy of these on your computer at all times, we reference them a lot.
These files are usually password-protected. The password is:
- Game animation
- Game manual
- Pre-kickoff rules
- Half-field drawings
- Full field diagrams
- Field photos (Large Download)
Here are some solutions for known problems
Gradle wrapper errors
Try installing Gradle (if not already installed), opening a command prompt / terminal in the project root, and running
gradle.exe wrapper (Windows) or
gradle wrapper (Linux)
- Check to make sure you are properly connected with the robot, and it is turned on
- Try deploying again (sometimes a double-deploy is needed)
- Try restarting the robot from driverstation
- Try killing the power to the robot, then turning it on again
- Use Ethernet
FRC Tools are not updating
Each time we update the WPILib version for the project, all project tools should update to reflect the new version (the version will be displayed on the loading screen of each tool). If this is not happening:
Open up the FRC tools install folder (
~/wpilib/<year>/tools for Linux,
C:/Users/Public/wpilib/<year>/tools for Windows), and delete all files except for:
Then, run the following in the project root:
# Linux ./gradlew ./gradlew installAllTools # Windows .\gradlew.bat installAllTools
FRC roboRIO Imaging Won’t Update Firmware or Format Target
This comes from HERE.
Does your computer name have a dash in it? If so, try renaming it. Several teams have reported issues similar to this.
Getting an Xbox360 controller to work on a linux host during simulation
To get the controller connected:
- Plug it in
sudo xboxdrv --silent
- Start the simulation
Using a steam controller for simulation
For linux, the sc-controller project works great for mapping a steam controller to an xbox controller. An sc-controller binary is stored in the project at
On windows, use the "default controller mode" setting in the steam controller settings.