See the online changelog for information about updates to the template that may have been released since you created your project.
A template project for an FRC swerve drivetrain that uses REV MAXSwerve Modules.
Note that this is meant to be used with a drivetrain composed of four MAXSwerve Modules, each configured with two SPARKS MAX, a NEO as the driving motor, a NEO 550 as the turning motor, and a REV Through Bore Encoder as the absolute turning encoder.
To get started, make sure you have calibrated the zero offsets for the absolute encoders in the Hardware Client using the Absolute Encoder
tab under the associated turning SPARK MAX devices.
- SPARK MAX Firmware v1.6.2 - Adds features that are required for swerve
- REVLib v2023.1.2 - Includes APIs for the new firmware features
- XBox One Gamepad
- AHRS Libraries (navX MXP)
This section is written for our drive team as a reference for robot controls. The listed controls are for an XBox One Gamepad, which is required for operation.
- AMP Score / Speaker Score Position : (TOGGLE) Press D-Pad Right to move shooter to its vertical shooter position.
- Climb : Press D-Pad Up to prepare the robot for the Climb Action
- Floor Intake Position : Press D-Pad Left to prepare the robot to feed in notes from the ground
- Transit Position : Press D-Pad Down to prepare the robot for manueverability.
- Climb Action : -- Press Y to perform the climb action once the robot is in Climb Position.
- Note Feed In Action : Press Left Bumper to intake a note from the ground while the robot is in floor intake position.
- Note Eject Action : Press A
- Speaker Score Action : Press Right Bumper
- Left Thumbstick: Moves and strafes the robot relative to the field
- Right Thumbstick:
- Left: Rotate the robot counterclockwise
- Right: Rotate the robot clockwise
- START: Press to reset robot heading for field relative drive
- Face the front of the robot in the same direction of the Driver (the driver and the robot should be facing the same way).
- Press START and observe haptic feedback.
- https://docs.wpilib.org/en/stable/stubs/programming-basics-stub.html (Basic)
- https://docs.wpilib.org/en/stable/stubs/advanced-programming-stub.html (Advanced)
- https://github.wpilib.org/allwpilib/docs/release/cpp/index.html (Full WPILibC++ Docs)
- Template MaxSwerve Project Source: https://github.com/REVrobotics/MAXSwerve-Cpp-Template
- Working CPP code: https://github.com/ahayden04/swerve-falcon
- Example of swerve robot: https://www.youtube.com/watch?v=wc8wh6RsMCs
- Source (Chief Delphi): https://www.chiefdelphi.com/t/working-c-swerve-drive-super-proud/407116
- git branch (new_branch) -- create a new local branch
- same name as upstream origin/(branch_name)
- git branch -u (existing_branch) -- Set upstream branch to (existing_branch)
- This will set your local branch to push committed changes to the target upstream branch on origin/(existing_branch)
- git checkout (existing_branch) -- switch to an existing local branch
- switch out your local copy to commit to an existing local branch (existing_branch)
- git push --set-upstream origin (branch_name)
- push changes explicitly to (branch_name)
- NEVER PUSH TO MAIN