Charged Up 2023
Code for the FRC 2023 Robotics Competition
Resources
Hardware Configuration
- 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
- Gear Box
- Toughbox Mini Classic
- Counts Per Revolution: 4096
- Encoder Ratio: 1:1
- Wheels
- 6" Diameter (0.1524 meters)
- Gyro
- Arm
- Gripper
- Cameras
Desired Robot Controls
Hardware
- 2 Joysticks
- 1 dedicated for driving
- 1 dedicated for arm/gripper controls
Functionality
Driver Control
- 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?)
- if pieceMode == cone: (use reflective tape?)
- activate balance
- Robot Hardware
- Sensors
- NavX
- Ultrasonic (for detecting when hanging off ramp?)
- Visual Camera
- PhotonVision Camera? (placement on robot is critical for effective vision)
Arm Control
- Stick
- Y-axis w/ proportional speed
- forward = arm down
- backward = arm up
- Buttons
- gripControl
- pieceSelection (will set LED on robot accordingly and adjust gripper pressure)
- placementPosition (dependent on pieceMode)
- pickupPosition (dependent on pieceMode?)
- shelf
- ground (cube or upright cone)
- ground (flat cone)
- Hardware
- Sensors
- Limit Switch
- Visual Camera?
- LED Light (to indicate cone vs cube pickup to human @ loading station)
Desired Autonomous Routines
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
- Routine 3: Score and Mobility
- Score preloaded game piece
- Drive straight forwards towards the middle of the field
- Routine 4: Dock and engage
- Drive straight onto charge station and balance
- Use PID to automatically balance
- 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
- Routine 6: Score, dock, and engage
- Score preloaded game piece
- Drive straight onto charge station and balance
- Use PID to automatically balance
- 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
- 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
Parameters Definitions
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
Testing Checklist
- Autonomous
- Mobility
- Dock & Engage
- Mobility Dock & Engage
- Red Alliance
- Blue Alliance
- Arm/Gripper
- Basic
- Arm Up (stops at upper limit switch)
- Arm Down (stops at bottom limit switch)
- Gripper Open
- Gripper Close
- Auto Position
- Gripper Safety
- Auto close if arm moving down near bottom
- Auto close if at bottom limit and the arm moving up
- 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