Skip to content
/ SwerveBase-CTRE Public template

A base project for future robots that has CTRE generated swerve drive code and PhotonVision AprilTag processing.

Notifications You must be signed in to change notification settings

Team334/SwerveBase-CTRE

Repository files navigation

SwerveBase-CTRE

CI

A base project for future robots that has CTRE generated swerve drive code and Photon Vision AprilTag processing.

Features

  • Swerve drive code using CTRE's swerve code generator.
  • Device logging with SignalLogger and data logging with Epilogue and DogLog.
  • Device Fault Logging as telemetry for at-home testing. The faults are also logged with DogLog for post-match review.
  • Pre-match self-check with custom self-check commands.
  • A custom VisionPoseEstimator class that reads from a Photon Vision camera and updates the swerve pose estimator with filtered and disambiguated AprilTag vision measurements.
  • Automated wheel radius characterization routine (based on 6328's wheel characterization).
  • A custom zshell script that performs camera calibration with mrcal given an input video of a chessboard dance.

Todo

  • Add choreo (or pathplanner?) support.
  • Add more unit tests.
  • Add proper licenses.

How This Will Be Used

  • At the start of the 2025 season this project should be re-imported in the 2025 wpilib release for any additional updates.
  • After that, since this project is a template on github, the actual 2025 robot code repo can be generated from this template: github templates

Calibration Process

  • Run calibration/calibrator.zsh in zshell in WSL in the calibration folder (make sure all packages are installed).
  • Analyze calibration as according to the mrcal tour.
  • If the calibration was good, load the generated JSON into photon vision.

About

A base project for future robots that has CTRE generated swerve drive code and PhotonVision AprilTag processing.

Topics

Resources

Stars

Watchers

Forks