Skip to content

Releases: nerdspark/NERDSwerve

NERDSwerve base code

13 Oct 16:51
d1fef8d
Compare
Choose a tag to compare

An ultra-simplified swerve code outline, optimized for use with a 2-pod TurdSwerve

The template code uses Spark MAX motor controllers, PWM-based absolute encoders, and a Pigeon 2.0 gyroscope, but is easily reconfigured for other electronics.

Features:

  • Field-centric teleoperated driving
  • WPILib-based odometry & Shuffleboard odometry output
  • Custom pod zeroing tool
  • Azimuth PID controllers (currently tuned for original TurdSwerve pods) and Shuffleboard tuning system
  • Smart robot heading PID controller
  • Organized code (probably) follows FRC coding conventions

In order to use this codebase on your robot, you will need to:

  • Adjust your motor, encoder, & gyro CAN IDs to match the codebase
  • Adjust the input/output functions to match your electronics
  • Set your robot's pod zeros in the code
  • Retune the azimuth PID controller for your pod type and motor type