|
2024-Robot
Robot code for 2024 FRC season by Argos, FRC team #1756
|
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 |
| :fire: | :fire: | All | :fire: :fire: :fire: | 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 |
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.
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:
pip packages:
~/.bashrc by running vim ~/.bashrcPATH=$PATH:$LOCALAPPDATA/Programs/Python/Python39/Scripts/ (change Python39 to match your python version)$LOCALAPPDATA/Programs/Python/Python39/Scripts/ in the above example) depends on your Python installation. If y ou do the pip install steps first, pip will print the path you need to add.i and you should see INSERT at the bottom of the window to indicate you're editing in insert modeEsc then type :wq and press Entersource ~/.bashrc to update your sessionpip install wpiformatpip install clang-formatpip install pre-commitMake sure to run pip install <package> commands in an administrator terminal if installing in windows
Then initialize:
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 | :fire: :fire: :fire: or Swap (hold with Back) |
| Left JS Button | Unused |
| Right JS Button | Unused |
We're using the following dependencies:
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.