Finished 10 ball auto basically, still needs testing tho

This commit is contained in:
Aarav Shah
2020-03-06 17:28:22 -07:00
parent 5d2b594459
commit b3558887cc
3 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ import frc4388.utility.LEDPatterns;
* constants are needed, to reduce verbosity.
*/
public final class Constants {
public static final int SELECTED_AUTO = 1;
public static final int SELECTED_AUTO = 0;
public static final class DriveConstants {
/* Drive Train IDs */
@@ -29,6 +29,7 @@ import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import frc4388.robot.Constants.*;
import frc4388.robot.commands.AutoPath2FromRight;
import frc4388.robot.commands.CalibrateShooter;
import frc4388.robot.commands.DrivePositionMPAux;
import frc4388.robot.commands.DriveStraightAtVelocityPID;
@@ -228,6 +229,7 @@ public class RobotContainer {
RamseteCommand ramseteCommand = getRamseteCommand(trajectory);
// Run path following command, then stop at the end.
//return ramseteCommand.andThen(() -> m_robotDrive.tankDriveVelocity(0, 0));
//return new AutoPath1FromCenter(m_robotDrive, m_robotPneumatics);
//return new AutoPath2FromRight(m_robotDrive, m_robotPneumatics);
@@ -240,7 +242,6 @@ public class RobotContainer {
}
return new InstantCommand();
// return new DrivePositionMPAux(m_robotDrive, 500.0, 12.0, 2, 60.0, 0.0);
}
TrajectoryConfig getTrajectoryConfig() {
return new TrajectoryConfig(
@@ -36,10 +36,17 @@ public class AutoPath2FromRight extends SequentialCommandGroup {
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
//Shoot 5 Balls
new GotoCoordinates(m_drive, m_pneumatics, 0, 28),
//Start Intake Ball 1 (second round)
//Start Intake Ball 6 (Ball 1 second round)
new GotoCoordinates(m_drive, m_pneumatics, 0, 8),
//Start Moving to 4th Ball
new GotoCoordinates(m_drive, m_pneumatics, 60, -50),
//Move to 7th Ball
new GotoCoordinates(m_drive, m_pneumatics, 86.7, -64.11, -180),
//Move to 8th Ball
new GotoCoordinates(m_drive, m_pneumatics, -6.34, 15.31, 90),
//Move to 9th Ball
new GotoCoordinates(m_drive, m_pneumatics, 7.11, 24.41, 0),
//Move to 10th Ball
new GotoCoordinates(m_drive, m_pneumatics, -6.34, 13.30),
//Shoot 5 more Balls (Total 10 Ball Autonomous Path)
new Wait(m_drive, 0, 2)
);
}