Skip to content

Commit 8a20a9c

Browse files
changed lifter gear ratio and controller gains (#127)
* changed lifter gear ratio and controller gains * tuned p * spotless --------- Co-authored-by: nlaverdure <[email protected]>
1 parent e24da52 commit 8a20a9c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static final class LifterConstants {
2323

2424
// By default, the encoder in position mode measures rotations at the motor
2525
// Convert to inches at the final stage
26-
private static final double gearRatioMotorToMechanism = 3.0 / 15.0;
26+
private static final double gearRatioMotorToMechanism = 3.0 / 5.0;
2727
private static final Distance sprocketPitchDiameter = Inches.of(1.7567);
2828
public static final Distance kPositionConversionFactor =
2929
sprocketPitchDiameter.times(Math.PI).times(gearRatioMotorToMechanism);
@@ -46,11 +46,13 @@ public static final class LifterConstants {
4646
public static final Distance kAllowableHeightError = Inches.of(0.2);
4747

4848
public final class LifterController {
49-
public static final double kS = 0.13; // Found empirically 2/22/2025
50-
public static final double kG = 0.194; // Found empirically 2/22/2025
49+
// Found empirically 2/22/2025, then increased by 3x when 3:1 gearing was removed
50+
public static final double kS = 0.39;
51+
public static final double kG = 0.582;
52+
5153
public static final double kV = (12.0 - kS) / maxTheoreticalVelocity.in(MetersPerSecond);
5254

53-
public static final double kP = 40.0;
55+
public static final double kP = 10.0;
5456
public static final double kI = 0.0;
5557
public static final double kD = 0.0;
5658
public static final Constraints kConstraints =

0 commit comments

Comments
 (0)