import frc.robot.controls.BaseDriverConfig;
import frc.robot.controls.Operator;
import frc.robot.controls.PS5ControllerDriverConfig;
+import frc.robot.subsystems.Climb.LinearClimb;
import frc.robot.subsystems.drivetrain.Drivetrain;
import frc.robot.subsystems.drivetrain.GyroIOPigeon2;
import frc.robot.util.PathGroupLoader;
// Controllers are defined here
private BaseDriverConfig driver = null;
private Operator operator = null;
+ private LinearClimb linearClimb = null;
/**
* The container for the robot. Contains subsystems, OI devices, and commands.
// fall-through
case Vivace:
+ linearClimb = new LinearClimb();
+ break;
case Phil: // AKA "IHOP"
case PrimeJr:
case Vertigo: // AKA "French Toast"
- drive = new Drivetrain(vision, new GyroIOPigeon2());
- driver = new PS5ControllerDriverConfig(drive);
- operator = new Operator(drive);
+ // drive = new Drivetrain(vision, new GyroIOPigeon2());
+ // driver = new PS5ControllerDriverConfig(drive);
+ // operator = new Operator(drive);
// Detected objects need access to the drivetrain
- DetectedObject.setDrive(drive);
+ // DetectedObject.setDrive(drive);
// SignalLogger.start();
- driver.configureControls();
- operator.configureControls();
+ // driver.configureControls();
+ // operator.configureControls();
- initializeAutoBuilder();
- registerCommands();
- PathGroupLoader.loadPathGroups();
- // Load the auto command
- try {
- PathPlannerAuto.getPathGroupFromAutoFile("Command Name");
- auto = new PathPlannerAuto("Path Name");
- } catch (IOException | ParseException e) {
- e.printStackTrace();
- }
- drive.setDefaultCommand(new DefaultDriveCommand(drive, driver));
+ // initializeAutoBuilder();
+ // registerCommands();
+ // PathGroupLoader.loadPathGroups();
+ // // Load the auto command
+ // try {
+ // PathPlannerAuto.getPathGroupFromAutoFile("Command Name");
+ // auto = new PathPlannerAuto("Path Name");
+ // } catch (IOException | ParseException e) {
+ // e.printStackTrace();
+ // }
+ // drive.setDefaultCommand(new DefaultDriveCommand(drive, driver));
break;
}
public class ClimbConstants {
// CHANGE LATER
- public final static double CLIMB_GEAR_RATIO = 1 / 1;
+ public final static double CLIMB_GEAR_RATIO = 25 / 1;
public final static double MAX_VELOCITY = 0.1;
public final static double MAX_ACCELERATION = 1;
public final static double MIN_HEIGHT = 0;
- public final static double MAX_HEIGHT = 1;
- public final static double RADIUS = 1;
- public final static double CLIMB_HEIGHT = 0.5;
+ public final static double MAX_HEIGHT = 8;
+ public final static double RADIUS = 0.514098;
+ public final static double CLIMB_HEIGHT = 4;
}
private double rotationalSetpoint = 0;
- private double kP = 0.1;
+ private double kP = 0.5;
private double kI = 0.0;
private double kD = 0.0;
SmartDashboard.putData("Go Up", new InstantCommand(() -> goUp()));
SmartDashboard.putData("Go Down", new InstantCommand(() -> goDown()));
SmartDashboard.putData("Climb", new InstantCommand(() -> climb()));
+
+ motor.setPosition((ClimbConstants.MAX_HEIGHT/(2 * Math.PI * ClimbConstants.RADIUS)) * ClimbConstants.CLIMB_GEAR_RATIO);
}
public void setSetpoint(double setpoint) {