keeps algae pulled when idle at setpoint

This commit is contained in:
Tylr-J42 2025-02-25 14:57:28 -05:00
parent 52e92574c4
commit 3cf33a049e
3 changed files with 9 additions and 7 deletions

View File

@ -148,7 +148,7 @@ public class RobotContainer {
); );
driver.leftTrigger().whileTrue( driver.leftTrigger().whileTrue(
manipulator.runUntilCollected(() -> 0.35).andThen(manipulator.retractCommand(() -> 0.35)) manipulator.runUntilCollected(() -> 0.35)
); );
driver.start().and(driver.back()).onTrue( driver.start().and(driver.back()).onTrue(
@ -217,13 +217,15 @@ public class RobotContainer {
operator.x().onTrue( operator.x().onTrue(
safeMoveManipulator(ElevatorConstants.kL2AlgaePosition, ManipulatorPivotConstants.kL2AlgaePosition) safeMoveManipulator(ElevatorConstants.kL2AlgaePosition, ManipulatorPivotConstants.kL2AlgaePosition)
);
).and(driver.rightTrigger().whileFalse(manipulator.runManipulator(() -> 0.5, false)));
operator.b().onTrue( operator.b().onTrue(
safeMoveManipulator(ElevatorConstants.kL3AlgaePosition, ManipulatorPivotConstants.kL3AlgaePosition) safeMoveManipulator(ElevatorConstants.kL3AlgaePosition, ManipulatorPivotConstants.kL3AlgaePosition)
); ).and(driver.rightTrigger().whileFalse(manipulator.runManipulator(() -> 0.5, false)));
operator.y().onTrue(moveWithAlgae(ElevatorConstants.kProcessorPosition, ManipulatorPivotConstants.kProcessorPosition)); operator.y().onTrue(moveWithAlgae(ElevatorConstants.kProcessorPosition, ManipulatorPivotConstants.kProcessorPosition))
.and(driver.rightTrigger().whileFalse(manipulator.runManipulator(() -> 0.5, false)));
} }

View File

@ -41,8 +41,8 @@ public class ElevatorConstants {
public static final double kCoralIntakePosition = 0; public static final double kCoralIntakePosition = 0;
public static final double kL1Position = 0; public static final double kL1Position = 0;
public static final double kL2Position = 8; public static final double kL2Position = 9;
public static final double kL3Position = 25.0; public static final double kL3Position = 23.0;
public static final double kL4Position = 50.5; public static final double kL4Position = 50.5;
public static final double kL4TransitionPosition = 40.0; public static final double kL4TransitionPosition = 40.0;
public static final double kL2AlgaePosition = 21.0; public static final double kL2AlgaePosition = 21.0;

View File

@ -23,7 +23,7 @@ public class ManipulatorPivotConstants {
public static final double kPositionalP = 4; public static final double kPositionalP = 4;
public static final double kPositionalI = 0; public static final double kPositionalI = 0;
public static final double kPositionalD = 0; public static final double kPositionalD = 0;
public static final double kPositionalTolerance = Units.degreesToRadians(3.0); public static final double kPositionalTolerance = Units.degreesToRadians(1.5);
public static final double kFeedForwardS = (0.3-0.19) / 2 * 0.8; //upper: 0.3 lower: 0.19 public static final double kFeedForwardS = (0.3-0.19) / 2 * 0.8; //upper: 0.3 lower: 0.19
public static final double kFeedForwardG = (0.3+0.19) / 2; // calculated value 0.41 public static final double kFeedForwardG = (0.3+0.19) / 2; // calculated value 0.41