diff --git a/src/main/deploy/pathplanner/JMove2.path b/src/main/deploy/pathplanner/JMove2.path index 5bd47dc..8b9f54e 100644 --- a/src/main/deploy/pathplanner/JMove2.path +++ b/src/main/deploy/pathplanner/JMove2.path @@ -1 +1 @@ -{"waypoints":[{"anchorPoint":{"x":7.66,"y":0.7},"prevControl":null,"nextControl":{"x":7.465685817447585,"y":2.0602977914816596},"holonomicAngle":90.0,"isReversal":false,"velOverride":null,"isLocked":false},{"anchorPoint":{"x":10.6,"y":2.118171324950245},"prevControl":{"x":10.796770013793191,"y":3.8080785022329553},"nextControl":null,"holonomicAngle":90.0,"isReversal":false,"velOverride":null,"isLocked":false}]} \ No newline at end of file +{"waypoints":[{"anchorPoint":{"x":7.66,"y":0.7},"prevControl":null,"nextControl":{"x":7.708937737734877,"y":2.3864441401993526},"holonomicAngle":90.0,"isReversal":false,"velOverride":null,"isLocked":false},{"anchorPoint":{"x":11.0,"y":2.118171324950245},"prevControl":{"x":11.180129214388481,"y":3.8472372199577447},"nextControl":null,"holonomicAngle":90.0,"isReversal":false,"velOverride":null,"isLocked":false}]} \ No newline at end of file diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 8079e75..95d4ee2 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -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