/9430-hpwafflejet1024

FRC 2024 Project code for the HP Waffle Jet 1024

Primary LanguageC++GNU General Public License v3.0GPL-3.0

MAXSwerve C++ Template v2023.1

See the online changelog for information about updates to the template that may have been released since you created your project.

Description

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.

Prerequisites

  • 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)

Robot Controls

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.

Operator Guide

Robot Positions

  • 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.

Robot Actions

  • 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

Driver Guide

Movement

  • 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.

Configuration

Assigned CAN IDs

Resources

WPILib Documentation Homepage

Zero To Robot Programming Fundamentals

WPILib Programming Resources

REV and CTRE API Docs

Swerve Drive Programming Resources

Branching

  • 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