Skip to content

Commit

Permalink
Climber API for moving climber between setpoint positions
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachOrr committed Mar 9, 2022
1 parent 0e90b45 commit a3de4f2
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 36 deletions.
9 changes: 8 additions & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static final class Auto {
public static final PolarCoordinate kBallR1RunOver = new PolarCoordinate(
Constants.Auto.kBallR1.getRadiusMeters() - Units.inchesToMeters(kRunOverDistanceInches),
Constants.Auto.kBallR1.getTheta()
);
);
//Shoot postition between ball R2 and ball D2
public static final PolarCoordinate kFourBallShootPosition = new PolarCoordinate(
Units.inchesToMeters(153),
Expand Down Expand Up @@ -355,6 +355,13 @@ public static final class Vision {
public static final double VISION_TARGET_OFFSET_FROM_HUB_CENTER_METERS = Units.feetToMeters(2);
}

public static enum ClimberSetpoint {
START,
RICKABOOT
// LOW_RUNG,
// MID_RUNG
}

public static final int CLIMBER_LEFT_MOTOR_ID = 16;
public static final int CLIMBER_RIGHT_MOTOR_ID = 3;
public static final int CLIMBER_STRING_POT_ID = 3; // DIO
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package frc.robot.commands.climber;

import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.Climber;

public class ClimberSetpointCommand extends CommandBase {

private static final double MAX_SPEED = 0.10;

private final Climber climber;
private final XboxController controller;

private boolean shouldHoldPositionWhenStopped = true;

public ClimberSetpointCommand(XboxController controller, Climber climber) {
this.climber = climber;
this.controller = controller;

addRequirements(climber);
}

}
Loading

0 comments on commit a3de4f2

Please sign in to comment.