mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
speed up 3 ball auto
This commit is contained in:
@@ -496,14 +496,14 @@ public class RobotContainer {
|
||||
SequentialCommandGroup extendThenAimTurret() {
|
||||
return new SequentialCommandGroup(
|
||||
new ExtenderIntakeGroup(m_robotIntake, m_robotExtender),
|
||||
new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID(-180), m_robotTurret), 1.0, true) // TODO: optimize time
|
||||
new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID((180.0 / Math.PI) * Math.atan2(-(82.83 / 2.00) + 15.56, -(219.25 / 2.00) - 40.44 + 10.00)), m_robotTurret), 0.5, true) // TODO: optimize time
|
||||
);
|
||||
}
|
||||
|
||||
ParallelDeadlineGroup idleDrumUntilShootingFirstBall() {
|
||||
return new ParallelDeadlineGroup(
|
||||
extendThenAimTurret(),
|
||||
new RunCommand(() -> m_robotBoomBoom.runDrumShooterVelocityPID(8000), m_robotBoomBoom)
|
||||
new RunCommand(() -> m_robotBoomBoom.runDrumShooterVelocityPID(9000), m_robotBoomBoom)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ public class RobotContainer {
|
||||
// ParallelCommandGroup intakeWithPath2AndTrackTarget = new ParallelCommandGroup(intakeWithPath2, weirdAutoShootingGroup3);
|
||||
|
||||
ParallelDeadlineGroup intakeWithPath2AndIdleShooterAndAimTurret = new ParallelDeadlineGroup(
|
||||
intakeWithPath2(4.2),
|
||||
intakeWithPath2(2.8),
|
||||
new RunCommand(() -> m_robotBoomBoom.runDrumShooterVelocityPID(8000), m_robotBoomBoom),
|
||||
new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID(-120), m_robotTurret), 0.7, true)
|
||||
);
|
||||
@@ -560,10 +560,11 @@ public class RobotContainer {
|
||||
// ! THREE BALL AUTO (ASSUMES ROBOT IS FACING DIRECTLY TOWARDS THE FIRST BALL OUTSIDE THE TARMAC, BUMPERS FLUSH WITH THE EDGE)
|
||||
SequentialCommandGroup threeBallAuto = new SequentialCommandGroup(
|
||||
idleDrumUntilShootingFirstBall(),
|
||||
shoot(1.0), // TODO: optimize time
|
||||
shoot(0.8), // TODO: optimize time
|
||||
brakeStorage(0.1),
|
||||
intakeWithPath1(3.0), // * this line and the one underneath it can be replaced with intakeWithPathAndTrackTarget
|
||||
shoot(2.3), // TODO: optimize time
|
||||
intakeWithPathAndTrackTarget,
|
||||
// intakeWithPath1(3.0), // * this line and the one underneath it can be replaced with intakeWithPathAndTrackTarget
|
||||
shoot(0.8), // TODO: optimize time
|
||||
brakeStorage(0.1),
|
||||
intakeWithPath2AndIdleShooterAndAimTurret,
|
||||
shoot(4.0), // TODO: optimize time
|
||||
|
||||
Reference in New Issue
Block a user