mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 08:38:02 -06:00
sum changes
This commit is contained in:
@@ -135,34 +135,34 @@ public class RobotContainer {
|
|||||||
private SequentialCommandGroup placeCubeHigh =
|
private SequentialCommandGroup placeCubeHigh =
|
||||||
new SequentialCommandGroup(
|
new SequentialCommandGroup(
|
||||||
new PivotCommand(m_robotArm, 60 + 135),
|
new PivotCommand(m_robotArm, 60 + 135),
|
||||||
new InstantCommand(() -> m_robotArm.setRotVel(0)),
|
new WaitCommand(0.3),
|
||||||
new TeleCommand(m_robotArm, 90000),
|
new TeleCommand(m_robotArm, 90000)
|
||||||
toggleClaw.asProxy(),
|
// toggleClaw.asProxy(),
|
||||||
armToHome.asProxy()
|
// armToHome.asProxy()
|
||||||
);
|
);
|
||||||
|
|
||||||
private SequentialCommandGroup placeCubeMid = new SequentialCommandGroup(
|
private SequentialCommandGroup placeCubeMid = new SequentialCommandGroup(
|
||||||
new PivotCommand(m_robotArm, 55 + 135),
|
new PivotCommand(m_robotArm, 55 + 135),
|
||||||
new InstantCommand(() -> m_robotArm.setRotVel(0)),
|
new WaitCommand(0.3),
|
||||||
new TeleCommand(m_robotArm, 28000),
|
new TeleCommand(m_robotArm, 28000)
|
||||||
toggleClaw.asProxy(),
|
// toggleClaw.asProxy(),
|
||||||
armToHome.asProxy()
|
// armToHome.asProxy()
|
||||||
);
|
);
|
||||||
|
|
||||||
private SequentialCommandGroup placeCubeLow = new SequentialCommandGroup(
|
private SequentialCommandGroup placeCubeLow = new SequentialCommandGroup(
|
||||||
new TimedCommand(() -> new RunCommand(() -> m_robotSwerveDrive.driveWithInput(new Translation2d(0.0, -0.2), new Translation2d(0.0, 0.0), true), m_robotSwerveDrive), 0.7),
|
new TimedCommand(() -> new RunCommand(() -> m_robotSwerveDrive.driveWithInput(new Translation2d(0.0, -0.2), new Translation2d(0.0, 0.0), true), m_robotSwerveDrive), 0.7),
|
||||||
new PivotCommand(m_robotArm, 70 + 135),
|
new PivotCommand(m_robotArm, 70 + 135),
|
||||||
new InstantCommand(() -> m_robotArm.setRotVel(0)),
|
new WaitCommand(0.3),
|
||||||
new TeleCommand(m_robotArm, 28000),
|
new TeleCommand(m_robotArm, 28000)
|
||||||
toggleClaw.asProxy(),
|
// toggleClaw.asProxy(),
|
||||||
armToHome.asProxy()
|
// armToHome.asProxy()
|
||||||
);
|
);
|
||||||
|
|
||||||
private SequentialCommandGroup placeConeHigh = new SequentialCommandGroup(
|
private SequentialCommandGroup placeConeHigh = new SequentialCommandGroup(
|
||||||
new PivotCommand(m_robotArm, 178),
|
new PivotCommand(m_robotArm, 178),
|
||||||
new WaitCommand(0.3),
|
new WaitCommand(0.3),
|
||||||
new TeleCommand(m_robotArm, 56000),
|
new TeleCommand(m_robotArm, 56000)
|
||||||
new ParallelRaceGroup(new InstantCommand(() -> m_robotClaw.toggle()), new RunCommand(() -> m_robotClaw.outtake()))
|
// new ParallelRaceGroup(new InstantCommand(() -> m_robotClaw.toggle()), new RunCommand(() -> m_robotClaw.outtake()))
|
||||||
// toggleClaw.asProxy(),
|
// toggleClaw.asProxy(),
|
||||||
// armToHome.asProxy()
|
// armToHome.asProxy()
|
||||||
);
|
);
|
||||||
@@ -304,10 +304,10 @@ public class RobotContainer {
|
|||||||
.onFalse(interruptCommand.asProxy());
|
.onFalse(interruptCommand.asProxy());
|
||||||
|
|
||||||
// toggle claw
|
// toggle claw
|
||||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON) // final
|
|
||||||
.onTrue(toggleClaw.asProxy());
|
|
||||||
// new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON) // final
|
// new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON) // final
|
||||||
// .onTrue(new InstantCommand(() -> m_robotClaw.setAngle(45), m_robotClaw));
|
// .onTrue(toggleClaw.asProxy());
|
||||||
|
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON) // final
|
||||||
|
.onTrue(new InstantCommand(() -> m_robotClaw.setAngle(45), m_robotClaw));
|
||||||
|
|
||||||
// kill soft limits
|
// kill soft limits
|
||||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON) // final
|
new JoystickButton(getDeadbandedOperatorController(), XboxController.Y_BUTTON) // final
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ public class AprilRotAlign extends PelvicInflammatoryDisease {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getError() {
|
public double getError() {
|
||||||
System.out.println("Pipeline: " + lime.getCamera().getPipelineIndex());
|
// System.out.println("Pipeline: " + lime.getCamera().getPipelineIndex());
|
||||||
double err = 0.0;
|
double err = 0.0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
err = lime.getAprilSkew();
|
err = lime.getAprilSkew();
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
System.out.println("CANT SEE APRIL POINT");
|
// System.out.println("CANT SEE APRIL POINT");
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ public class Arm extends SubsystemBase {
|
|||||||
tele_reset = true;
|
tele_reset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SmartDashboard.putNumber("Pivot CANCoder", getArmRotation());
|
// SmartDashboard.putNumber("Pivot CANCoder", getArmRotation());
|
||||||
SmartDashboard.putNumber("Tele Encoder", getArmLength());
|
// SmartDashboard.putNumber("Tele Encoder", getArmLength());
|
||||||
|
|
||||||
// double x = Math.cos(Math.toRadians(degrees));
|
// double x = Math.cos(Math.toRadians(degrees));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user