From fe702e5331fa4616f4b665e439f6497cb145ddfe Mon Sep 17 00:00:00 2001 From: TimB-87 Date: Sat, 18 Jan 2025 14:24:18 -0500 Subject: [PATCH] Fixed autobuilder error --- src/main/java/frc/robot/subsystems/Drive.java | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/Drive.java b/src/main/java/frc/robot/subsystems/Drive.java index 2ba2ffb..4a7c323 100644 --- a/src/main/java/frc/robot/subsystems/Drive.java +++ b/src/main/java/frc/robot/subsystems/Drive.java @@ -85,24 +85,6 @@ public Drive(SwerveDriveMap map, DoubleSupplier xSpeed, DoubleSupplier ySpeed, D () -> !isBlue, this); - // Auto Stuff!! - - AutoBuilder.configure( - () -> estimator.getEstimatedPosition(), // Robot pose supplier - this::setPose, // Method to reset odometry (will be called if your auto has a - // starting pose) - this::getSpeeds, // ChassisSpeeds supplier. MUST BE ROBOT RELATIVE - (speeds, feedforwards) -> move(speeds), // Method that will drive the robot given ROBOT RELATIVE - // ChassisSpeeds. Also optionally outputs individual module - // feedforwards - new PPHolonomicDriveController( - new PIDConstants(2, 0.0, 0.05), // Translation PID constants - new PIDConstants(1, 0.0, 0.0)), // Rotation PID constants) - getMap().config, // The robot configuration - () -> !isBlue, - this // Reference to this subsystem to set requirements - ); - rotationPID.enableContinuousInput(-180, 180); this.xSpeed = xSpeed; @@ -136,9 +118,9 @@ private void periodicMove(final double xSpeed, final double ySpeed, * maxDriveSpeedMetersPerSecond * speedCoef; double rotationSpeed = rotationInput * maxRotationRadiansPerSecond * rotationCoef; - if (aimAtSpeaker) { - rotationSpeed = calculateRotateSpeedToTarget(this::getSpeakerTarget); - } + // if (aimAtSpeaker) { + // rotationSpeed = calculateRotateSpeedToTarget(this::getSpeakerTarget); + // } move(translateXSpeed, translateYSpeed, rotationSpeed, isRobotCentric); }