Code for FRC 2067's 2024 Robot for the game CRESCENDO
-
wpilib getting started covers how to wire and program a robot
- Status Light Quick Reference - something is blinking at you... what does it mean?
-
documentation for software libraries and hardware we'll use:
The motors that move the robot chassis around the field.
- Motors
- 4x - Falcon500 swere modules (2 Falcon500s per module)
- Sensors
- Pigeon IMU for measuring robot heading and pitch
Picks up game pieces off the ground. Hands them off to the hopper
-
Motors
- 2x Falcon 500
- Velocity closed loop control
- 2x Falcon 500
-
Sensors
- 1x IR Proximity Sensor
Motors at the front of the shooter assembly that allow game pieces to be fired out of the robot.
- Motors
- 2x - Kraken X60
- Velocity closed loop control
- 2x - Kraken X60
Brings in game pieces from the intake. Stores them until the shooter is ready to be fired.
- Motors
- 1x - Falcon 500
tbd
- Velocity closed loop control
- 1x - Falcon 500
Moves the shooter assembly vertically to differnt heights
- Motors
- 2x - Falcon 500
- Motion Magic - position closed loop control
- 2x - Falcon 500
Rotates the shooter assembly to change pitch angle
- Motors
- 1x - Falcon 500
- Motion Magic - position closed loop control
- 1x - Falcon 500
-
Download and Install the latest WPIlib 2024 release
- If you're on Windows, download the latest
.iso
file (e.g.WPILib_Windows-2024.1.1.iso
). - While connected to the internet, open the ISO
- run the
WPILibInstaller.exe
file - follow the on-screen instructions, to install vscode for your user
- run the
- If you're on Windows, download the latest
-
Other tools you need & should install:
-
- You need this to control a robot (includes the driverstation application)
- You can skip license entry / activation for the NI Vision component we won't
- Open the driverstation and enter our team number (2067) from the
Setup
Tab on the left (gear)
-
- Software libraries for CTRE devices
- Includes phoenix tuner for configuring/updating firmware on CTRE devices
-
Rev Hardware Client For upgrading firmware on REV Robitics devices
- After installation, perform an update to download device firmwares so you'll have them avaialable later if you're not online (e.g. at a competition)
-
-
Install git bash
- Download the appropriate installer for your OS
- Install following onscreen instructions
TODO
any additional setup steps - dry run on fresh install
-
Create an account at
github.com
, you should have recieved an invite at the email you used to register for slack.
The following steps will authorize vscode to access your github account through OAuth.
This is in place of setting up ssh keys. If you'd rather do that, feel free to do so.
Similar steps to what we're doing are covered here if the below isn't clear enough.
-
Open the
2024 WPILib VS Code
link (on your desktop?) -
Click the
Source Control
tab on the right ( Ctrl+Shift+G ) -
Click the
Clone Repository
button- This will open the
Command Palette
at the top middle.
You will come to know this VS Code feature well... - Click the
Clone from GitHub
option - Follow the on-screen steps to authorize vscode to access your github account
- This will open the
-
Choose the
applepi-2067/2024_Robot
project -
Choose a directory to clone the project into that you will remember (e.g. Documents\FRC) a new subdirectory for the project will be created
-
The first time the project opens it should start downloading dependencies and building the code. You should see the status of the build process listed at the bottom
Terminal
panel in vscode- If the build fails, you may not have completed the installation of the Phoenix Framework Installer (above).
TODO: update for 2024
-
Most actions in vscode can be performed through the Command Palette
- Open with ( Ctrl + Shift + P ) or
View
>Command Palette
- Open with ( Ctrl + Shift + P ) or
-
Some example commands you can run from the
Command Palette
Build Robot Code
- Compiles the code in the projectDeploy Robot Code
- Compiles, deploys, and runs the code on the roborio (you need to be connected)Simulate Robot Code
- Compiles, deploys and runs the code in simulation.- You need to have the driverstation or simulated driverstation running to get into Auto or Teleoperated mode.
- Requires simulation models to be implemented for verification of some functionality, but with a little work up front this can be a great way to test your code when you don't have access to robot hardware.
- Complete list of commands here
TODO