Robot code for 2025 FRC season
Color | Pattern | Strips | Meaning | Trigger |
---|---|---|---|---|
Green | Solid | All | Reef AprilTag detected | N/A |
Pattern | Controller | Meaning |
---|---|---|
Continuous 100% | Both | Swapping controllers activated. Swap occurs after vibration ends |
500 ms pulse | Driver | Aligned to reef for scoring coral |
- ftp://172.22.11.2 -USB only
- ftp://roborio-1756-frc.local -USB, Wifi, or Ethernet
- ftp://10.17.56.2 -Wifi or Ethernet
When commissioning a new robot, you should set the instance type to either "Competition" or "Practice" by creating a text file using FTP readable by lvuser
on the RoboRIO at path /home/lvuser/robotInstance
. The content of this file should be just the text Competition
or Practice
with no whitespace preceding. If no valid instance is found at runtime, competition instance will be used and an error will be generated.
- When homing swerve modules figure out what is the front of the robot. The battery is the front.
- Rotate each swerve module to where each bevel gear is to the left side of the robot.
- Use something flat that is the length of the robot and line the swerve wheels up.
- Power on the robot and connect your computer. Open Phoenix Tuner X. Select each drive CANcoder and click the "Zero CANcoder" button.
- Move arm so it's parallel to the ground in the left position. The battery is the front.
- Power on the robot and connect your computer. Open Phoenix Tuner X. Select arm CANcoder and click the "Zero CANcoder" button.
π Note: Positive direction is rotating toward upward position
- Move wrist so wheels are toward the elevator and the rotating wrist tube aligns to the stationary arm tube.
- Power on the robot and connect your computer. Open Phoenix Tuner X. Select arm CANcoder and click the "Zero CANcoder" button.
π Note: Positive direction is rotating toward wheels left while arm is up. The battery is the front
- Move climber so it's parallel to the ground extended toward front of robot. The battery is the front.
- Power on the robot and connect your computer. Open Phoenix Tuner X. Select climber CANcoder and click the "Zero CANcoder" button.
π Note: Positive direction is rotating inward toward elevator
See vision readme for information on which pipelines to use and which indices to install these pipelines on.
Go to http://10.17.56.2:5812 while connected to the robot to update firmware or change addresses.
This project uses pre-commit to check code formatting before accepting commits.
First install the prerequisites:
-
python3 (with pip) - instructions
- Python 3.12.x from the Python website works well. Make sure to check the add to path option in the installer.
-
pip packages:
- You may need to add the pip install path to your shell's path if you're using Git Bash. In git bash:
- Open (or create) new file
~/.bashrc
by runningvim ~/.bashrc
- Add this to the end:
PATH=$PATH:$LOCALAPPDATA/Programs/Python/Python39/Scripts/
(changePython39
to match your python version)- Note: The actual path you need to add (
$LOCALAPPDATA/Programs/Python/Python39/Scripts/
in the above example) depends on your Python installation. If y ou do thepip install
steps first, pip will print the path you need to add. - To type in Vim, type i and you should see
INSERT
at the bottom of the window to indicate you're editing in insert mode
- Note: The actual path you need to add (
- Exit by pressing Esc then type
:wq
and press Enter - Run
source ~/.bashrc
to update your session
- Open (or create) new file
- wpiformat -
pip install wpiformat
- clang-format -
pip install clang-format
- pre-commit -
pip install pre-commit
Make sure to run
pip install <package>
commands in an administrator terminal if installing in windows - You may need to add the pip install path to your shell's path if you're using Git Bash. In git bash:
Then initialize:
pre-commit install
pre-commit run
The first run may take a moment, but subsequent automatic runs are very fast.
You'll now have the linter run before each commit! For compatibility with Windows, we recommend the pip version of clang-format, but wpi-format will find any installed clang-format
binary in the system path.
Driver Coral Mode:
Button | Function |
---|---|
Left JS X | Drive |
Left JS Y | Drive |
Right JS X | Turn |
Right JS Y | Unused |
DPad Up | Unused |
DPad Right | Unused |
DPad Down | Unused |
DPad Left | Unused |
A | Outtake Coral |
B | Align Right |
X | Align Left |
Y | Manual Place |
LB | Left Intake |
RB | Right Intake |
LT | Left Place |
RT | Right Place |
Back | Field Home |
Start | Unused |
Left JS Button | Unused |
Right JS Button | Unused |
Driver Algae Mode:
Button | Function |
---|---|
Left JS X | Drive |
Left JS Y | Drive |
Right JS X | Turn |
Right JS Y | Unused |
DPad Up | Unused |
DPad Right | Unused |
DPad Down | Unused |
DPad Left | Unused |
A | Intake Algae |
B | Align Right |
X | Align Left |
Y | Align Algae |
LB | Hold - Left Intake, Release - Place |
RB | Hold - Right Intake, Release - Place |
LT | Left Place |
RT | Right Place |
Back | Field Home |
Start | Unused |
Left JS Button | Unused |
Right JS Button | Unused |
Operator Coral Mode:
Button | Function |
---|---|
Left JS X | Unused |
Left JS Y | Elevator |
Right JS X | Wrist |
Right JS Y | Unused |
DPad Up | Climber Arm Up Manual |
DPad Right | Climber Winch Out |
DPad Down | Climber Arm Down Manual |
DPad Left | Unused |
A | Preclimb |
B | Climber Arm Down |
X | Pressed - HP Pickup, Released - Floor Intake |
Y | Climber Arm Up |
LB | Climber Winch In |
RB | Intake Coral |
LT | Shoulder Left |
RT | Shoulder Right |
Back | Unused |
Start | Unused |
Left JS Button | Unused |
Right JS Button | Unused |
Operator Algae Mode:
Button | Function |
---|---|
Left JS X | Unused |
Left JS Y | Elevator |
Right JS X | Wrist |
Right JS Y | Unused |
DPad Up | Climber Arm Up Manual |
DPad Right | Climber Winch Out |
DPad Down | Climber Arm Down Manual |
DPad Left | Unused |
A | Preclimb |
B | Climber Arm Down |
X | Pressed - HP Pickup, Released - Floor Intake |
Y | Climber Arm Up |
LB | Climber Winch In |
RB | Outtake Algae |
LT | Shoulder Left |
RT | Shoulder Right |
Back | Unused |
Start | Unused |
Left JS Button | Unused |
Right JS Button | Unused |
Button Box (Coral):
Button | Function |
---|---|
1 | Unused |
2 | Unused |
3 | Coral L4 |
4 | Unused |
5 | Unused |
6 | Coral L3 |
7 | Reef Left Position (Unused) |
8 | Reef Right Position (Unused) |
9 | Coral L2 |
10 | Coral/Algae Mode Toggle |
11 | Stow |
12 | Coral L1 |
Button Box (Algae):
Button | Function |
---|---|
1 | Unused |
2 | Unused |
3 | Algae Net |
4 | Unused |
5 | Unused |
6 | Algae L3 |
7 | Reef Left Position (Unused) |
8 | Reef Right Position (Unused) |
9 | Algae L2 |
10 | Coral/Algae Mode Toggle |
11 | Stow |
12 | Algae Processor |
- Swerve Drive
- Forward/reverse
- Left/right strafe
- Clockwise/counterclockwise rotation
- Coral Floor intake
- Left/Right
- Coral manual intake controls
- Manual intake
- Manual outtake
- Coral Station intake
- Left/Right
- Coral Place
- Left/Right
- L1, L2, L3, L4
- Algae floor pickup
- Left/Right
- Algae Processor placement
- Left/Right
- Algae net
- Left/Right
- Climber
- Manual controls
- Auto sequence
- Vision
- Detect targets Left/Right
- Aim Left/Right reef pole on left and right cameras
- Shut down robot, swap battery
We're using the following dependencies:
- Our sponsors for the 2025 season. Thank you for your continued support!
- Doxygen Awesome - for making our documentation look great
This software is licensed under the BSD 3-clause license. If you would like to use this software under the terms of a different license agreement, please contact us.