Swerve Setup Guide 2025 Help

TalonFX Swerve Setup

Here, you will learn how to set up your CTRE Swerve Template.

  1. Download and install everything linked below

    1. Swerve Template

    2. Game Tools

    3. WPILib

    4. Git

    5. PathPlanner

    6. Tuner X - (Preview if using Beta)

  2. Open the template in VSCode.

  3. Click the WPILib icon in the VSCode toolbar and find the task WPILib: Set Team Number. Enter your team number and press enter.

  4. Connect to Robot.

  5. Open Tuner X (if this is a newly flashed robot, you will want to run a temporary diagnostic server found in Settings/FRC Advanced).

  6. Follow the swerve setup guide under the Mechanisms tab.

  7. On the final screen in Tuner X, choose "Generate only TunerConstants" and overwrite the file at src/main/java/frc/robot/generated/TunerConstants.java.

  8. Inside of TunerConstants.java.

    • Replace the last import marked as an error with

      import frc.robot.subsystems.drive.DriveIOCTRE;
    • Replace the last method marked as an error with

      /** Creates a DriveIOCTRE instance.*/ public static DriveIOCTRE createDrivetrain() { return new DriveIOCTRE( DrivetrainConstants, FrontLeft, FrontRight, BackLeft, BackRight ); }

TalonFX Swerve Tuning

Congratulations! Your robot should be completely drivable! Next, follow the instructions on tuning your swerve drive.

Last modified: 01 January 2025