Code for the FRC 2023 Robotics Competition
- Official FIRST Robotics Competition Control System (WPILib)
- API Documentation
- DriveTrain
- Motors
- Left
- Master: Talon SRX (on CAN ID 3)
- Follower: Talon SRX (on CAN ID 1)
- Right:
- Master: Talon SRX (on CAN ID 4) - Inverted
- Follower: Talon SRX (on CAN ID 2) - Inverted
- Left
- Gear Box
- Toughbox Mini Classic
- Counts Per Revolution: 4096
- Encoder Ratio: 1:1
- Wheels
- 6" Diameter (0.1524 meters)
- Toughbox Mini Classic
- Gyro
- NavX (on SPI MXP Port)
- Motors
- Arm
- Motor
- TBD
- Limit Switches
- Upper
- TBD
- Lower
- TBD
- Upper
- Motor
- Gripper
- TBD
- Cameras
- TBD
- 2 Joysticks
- 1 dedicated for driving
- 1 dedicated for arm/gripper controls
- Stick
- arcade drive w/ proportional speed
- y-axis is forward/back
- x-axis is turn left/right
- Buttons
- Driver Assistance (to be discussed/designed further)
- scoringZone (use april tag?)
- left
- middle
- right
- if pieceMode == cone: (use reflective tape?)
- left
- right
- activate balance
- scoringZone (use april tag?)
- Driver Assistance (to be discussed/designed further)
- Robot Hardware
- Sensors
- NavX
- Ultrasonic (for detecting when hanging off ramp?)
- Visual Camera
- PhotonVision Camera? (placement on robot is critical for effective vision)
- Sensors
- Stick
- Y-axis w/ proportional speed
- forward = arm down
- backward = arm up
- Y-axis w/ proportional speed
- Buttons
- gripControl
- open
- close
- pieceSelection (will set LED on robot accordingly and adjust gripper pressure)
- cone
- cube
- placementPosition (dependent on pieceMode)
- low
- medium
- high
- pickupPosition (dependent on pieceMode?)
- shelf
- ground (cube or upright cone)
- ground (flat cone)
- gripControl
- Hardware
- Sensors
- Limit Switch
- Upper
- Lower
- Visual Camera?
- Limit Switch
- LED Light (to indicate cone vs cube pickup to human @ loading station)
- Sensors
The routines in bold are the most important/common routines we will use
- Routine 1: Sit still
- Routine 2: Mobility
- Drive straight forwards towards the middle of the field
- Parameters
- Delay
- Distance
- Routine 3: Score and Mobility
- Score preloaded game piece
- Drive straight forwards towards the middle of the field
- Parameters
- Delay
- Distance
- ScoreLevel
- Routine 4: Dock and engage
- Drive straight onto charge station and balance
- Use PID to automatically balance
- Parameters
- Delay
- Routine 5: Mobility, dock, and engage
- Drive straight forwards towards the middle of the field over the charge station
- Drive back onto the charge station
- Use PID to automatically balance
- Parameters
- Delay
- Distance
- Routine 6: Score, dock, and engage
- Score preloaded game piece
- Drive straight onto charge station and balance
- Use PID to automatically balance
- Parameters
- Delay
- ScoreLevel
- Routine 7: Score, mobility, dock, and engage
- Score preloaded game piece
- Drive straight forwards towards the middle of the field over the charge station
- Drive back onto the charge station
- Use PID to automatically balance
- Parameters
- Delay
- Distance
- ScoreLevel
- Routine 8: Score, mobility, pick up a game piece from center field, dock, and engage
- Score preloaded game piece
- Drive straight forwards towards the middle of the field over the charge station
- Pick up a game piece at center field
- Drive back onto the charge station
- Use PID to automatically balance
- Parameters
- Delay
- Distance
- ScoreLevel
- GamePieceType
Delay: Delay before robot starts moving, in seconds
Distance: Distance to leave the community, in feet/meters (TBD)
ScoreLevel: Either low, medium, or high
GamePieceType: Either cone or cube
- Autonomous
- Mobility
- Forward
- Reverse
- Dock & Engage
- Forward
- Reverse
- Mobility Dock & Engage
- Red Alliance
- Wall Side
- Human Side
- Blue Alliance
- Wall Side
- Human Side
- Red Alliance
- Mobility
- Arm/Gripper
- Basic
- Arm Up (stops at upper limit switch)
- Arm Down (stops at bottom limit switch)
- Gripper Open
- Gripper Close
- Auto Position
- Top
- Middle
- Bottom
- Shelf
- Gripper Safety
- Auto close if arm moving down near bottom
- Auto close if at bottom limit and the arm moving up
- Basic
- Driver Assist
- Prepare for Pickup
- Pickup from Ground
- LEDs
- Setting alliance changes LEDs to match red/blue
- Starting autonomous changes LEDs to green
- Moving Arm Up
- Moving Arm Down