Skip to content

Commit 6b6526d

Browse files
end of night changes: sim starts, current limits, constraints,
1 parent 58b1191 commit 6b6526d

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

src/main/java/frc/robot/RobotContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private void configureOperatorControllerBindings(CommandXboxController xbox) {
464464

465465
new Trigger(DriverStation::isEnabled)
466466
.onTrue(
467-
Commands.runOnce(() -> coralWrist.setConstraints(3, 8))
467+
Commands.runOnce(() -> coralWrist.setConstraints(1, 3))
468468
.andThen(superstructure.runAction(Superstructure.State.STOW))
469469
.finallyDo(coralWrist::resetContraints));
470470

src/main/java/frc/robot/subsystems/superstructure/Superstructure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Command runPrepare(State goal) {
9999
}
100100

101101
public static final double L1_HEIGHT = 0.151148670108898;
102-
public static final Rotation2d L1_CORAL_ANGLE = Rotation2d.fromDegrees(70);
102+
public static final Rotation2d L1_CORAL_ANGLE = Rotation2d.fromDegrees(0);
103103

104104
public static final double L2_HEIGHT = 0.469491383230037 + Units.inchesToMeters(3);
105105
public static final Rotation2d L2_CORAL_ANGLE = Rotation2d.fromDegrees(-35);

src/main/java/frc/robot/subsystems/superstructure/elevator/ElevatorConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static record ElevatorConfig(int leaderCanId, int followerCanId, boolean
1616
default -> new ElevatorConfig(0, 1, false);
1717
};
1818

19-
public static final int currentLimit = 35;
19+
public static final int currentLimit = 40;
2020
public static final double gearReduction = 9.0;
2121

2222
public static final double elevatorHeight = 1.245 + Units.inchesToMeters(8.5);
@@ -31,7 +31,7 @@ public static record ElevatorConfig(int leaderCanId, int followerCanId, boolean
3131
public static final double maxCarriageVelocity = 3.0;
3232
public static final double maxCarriageAcceleration = 3.5;
3333

34-
public static final double carriagePositionTolerance = Units.inchesToMeters(2);
34+
public static final double carriagePositionTolerance = Units.inchesToMeters(1);
3535

3636
public static final PIDConstants pid =
3737
switch (Constants.getRobot()) {

src/main/java/frc/robot/subsystems/superstructure/wrist/WristConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class WristConstants {
1414
public static final double GEAR_REDUCTION = 20.0;
1515
public static final int MOTOR_CURRENT_LIMIT = 40;
1616

17-
public static final double TOLERANCE_DEGREES = 15;
17+
public static final double TOLERANCE_DEGREES = 5;
1818

1919
public static final double MIN_POSITION_DEGREES = Units.rotationsToDegrees(-0.4);
2020
public static final double MAX_POSITION_DEGREES = Units.rotationsToDegrees(+0.4);

src/main/java/frc/robot/subsystems/superstructure/wrist/WristIOHardware.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ public void runPosition(double setpointRad, double feedforwardVolts) {
9999
public void setPID(double kP, double kI, double kD) {
100100
SparkMaxConfig motorConfig = new SparkMaxConfig();
101101
motorConfig.closedLoop.pidf(kP, kI, kD, 0, ClosedLoopSlot.kSlot0);
102-
System.out.println(kP + " " + kI + " " + kD);
103-
SmartDashboard.putNumber("Kp", kP);
104-
SmartDashboard.putNumber("Ki", kI);
105-
SmartDashboard.putNumber("Kd", kD);
106102
motor.configure(motorConfig, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
107103
}
108104

src/main/java/frc/robot/subsystems/superstructure/wrist/WristIOSim.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public WristIOSim(WristConfig config) {
2727
Units.rotationsToRadians(-0.5),
2828
Units.rotationsToRadians(0.5),
2929
true,
30-
0);
30+
Units.degreesToRadians(-10));
3131
}
3232

3333
@Override

0 commit comments

Comments
 (0)