From 04cb45c714068eec94b1ca74fa5e8a3a157186a9 Mon Sep 17 00:00:00 2001 From: Dan Josh <95506168+ddjoshua01@users.noreply.github.com> Date: Sat, 27 Jan 2024 10:11:24 -0700 Subject: [PATCH] Swerve Fixes Swerve Things --- src/main/java/frc/robot/RobotContainer.java | 6 +++--- src/main/java/frc/robot/constants/DrivetrainConstants.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 2985c80..b06c873 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -36,9 +36,9 @@ public void configureButtonBindings(){ swerveSubsystem.setDefaultCommand(new DriveCommands( swerveSubsystem, - () -> primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar / 4.0, - () -> primaryController.getLeftX() * DrivetrainConstants.drivingSpeedScalar / 4.0, - () -> primaryController.getRightX() * DrivetrainConstants.rotationSpeedScalar / 4.0, + () -> primaryController.getLeftY() * DrivetrainConstants.drivingSpeedScalar / 1.0, + () -> primaryController.getLeftX() * DrivetrainConstants.drivingSpeedScalar / 1.0, + () -> primaryController.getRightX() * DrivetrainConstants.rotationSpeedScalar / 1.0, true, true )); diff --git a/src/main/java/frc/robot/constants/DrivetrainConstants.java b/src/main/java/frc/robot/constants/DrivetrainConstants.java index a738b1f..50bc322 100644 --- a/src/main/java/frc/robot/constants/DrivetrainConstants.java +++ b/src/main/java/frc/robot/constants/DrivetrainConstants.java @@ -17,7 +17,7 @@ public class DrivetrainConstants { public static final double drivingSpeedScalar = -1.0; public static final double rotationSpeedScalar = 2.0; - public static final double trackWidth = Units.inchesToMeters(22); + public static final double trackWidth = Units.inchesToMeters(18); public static final double wheelBase = Units.inchesToMeters(22.5); public static final SwerveDriveKinematics driveKinematics = new SwerveDriveKinematics( @@ -29,8 +29,8 @@ public class DrivetrainConstants { public static final double frontLeftChassisAngularOffset = -0.57 + Math.PI; public static final double frontRightChassisAngularOffset = 0.874 + Math.PI; - public static final double rearLeftChassisAngularOffset = 6.089; - public static final double rearRightChassisAngularOffset = 2.428 + Math.PI/2; + public static final double rearLeftChassisAngularOffset = 6.098; + public static final double rearRightChassisAngularOffset = 5.52 - Math.PI/2; public static final int frontLeftDrivingPort = 1; public static final int rearLeftDrivingPort = 5;