Skip to content

Commit

Permalink
Updated TunerConstants file
Browse files Browse the repository at this point in the history
	modified:   src/main/java/frc/robot/generated/TunerConstants.java
  • Loading branch information
tbowers7 committed Dec 1, 2024
1 parent 06e27c8 commit de90c22
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/main/java/frc/robot/generated/TunerConstants.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.ctre.phoenix6.mechanisms.swerve.SwerveModuleConstantsFactory;
import edu.wpi.first.math.util.Units;

// import frc.robot.subsystems.swervedrive_ignore.SwerveSubsystem;
// import frc.robot.subsystems.CommandSwerveDrivetrain;

// Generated by the Tuner X Swerve Project Generator
// https://v6.docs.ctr-electronics.com/en/stable/docs/tuner/tuner-swerve/index.html
Expand All @@ -30,12 +30,10 @@ public class TunerConstants {

// The closed-loop output type to use for the steer motors;
// This affects the PID/FF gains for the steer motors
public static final ClosedLoopOutputType steerClosedLoopOutput =
ClosedLoopOutputType.TorqueCurrentFOC;
public static final ClosedLoopOutputType steerClosedLoopOutput = ClosedLoopOutputType.Voltage;
// The closed-loop output type to use for the drive motors;
// This affects the PID/FF gains for the drive motors
public static final ClosedLoopOutputType driveClosedLoopOutput =
ClosedLoopOutputType.TorqueCurrentFOC;
public static final ClosedLoopOutputType driveClosedLoopOutput = ClosedLoopOutputType.Voltage;

// The stator current at which the wheels start to slip;
// This needs to be tuned to your individual robot
Expand All @@ -59,13 +57,13 @@ public class TunerConstants {

// Theoretical free speed (m/s) at 12v applied output;
// This needs to be tuned to your individual robot
public static final double kSpeedAt12VoltsMps = 5.21;
public static final double kSpeedAt12VoltsMps = 4.73;

// Every 1 rotation of the azimuth results in kCoupleRatio drive motor turns;
// This may need to be tuned to your individual robot
public static final double kCoupleRatio = 3.5714285714285716;

public static final double kDriveGearRatio = 6.122448979591837;
public static final double kDriveGearRatio = 6.746031746031747;
public static final double kSteerGearRatio = 21.428571428571427;
public static final double kWheelRadiusInches = 2;

Expand Down Expand Up @@ -113,7 +111,7 @@ public class TunerConstants {
public static final int kFrontLeftDriveMotorId = 1;
public static final int kFrontLeftSteerMotorId = 2;
public static final int kFrontLeftEncoderId = 3;
public static final double kFrontLeftEncoderOffset = -0.303466796875;
public static final double kFrontLeftEncoderOffset = -0.4736328125;
public static final boolean kFrontLeftSteerInvert = true;

public static final double kFrontLeftXPosInches = 10.375;
Expand All @@ -123,7 +121,7 @@ public class TunerConstants {
public static final int kFrontRightDriveMotorId = 4;
public static final int kFrontRightSteerMotorId = 5;
public static final int kFrontRightEncoderId = 6;
public static final double kFrontRightEncoderOffset = -0.122802734375;
public static final double kFrontRightEncoderOffset = -0.1123046875;
public static final boolean kFrontRightSteerInvert = true;

public static final double kFrontRightXPosInches = 10.375;
Expand All @@ -133,7 +131,7 @@ public class TunerConstants {
public static final int kBackLeftDriveMotorId = 7;
public static final int kBackLeftSteerMotorId = 8;
public static final int kBackLeftEncoderId = 9;
public static final double kBackLeftEncoderOffset = 0.4814453125;
public static final double kBackLeftEncoderOffset = 0.4091796875;
public static final boolean kBackLeftSteerInvert = true;

public static final double kBackLeftXPosInches = -10.375;
Expand All @@ -143,7 +141,7 @@ public class TunerConstants {
public static final int kBackRightDriveMotorId = 10;
public static final int kBackRightSteerMotorId = 11;
public static final int kBackRightEncoderId = 12;
public static final double kBackRightEncoderOffset = 0.300537109375;
public static final double kBackRightEncoderOffset = 0.08544921875;
public static final boolean kBackRightSteerInvert = true;

public static final double kBackRightXPosInches = -10.375;
Expand Down Expand Up @@ -190,6 +188,7 @@ public class TunerConstants {
kInvertRightSide)
.withSteerMotorInverted(kBackRightSteerInvert);

// public static final SwerveSubsystem DriveTrain =
// new SwerveSubsystem(DrivetrainConstants, FrontLeft, FrontRight, BackLeft, BackRight);
// public static final CommandSwerveDrivetrain DriveTrain = new
// CommandSwerveDrivetrain(DrivetrainConstants, FrontLeft,
// FrontRight, BackLeft, BackRight);
}

0 comments on commit de90c22

Please sign in to comment.