adjusted drum PIDs

Using a P loop with a feedforward value. Works well even when rapid shooting.

TODO
Recollect CSV data values

Co-Authored-By: Nirvan Bhalala <78400306+nbhalala27@users.noreply.github.com>
This commit is contained in:
Aarav Shah
2021-03-05 12:24:11 -07:00
parent c274989aac
commit 2f2a01e95d
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ public final class Constants {
public static final int SHOOTER_SLOT_IDX = 0;
public static final int SHOOTER_PID_LOOP_IDX = 1;
public static final int SHOOTER_TIMEOUT_MS = 30;
public static final Gains DRUM_SHOOTER_GAINS = new Gains(1.5, 0.0, 100, 0.055, 0, 1.0);
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.34, 0.0, 0.0, 0.055, 0, 1.0); //Ff was 0.055
//public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.55, 0.0, 100, 0.0, 0, 1.0);
public static final Gains SHOOTER_TURRET_GAINS = new Gains(0.6, 0.0, 0.0, 0.0, 0, 1.0);
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 0.3);
@@ -238,12 +238,12 @@ public class RobotContainer {
new JoystickButton(getOperatorJoystick(), XboxController.X_BUTTON)
//.whileHeld(new RunCommand(() -> m_robotIntake.runExtender(0.5)))
//.whenReleased(new InstantCommand(() -> m_robotIntake.runExtender(0)));
.whileHeld(new RunCommand(() -> m_robotShooterHood.runHood(0.5), m_robotShooterHood));
.whileHeld(new RunCommand(() -> m_robotShooterHood.runHood(0.2), m_robotShooterHood));
new JoystickButton(getOperatorJoystick(), XboxController.Y_BUTTON)
//.whileHeld(new RunCommand(() -> m_robotIntake.runExtender(-0.5)))
//.whenReleased(new InstantCommand(() -> m_robotIntake.runExtender(0)));
.whileHeld(new RunCommand(() -> m_robotShooterHood.runHood(-0.5), m_robotShooterHood));
.whileHeld(new RunCommand(() -> m_robotShooterHood.runHood(-0.2), m_robotShooterHood));
// safety for climber and leveler
new JoystickButton(getOperatorJoystick(), XboxController.BACK_BUTTON)
@@ -257,7 +257,7 @@ public class RobotContainer {
//.whenPressed(new StoragePrep(m_robotStorage))
//.whenReleased(new InterruptSubystem(m_robotStorage))
.whenReleased(new InstantCommand(() -> m_robotLime.limeOff()));
//.whileHeld(new RunCommand(() -> m_robotShooter.runDrumShooterVelocityPID(13000)));
//.whileHeld(new RunCommand(() -> m_robotShooter.runDrumShooterVelocityPID(11000)));
//.whileHeld(new HoldTarget(m_robotShooter, m_robotShooterAim))
//.whileHeld(new RunCommand(() -> m_robotShooter.runAngleAdjustPID(30)));
@@ -61,7 +61,7 @@ public class CalibrateShooter extends CommandBase {
@Override
public boolean isFinished() {
if (m_shooterAim.m_shooterRotateMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen).get() &&
m_shooterHood.m_angleAdjustMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen).get()) {
m_shooterHood.m_hoodDownLimit.get()) {
return true;
}
return false;