BC Robotics (Team #4504) has designed their 2024 FIRST Robotics submission using Robotpy with the MagicBot Framework. To keep the relevant libraries current, the following code will need to be run regularly in a terminal interface:
python -m pip install --upgrade pip
python -m pip install robotpy wpilib
robotpy installer download-python
robotpy installer install-python
robotpy sync
robotpy installer download robotpy[all]
robotpy installer install robotpy[all]
- SparkMax (8x):
- Drives MK4i Swerve Module (4x)
Component | Type | ID/Details | Inverted | Gear Ratio | Wheel Diameter | Absolute Encoder | Z-Offset |
---|---|---|---|---|---|---|---|
Front Left Angle Motor | SparkMaxTurning | 6 | No | 1 | 1 | Yes | 5.7535123 |
Front Left Speed Motor | SparkMaxDriving | 5 | No | 1 | 0.1143 | ||
Rear Left Angle Motor | SparkMaxTurning | 8 | No | 1 | 1 | Yes | 5.6867370 |
Rear Left Speed Motor | SparkMaxDriving | 7 | No | 1 | 0.1143 | ||
Rear Right Angle Motor | SparkMaxTurning | 2 | No | 1 | 1 | Yes | 5.5975077 |
Rear Right Speed Motor | SparkMaxDriving | 1 | No | 1 | 0.1143 | ||
Front Right Angle Motor | SparkMaxTurning | 4 | No | 1 | 1 | Yes | 0.0182671 |
Front Right Speed Motor | SparkMaxDriving | 3 | No | 1 | 0.1143 |
- SparkMax ():
- Drives Neo 550 Brushless Motor
Component | Type | ID/Details | Inverted | Gear Ratio | Follower CAN ID |
---|---|---|---|---|---|
Launcher Spinner Left | SparkMaxDualSpinner | 10 | Yes | ||
Launcher Spinner Right | SparkMaxDualSpinner | 12 | No | ||
Intake Spinner Left | SparkMaxDualSpinner | 14 | Yes | ||
Intake Spinner Right | SparkMaxDualSpinner | 13 | Yes | ||
Intake Pivot | SparkMaxPivot | 9 | No | 4 | 15 |
- SparkMax (2x):
Component | Type | ID/Details | Inverted |
---|---|---|---|
Climber Motor Left | SparkMaxClimb | 16 | No |
Climber Motor Right | SparkMaxClimb | 17 | Yes |
10.45.4.1
- Limelight 2.0:
- Static IP address (Front)
10.4.45.11
- Static IP address (Rear)
10.4.45.12
- Static IP address (Front)
Component | Type | IP | Name |
---|---|---|---|
Limelight | Limelight | 10.4.45.11 |
limelight |
Limelight Front | Limelight | 10.4.45.12 |
limelight-front |
- Input device ID
0
- Left Joystick (Lx, Ly): Controls the robot's movement in the field. The X-axis (Lx) translates to movement in the x-direction while the Y-axis translates to movement in the y-direction.
- Right Joystick (Rx): Controls the robot's rotation on the field. The X-axis (Rx) influences the angular velocity of the robot.
- Right Trigger (RT): Engages the launcher to shoot.
- Left Trigger (LT): Engages auto-alignment with the AprilTag. When pressed beyond a certain threshold(.35), it activates the alignment process for precise targeting.
- Y Button: Positions the intake to score in the amp.
- B Button: Deactivates the front camera, raises the intake.
- A Button: Activates the front camera and lowers the intake.
Our autonomous plan is as follows...
- Backup to shooting positon
- Shoot preloaded game piece
- Backup 2.75844 meters to exit community