From 58a07ae8a63027292060821a9f54b999a480943a Mon Sep 17 00:00:00 2001 From: aarav18 Date: Tue, 7 Feb 2023 17:53:32 -0700 Subject: [PATCH] fixed gear ratios --- src/main/java/frc4388/robot/Constants.java | 10 +++++----- .../java/frc4388/robot/subsystems/SwerveDrive.java | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc4388/robot/Constants.java b/src/main/java/frc4388/robot/Constants.java index 1b94ed1..efe227b 100644 --- a/src/main/java/frc4388/robot/Constants.java +++ b/src/main/java/frc4388/robot/Constants.java @@ -67,11 +67,11 @@ public final class Constants { public static final double JOYSTICK_TO_METERS_PER_SECOND_FAST = 11.0; // TODO: find the actual value public static final double JOYSTICK_TO_METERS_PER_SECOND_SLOW = 1.0; // TODO: find the actual value - public static final double MOTOR_REV_PER_WHEEL_REV = 6.12; // TODO: find the actual value - public static final double MOTOR_REV_PER_STEER_REV = 12.8; // TODO: find the actual value + public static final double MOTOR_REV_PER_WHEEL_REV = 5.12; + public static final double MOTOR_REV_PER_STEER_REV = 12.8; public static final double TICKS_PER_MOTOR_REV = 2048; - public static final double WHEEL_DIAMETER_INCHES = 4.0; // TODO: the actual value + public static final double WHEEL_DIAMETER_INCHES = 3.9; public static final double INCHES_PER_WHEEL_REV = WHEEL_DIAMETER_INCHES * Math.PI; public static final double WHEEL_REV_PER_MOTOR_REV = 1 / MOTOR_REV_PER_WHEEL_REV; @@ -108,8 +108,8 @@ public final class Constants { public static final double MAX_SPEED_FEET_PER_SECOND = 5; // TODO: find the actual value // dimensions - public static final double WIDTH = 18.5; // TODO: find the actual value - public static final double HEIGHT = 18.5; // TODO: find the actual value + public static final double WIDTH = 18.5; + public static final double HEIGHT = 18.5; public static final double HALF_WIDTH = WIDTH / 2.d; public static final double HALF_HEIGHT = HEIGHT / 2.d; diff --git a/src/main/java/frc4388/robot/subsystems/SwerveDrive.java b/src/main/java/frc4388/robot/subsystems/SwerveDrive.java index a15f6ef..a8a3c9f 100644 --- a/src/main/java/frc4388/robot/subsystems/SwerveDrive.java +++ b/src/main/java/frc4388/robot/subsystems/SwerveDrive.java @@ -176,6 +176,7 @@ public class SwerveDrive extends SubsystemBase { SmartDashboard.putNumber("Odo X (ft)", Units.metersToFeet(this.getOdometry().getX())); SmartDashboard.putNumber("Odo Y (ft)", Units.metersToFeet(this.getOdometry().getY())); SmartDashboard.putNumber("Odo Theta", this.getOdometry().getRotation().getDegrees()); + SmartDashboard.putNumber("Gyro Angle", getGyroAngle()); } /**