Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

frc5024/InfiniteRecharge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InfiniteRecharge
CI Badge

The source and tooling behind FRC team 5024's 2020 competition robot.

Table of contents

Project setup & Installation

This project has multiple components, each requiring their own tools and software versions.

Robot software

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

Gradle can be downloaded by following the instructions HERE (Windows users should read the "Installing Manually" section), and WPILib's installation instructions can be found HERE.

Java should be automatically installed by the WPILib installer, and Python can be installed from HERE.

Robot control

This robot is controlled via NI DriverStation. This software is available as part of the FRC Game Tools bundle for 2020. Installation instructions can be found HERE.

Robot UI is handled by Shuffleboard, which should be installed when installing WPILib.

Hardware tools

Some additional tools are required for working with other Robot hardware. Make sure to install each tool:

Robot extras

Some additional tools are highly recommended for working with the RoboRIO. These are Filezilla and WinSCP for windows. Linux users can use scp and ssh.

Computer vision

Our computer vision system is handled by a Limelight 2.0 camera. No tools are needed for using this device.

Documentation generation

Documentation generation is handled by a Gradle plugin, and a Perl script. The perl script can only be run on *nix systems.

This script requires a recent version of GIT, and Perl 5.010 or later.

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.

  • Pressing CTRL+SHIFT+P in VSCode, searching for WPILib: Build robot code, and running the task
  • Opening the project in a terminal, and running .\gradlew.bat build (Windows) or ./gradlew build (Linux)

GitHub CI

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".

Deployment

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.

Documentation

Here are the links to the multiple documentation sources for this project

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

Vendor libraries

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.

Networking

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

Device Address
Router 10.50.24.1
RoboRIO 10.50.24.2
Limelight 10.50.24.11

Note: The wireless AP's password is raiderrobotics

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: R!$E2geTHeR#2020

Troubleshooting

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)

Deployment errors

  • 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:

  • ScriptBase.py
  • ScriptBase.vbs
  • tools.json
  • ToolsUpdater.jar
  • ToolsUpdater.py

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
  • Run 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 tools/linux/sc-controller

On windows, use the "default controller mode" setting in the steam controller settings.

About

The source and tooling behind FRC team 5024's 2020 competition robot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages