Skip to content

FRCTeam3255/2023_Robot_Code

Repository files navigation

Doc Ock - FRC Team 3255's 2023 Robot

Photo of our robot at the San Diego Regional

The SuperNURDs' code for our 2023 FRC robot, Doc Ock. Doc Ock's code is written in Java and uses WPILib's command based framework.

Controls

Driver Controls Operator Controls

Code Highlights

Swerve

  • Originally based off of Team 364's BaseFalconSwerve
  • Rewritten to follow our own style and structure
  • Uses WPILib swerve classes
  • Field Centric Control
    • Uses navX2 gyro
  • Autonomous path following using PathPlanner and PPLib
  • Auto balance on charge station
    • Uses a very simple two state bang-bang controller to always drive at a slow speed "uphill" and stop when level
    • Uses navX2 gyro
    • Requires specific rotation of robot
    • Only used in autonomous, not teleop
  • MK4Is with Falcon 500 Pinions and L2 Gearing purchased from Swerve Drive Specialties

Arm

  • Uses a state machine to control position
  • States are combinations of shoulder and elbow angles
  • Transition states may be used to avoid arm collisions
  • Each joint position is controlled using Motion Magic
    • Cruise velocity is set to very high value and only the acceleration limit value is tuned.
  • 2 Falcon 500s - One for the elbow, one for the shoulder

Intake

  • Mounted at the end of the arm and used to intake game pieces
  • Employs a limit switch to determine when a game piece is collected
  • Applies a small, constant current when a game piece is collected to prevent it from falling out
  • 2 NEO 550s, placed on the left and right of the intake, each with SPARK MAX Motor Controllers

Collector

  • Deployed when intaking cubes from the floor to help guide them into our intake
  • Falcon 500 - Pivot motor
    • Controls the angle in which the collector is deployed. Only set to a "stow" or a "collecting" angle.
  • NEO 550 with a SPARK MAX Motor Controller - Roller motor
    • Controls the speed of the rollers

Vendor Dependencies and Documentation

Vendor Dependency - VS Code Online Install Link - Documentation (if applicable)