From c6adc0fa418d3c7fc95a58e1c6b5eb57c3a4b42d Mon Sep 17 00:00:00 2001 From: CXLYSG <115902987+CXLYSG@users.noreply.github.com> Date: Sat, 24 Aug 2024 16:46:30 -0700 Subject: [PATCH] Amp Shooter Pivot Position Tuning --- Robot2024/src/main/java/com/team2813/AutoCommands.java | 2 +- .../main/java/com/team2813/subsystems/ShooterPivot.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Robot2024/src/main/java/com/team2813/AutoCommands.java b/Robot2024/src/main/java/com/team2813/AutoCommands.java index dcc0606..b1c24dc 100644 --- a/Robot2024/src/main/java/com/team2813/AutoCommands.java +++ b/Robot2024/src/main/java/com/team2813/AutoCommands.java @@ -116,7 +116,7 @@ public Command shootSide() { private volatile Command shootAmp = null; private Command createShootAmp() { - return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.AMP, 20); + return new ShootFromPosCommand(magazine, shooter, shooterPivot, Position.AMP, 17.5); } public Command shootAmp() { diff --git a/Robot2024/src/main/java/com/team2813/subsystems/ShooterPivot.java b/Robot2024/src/main/java/com/team2813/subsystems/ShooterPivot.java index a990f3c..e02d0fc 100644 --- a/Robot2024/src/main/java/com/team2813/subsystems/ShooterPivot.java +++ b/Robot2024/src/main/java/com/team2813/subsystems/ShooterPivot.java @@ -20,7 +20,7 @@ public class ShooterPivot extends MotorSubsystem { public ShooterPivot() { super(new MotorSubsystemConfiguration( - pivotMotor()).acceptableError(0.004) + pivotMotor()).acceptableError(0.002) .PID(3.4, 0, 0).startingPosition(Position.TOP_HARD_STOP)); SmartDashboard.putData("Shooter Pivot PID", m_controller); } @@ -50,9 +50,6 @@ private static PIDMotor pivotMotor() { @Override protected void useOutput(double output, double setpoint) { - if (output < 0) { - output -= 0.15; - } super.useOutput(output, setpoint); } @@ -66,12 +63,12 @@ public static enum Position implements MotorSubsystem.Position { TOP_HARD_STOP(0), SUBWOOFER_FRONT(0.023926), SUBWOOFER_SIDE(0.023926), - AMP(0.022217), + AMP(0.0307), PODIUM(0.076660), TEST(0.067871), FAR_SPEAKER(0.088135), SOURCE_INTAKE(0.048096), - BOTTOM_HARD_STOP(0.099854); + BOTTOM_HARD_STOP(0.099854); //use Phoenix Tuner motor feedback position value private final double pos;