Robot code for 2024 FRC season
Color | Pattern | Strips | Meaning | Trigger |
---|---|---|---|---|
Red/Blue | Solid | All | Robot disabled; indicates alliance received from DS | Robot disabled |
Cat Yellow | Solid | All | Robot disabled; no connection to FMS or driver station since startup | Robot startup |
Red/Blue | Uniform fade in/out | All | Teleop enabled; indicates alliance received from DS | Robot enabled in teleop mode |
Red/Blue | Fade sweeping from front to back | All | Autonomous enabled; indicates alliance received from DS | Robot enabled in autonomous mode |
Orange | Flash | All | Game piece intake | Intake active |
Cat Yellow | Flash | All | Game piece not fully intaked | Intake request ended |
White | Flash | All | Game piece not acquired | Intake request ended |
Cat Yellow | Solid | All | Aim in progress | Aim active |
Red | Solid | All | No target found | Aim active |
Green | Solid | All | Target locked | Aim active |
Orange | Solid | All | Crossfield aiming in progress | Crossfield aiming active |
Plum | Solid | All | Crossfield shot ready | Crossfield aiming active |
🔥 | 🔥 | All | 🔥 🔥 🔥 | Operator command |
Pattern | Controller | Meaning |
---|---|---|
Continuous 100% | Both | Swapping controllers activated. Swap occurs after vibration ends |
Alternating Pulse | Driver | Ready to shoot |
Continuous 100% | Driver | Intake successful |
- 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 intake 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.
- Rotate carriage so note path is parallel with floor and shooter flywheels are pointed away from intake side of robot.
- Power on the robot and connect your computer. Open Phoenix Tuner X. Select carriage CANcoder and click the "Zero CANcoder" button.
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:
Button | Function |
---|---|
Left JS X | Drive |
Left JS Y | Drive |
Right JS X | Turn |
Right JS Y | Unused |
DPad Up | Shooter Feed Forward |
DPad Right | Unused |
DPad Down | Shooter Feed Backwards |
DPad Left | Unused |
A | Aim While Moving |
B | Odometry Aim (temporary) |
X | Unused |
Y | Field Home (hold) |
LB | Manual Reverse Intake |
RB | Intake |
LT | Crossfield Position |
RT | Shoot |
Back | Swap (hold with Start) |
Start | Swap (hold with Back) |
Left JS Button | Unused |
Right JS Button | Unused |
Operator:
Button | Function |
---|---|
Left JS X | Unused |
Left JS Y | Elevator Up/Down |
Right JS X | Unused |
Right JS Y | Shooter Pivot Forwards/Backwards |
A | Amp Shooter Position |
B | Low Podium Shooter Position |
X | High Podium Shooter Position |
Y | Subwoofer Shooter Position |
DPad Up | Climber Up |
DPad Right | Unused |
DPad Down | Climber Down |
DPad Left | Unused |
LB | Continue Climb Sequence |
RB | Start Climb Sequence |
LT | Reverse Trap |
RT | Aim |
Back | Swap (hold with Start) |
Start | 🔥 🔥 🔥 or Swap (hold with Back) |
Left JS Button | Unused |
Right JS Button | Unused |
- Swerve Drive
- Forward/reverse
- Left/right strafe
- Clockwise/counterclockwise rotation
- Intake
- Intake note partially
- Reverse note out of intake
- Intake note fully ensuring note does not enter shooter flywheels
- Manual shooter position setpoints (ensure shot success)
- Amp
- Subwoofer
- Low podium
- High podium
- Vision
- Target Red(4) or Blue(7) speaker april tags with forward and reverse cameras
- Ensure robot only targets tag for assigned alliance
- Climb sequence
- Prepare to climb: shooter vertical, hooks up
- Main sequence: lower hooks, raise shooter, score note
- Reset shooter
- Align wheels forward
- Shut down robot, swap battery
We're using the following dependencies:
- Our sponsors for the 2024 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.