Skip to content

Commit

Permalink
Harshini and viggo slide and arm pid pid actually sucks why are we do…
Browse files Browse the repository at this point in the history
…ing pid ahhhhhhhhh (#81)

* 11/21/24 - Harshini and Viggo

got kid shampoo constants working
got slide commands working but still needs work (change slide height when scoring on high baskets)(a "i got it" button...?)
got a slide max value
updated slide PID (just P value really)
yippee

* 11/21/24 - Harshini

changed a few drivebase constants :DDD

---------

Co-authored-by: FTC16750 <[email protected]>
  • Loading branch information
kevinfrei and TechnototesLaptop authored Nov 22, 2024
1 parent 770ce6d commit b99d120
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ public OperatorController(CommandGamepad g, Robot r) {
}

private void AssignNamedControllerButton() {
//openRetainer = gamepad.dpadUp;
//closeRetainer = gamepad.dpadUp;
eatRetainer = gamepad.dpadRight;
slurpIntake = gamepad.leftBumper;
spitIntake = gamepad.rightBumper;
// openRetainer = gamepad.dpadUp;
// closeRetainer = gamepad.dpadRight;
// slurpIntake = gamepad.leftBumper;
// spitIntake = gamepad.rightBumper;
//temp changing the button below from biteJaw to intake :DD
biteJaw = gamepad.ps_cross;
releaseJaw = gamepad.ps_triangle;
//dumpWrist = gamepad.ps_share;
//biteJaw = gamepad.ps_cross;
// releaseJaw = gamepad.ps_triangle;
///dumpWrist = gamepad.ps_share;
//scoopWrist = gamepad.ps_options;
slideMax = gamepad.ps_share;
slideMin = gamepad.ps_options;
Expand All @@ -74,7 +73,7 @@ private void AssignNamedControllerButton() {

public void BindControls() {
if (Setup.Connected.KIDSSHAMPOOSUBSYSTEM) {
bindKidShampooControls();
// bindKidShampooControls();
}
if (Setup.Connected.HANGSUBSYSTEM) {
bindHangControls();
Expand All @@ -85,7 +84,7 @@ public void BindControls() {
}
}

public void bindKidShampooControls() {
/*public void bindKidShampooControls() {
openRetainer.whenPressed(
Command.create(robot.kidShampooSubsystem::openRetainer, robot.kidShampooSubsystem)
);
Expand Down Expand Up @@ -118,7 +117,7 @@ public void bindKidShampooControls() {
Command.create(robot.kidShampooSubsystem::stopIntake, robot.kidShampooSubsystem)
);
}
}*/

public void bindArmControls() {
armIntake.whenPressed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class ArmSubsystem implements Subsystem, Loggable {
public static int ARM_VERTICAL = 3100;
public static int ARM_HORIZONTAL = 1000;
public static int INITIAL_POSITION = 150;
public static int INCREMENT_DECREMENT = 120;
public static int SLIDE_INC_DEC = 100;
public static int SLIDE_MAX_POS = 850;
public static int INCREMENT_DECREMENT = 230;
public static int SLIDE_INC_DEC = 250;
public static int SLIDE_MAX_POS = 1175;
public static int SLIDE_MIN_POS = -150;
public static int SLIDE_OFFSET = 2000;
public static double MIN_SLIDE_MOTOR_POWER = -0.3;
Expand All @@ -49,8 +49,8 @@ public class ArmSubsystem implements Subsystem, Loggable {

// as of now, we arent having a D
public static PIDCoefficients armPID = new PIDCoefficients(0.0007, 0.0, 0.000);
public static PIDCoefficients slidePID = new PIDCoefficients(0.001, 0.0, 0.000);

public static PIDCoefficients slidePID = new PIDCoefficients(0.0018, 0.0, 0.000);
//slide PID last updated 11/21/24 :DDD
@Log(name = "armPow")
public double armPow;

Expand Down Expand Up @@ -177,14 +177,14 @@ public ArmSubsystem() {
}

public void increment() {
setArmPos(getArmCurrentPos() + INCREMENT_DECREMENT);
setArmPos(armTargetPos+ INCREMENT_DECREMENT);
if (armTargetPos > 3100) {
setArmPos(3100);
}
}

public void decrement() {
setArmPos(getArmCurrentPos() - INCREMENT_DECREMENT);
setArmPos(armTargetPos - INCREMENT_DECREMENT);
if (armTargetPos < 0) {
setArmPos(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ public abstract static class DriveConstants implements MecanumConstants {
);

@WheelRadius
public static double WHEEL_RADIUS = 1.88976; // in
public static double WHEEL_RADIUS = 1.875; // in

@GearRatio
public static double GEAR_RATIO = 1.0; // 2021: / 19.2; // output (wheel) speed / input (motor) speed

@TrackWidth
public static double TRACK_WIDTH = 15.5; // 2021: 10; // in (side to side)
public static double TRACK_WIDTH = 15; // 2021: 10; // in (side to side)

@WheelBase
public static double WHEEL_BASE = 14.5; // in (front to back)
public static double WHEEL_BASE = 14; // in (front to back)

@KV
public static double kV =
Expand Down

0 comments on commit b99d120

Please sign in to comment.