FRC1756-Argos / 2022-Robot

Robot code for 2022 FRC Season
https://frc1756-argos.github.io/2022-Robot/
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

2022-Robot

CI Format Documentation

Robot code for 2022 FRC Season

Key Features

Commissioning A Robot

When commissioning a new robot, you should set the instance type to either "Competition" or "Practice" by creating a text file 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.

Vision

See vision readme for information on which pipelines to use and which indices to install these pipelines on.

Project Setup

Pre-Commit

This project uses pre-commit to check code formatting before accepting commits.

First install the prerequisites:

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.

Controls

Driver: Button Function
Left JS X Drive
Left JS Y Drive
Right JS X Turn
Right JS Y Unused
DPad Up Unused
DPad Right Move Pre-Climb Forward One Position
DPad Down Confirm climb
DPad Left Move Pre-Climb Backward One Position
A Home Swerve (hold with B and X)
B Home Swerve (hold with A and X)
X Home Swerve (hold with A and B)
Y Field Home (hold)
LB Hold For Robot Centric
RB Reverse Intake
LT Shoot
RT Intake
Back Swap (hold with Start)
Start Swap (hold with Back)
Left JS Button Unused
Right JS Button Unused
Operator: Button Function
Left JS X Manual Aim
Left JS Y Manual Hood
Right JS X Climbing Hooks
Right JS Y Climbing Arm
A Home Turret (hold with X and B) + Lower Arm
B Home Turret (hold with X and A) + Extend Hook
X Home Turret (hold with A and B) + Retract Hook
Y Home Hood (hold)
DPad Up Front Close Up Shot
DPad Right Right Close Up Shot
DPad Down Back Close Up Shot
DPad Left Left Close Up Shot
LB Move Pre-Climb Backward One Position
RB Move Pre-Climb Forward One Position
LT Unused
RT Vision Target
Back Swap (hold with Start)
Start Swap (hold with Back)
Left JS Button Unused
Right JS Button Unused

Software Checkout

  1. Check turret position
  2. Check wheel tread
  3. Drive and Turn
    1. Drive forward
    2. Drive backward
    3. Drive left
    4. Drive right
    5. Turn left
    6. Turn right
    7. Drive forward
  4. Intake
    1. Intake a ball
    2. Outtake a ball
  5. Shooter
    1. Move turret left and right manually
    2. Move hood up and down manually
    3. Check the four setpoints (using the d-pad on the operator controller) for the proper turret positions
    4. Aim (vision; make sure camera is working)
    5. Intake and shoot a ball (this also checks the elevator functionality)
  6. Climber
    1. Move the climb arms up and down
    2. Move the hooks up and down
    3. Go through the climb sequence
  7. Wait for air
  8. Change battery

Software Versions

As of the end of the 2022 season, we're using the following dependencies:

Special Thanks

License

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.