All low gear PIDs WORKY, test auto command WORKY

This commit is contained in:
Aarav Shah
2020-02-28 17:38:15 -07:00
parent 08b8797152
commit c572182678
6 changed files with 26 additions and 24 deletions
+18 -16
View File
@@ -30,6 +30,8 @@ import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import frc4388.robot.Constants.*;
import frc4388.robot.commands.DrivePositionMPAux;
import frc4388.robot.commands.DriveStraightAtVelocityPID;
import frc4388.robot.commands.DriveStraightToPositionMM;
import frc4388.robot.commands.DriveStraightToPositionPID;
import frc4388.robot.commands.DriveWithJoystick;
import frc4388.robot.commands.RunClimberWithTriggers;
import frc4388.robot.commands.RunExtenderOutIn;
@@ -114,19 +116,19 @@ public class RobotContainer {
/* Test Buttons */
// A driver test button
new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON)
.whenPressed(new TurnDegrees(90, m_robotDrive));
.whenPressed(new DriveStraightToPositionMM(m_robotDrive, -192));
// B driver test button
new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON)
.whenPressed(new DriveStraightAtVelocityPID(m_robotDrive, 6000));
.whileHeld(new DriveStraightAtVelocityPID(m_robotDrive, 6000));
// Y driver test button
new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON)
.whenPressed(new InstantCommand());
.whenPressed(new DrivePositionMPAux(m_robotDrive, 12.0, 3.0, 1, 36.0));
// X driver test button
new JoystickButton(getDriverJoystick(), XboxController.X_BUTTON)
.whenPressed(new InstantCommand());
.whenPressed(new DriveStraightToPositionPID(m_robotDrive, 36));
/* Driver Buttons */
// sets solenoids into high gear
@@ -192,25 +194,25 @@ public class RobotContainer {
return new SequentialCommandGroup(new Wait(2, m_robotDrive),
//add aim command
//add shooter command
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 120.0),
new ParallelCommandGroup(
new DriveStraightToPositionMM(m_robotDrive, 48.0),
/*new ParallelCommandGroup(
new StorageIntakeGroup(m_robotIntake, m_robotStorage),
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 36.0)),
new DriveStraightToPositionMM(m_robotDrive, 36.0)),
new ParallelCommandGroup(
new StorageIntakeGroup(m_robotIntake, m_robotStorage),
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 36.0)),
new StorageIntakeGroup(m_robotIntake, m_robotStorage),
new DriveStraightToPositionMM(m_robotDrive, 36.0)),
new StorageIntakeGroup(m_robotIntake, m_robotStorage),*/
//add aim command
//add shooter command
//Below this would be the picking up additional balls outside of those in the trench directly behind us
new TurnDegrees(-150, m_robotDrive),
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 96.0),
new StorageIntakeGroup(m_robotIntake, m_robotStorage),
new TurnDegrees(75, m_robotDrive),
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 18.0),
new TurnDegrees(-45, m_robotDrive),
new DrivePositionMPAux(m_robotDrive, 12.0, 10.0, 3, 6.0));
new TurnDegrees(m_robotDrive, -90),
new DriveStraightToPositionMM(m_robotDrive, 96.0));//,
//new StorageIntakeGroup(m_robotIntake, m_robotStorage),
//new TurnDegrees(m_robotDrive, 75),
//new DriveStraightToPositionMM(m_robotDrive, 18.0),
//new TurnDegrees(m_robotDrive, -45),
//new DriveStraightToPositionMM(m_robotDrive, 12.0));
}
TrajectoryConfig getTrajectoryConfig() {
return new TrajectoryConfig(