From c4b6ee9013dcd378db9f3bc22db8597e1604e4af Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sat, 30 Mar 2024 11:12:10 -0700 Subject: [PATCH 01/27] driverOI handlePre --- src/main/java/com/team766/robot/reva/DriverOI.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/team766/robot/reva/DriverOI.java b/src/main/java/com/team766/robot/reva/DriverOI.java index 0423d2287..ca8f52d32 100644 --- a/src/main/java/com/team766/robot/reva/DriverOI.java +++ b/src/main/java/com/team766/robot/reva/DriverOI.java @@ -76,6 +76,11 @@ protected void handlePre() { * ControlConstants.MAX_ROTATIONAL_VELOCITY; // For steer } + @Override + protected void handleOI(Context context) { + + } + @Override protected void handleOI(Context context) { From 29c2f92f4360782b0d9b2a4c48b67a0a7dd5059e Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sat, 30 Mar 2024 11:14:45 -0700 Subject: [PATCH 02/27] changed autons to old shootNow --- .../team766/robot/reva/procedures/ThreePieceAutonAmpSide.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java index 240995e55..874bbab0d 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java @@ -8,7 +8,6 @@ public class ThreePieceAutonAmpSide extends PathSequenceAuto { public ThreePieceAutonAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); - // addPath("3 Piece 1"); addProcedure(new ShootAtSubwoofer()); addProcedure(new AutoIntake()); addPath("3 Piece 1"); From 4508b32e68d20c0462556728e46a7ab536911c89 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sat, 30 Mar 2024 14:00:29 -0700 Subject: [PATCH 03/27] adjusted auton path --- .../team766/robot/common/procedures/PathSequenceAuto.java | 6 +++--- src/main/java/com/team766/robot/reva/AutonomousModes.java | 3 ++- .../java/com/team766/robot/reva/mechanisms/Shooter.java | 5 +++-- .../java/com/team766/robot/reva/mechanisms/Shoulder.java | 3 ++- .../robot/reva/procedures/ThreePieceAutonAmpSide.java | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java index ac3d336d7..055d4049a 100644 --- a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java +++ b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java @@ -103,7 +103,7 @@ public final void run(Context context) { return; } - context.startAsync(new MoveClimbersToBottom()); + // context.startAsync(new MoveClimbersToBottom()); context.takeOwnership(drive); // if (!visionSpeakerHelper.updateTarget(context)) { drive.setCurrentPosition( @@ -111,10 +111,10 @@ public final void run(Context context) { // } // context.takeOwnership(drive); drive.resetGyro( - (shouldFlipAuton + ((shouldFlipAuton ? GeometryUtil.flipFieldRotation(initialPosition.getRotation()) : initialPosition.getRotation()) - .getDegrees()); + .getDegrees())); for (RunnableWithContext pathItem : pathItems) { pathItem.run(context); context.yield(); diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index 4c21521e4..713490ca1 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -21,6 +21,7 @@ public class AutonomousModes { new AutonomousMode("ClimbersDown", () -> new MoveClimbersToBottom()), new AutonomousMode("ShootOnePiece", () -> new ShootOnePiece()), new AutonomousMode("AltThreePiece", () -> new ThreePieceAutonAmpSide()), - new AutonomousMode("ShootNow", () -> new RotateAndShootNow()) + new AutonomousMode("ShootNow", () -> new RotateAndShootNow()), + new AutonomousMode("DoNothing", () -> new RotateAndShootNow()) }; } diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index 9b91e3f9c..aa3dddb55 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -9,6 +9,7 @@ import com.team766.hal.MotorController.ControlMode; import com.team766.hal.RobotProvider; import com.team766.library.RateLimiter; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Shooter extends Mechanism { private static final double DEFAULT_SPEED = @@ -84,8 +85,8 @@ public void nudgeDown() { public void run() { if (speedUpdated || rateLimiter.next()) { // SmartDashboard.putNumber("[SHOOTER TARGET SPEED]", shouldRun ? targetSpeed : 0.0); - // SmartDashboard.putNumber("[SHOOTER TOP MOTOR SPEED]", getShooterSpeedTop()); - // SmartDashboard.putNumber("[SHOOTER BOTTOM MOTOR SPEED]", getShooterSpeedBottom()); + SmartDashboard.putNumber("[SHOOTER TOP MOTOR SPEED]", getShooterSpeedTop()); + SmartDashboard.putNumber("[SHOOTER BOTTOM MOTOR SPEED]", getShooterSpeedBottom()); // SmartDashboard.putNumber( // "[SHOOTER] Top Motor Current", MotorUtil.getCurrentUsage(shooterMotorTop)); // SmartDashboard.putNumber( diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java index b936558ae..10298f4a9 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java @@ -13,6 +13,7 @@ import com.team766.hal.RobotProvider; import com.team766.hal.wpilib.REVThroughBoreDutyCycleEncoder; import com.team766.library.ValueProvider; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Shoulder extends Mechanism { public enum ShoulderPosition { @@ -152,7 +153,7 @@ public void run() { leftMotor.setSensorPosition(convertedPos); encoderInitializationCount++; } - // SmartDashboard.putNumber("[SHOULDER] Angle", getAngle()); + SmartDashboard.putNumber("[SHOULDER] Angle", getAngle()); // SmartDashboard.putNumber("[SHOULDER] Target Angle", targetAngle); // SmartDashboard.putNumber("[SHOULDER] Rotations", getRotations()); // SmartDashboard.putNumber("[SHOULDER] Target Rotations", targetRotations); diff --git a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java index 874bbab0d..061b7d340 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java @@ -10,7 +10,7 @@ public ThreePieceAutonAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new AutoIntake()); - addPath("3 Piece 1"); + addPath("3 Piece 1 Stop 2"); addProcedure(new ShootNow()); addProcedure(new AutoIntake()); addPath("Alternate 3 Piece 2"); From 7583e9c4cb912beab60fbbfe8fd25e05a030781c Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sat, 30 Mar 2024 16:27:03 -0700 Subject: [PATCH 04/27] re-added DriverShootVelocityIntake in driverOI changed auton to shoot off of subwoofer for first shot --- src/main/java/com/team766/robot/reva/mechanisms/Intake.java | 3 ++- src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java | 2 +- .../team766/robot/reva/procedures/ThreePieceAutonAmpSide.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java index 26ad216f6..b1016b7a9 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java @@ -10,6 +10,7 @@ import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Intake extends Mechanism { @@ -98,7 +99,7 @@ public void nudgeDown() { public void run() { // SmartDashboard.putString("[INTAKE]", state.toString()); - // SmartDashboard.putNumber("[INTAKE POWER]", intakePower); + SmartDashboard.putNumber("[INTAKE POWER]", intakePower); // SmartDashboard.putNumber("[INTAKE] Current", MotorUtil.getCurrentUsage(intakeMotor)); // SmartDashboard.putNumber("Prox Sensor", sensor.getRange()); } diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java index 10298f4a9..13c0fbbc6 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java @@ -170,7 +170,7 @@ public void run() { // SmartDashboard.putNumber( // "[SHOULDER] Right Motor Stator Current", // MotorUtil.getStatorCurrentUsage(rightMotor)); - // SmartDashboard.putBoolean("Shoulder at angle", isFinished()); + SmartDashboard.putBoolean("Shoulder at angle", isFinished()); TalonFX leftTalon = (TalonFX) leftMotor; // SmartDashboard.putNumber("[SHOULDER] ffGain", ffGain.get()); diff --git a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java index 061b7d340..874bbab0d 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java @@ -10,7 +10,7 @@ public ThreePieceAutonAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new AutoIntake()); - addPath("3 Piece 1 Stop 2"); + addPath("3 Piece 1"); addProcedure(new ShootNow()); addProcedure(new AutoIntake()); addPath("Alternate 3 Piece 2"); From 69c68c44e9e67312ce3a5a72376bf1caab02cc5f Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:25:10 -0700 Subject: [PATCH 05/27] added timeout to auto intake and removed incorrect context ownership --- .../com/team766/robot/common/procedures/PathSequenceAuto.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java index 055d4049a..04ceca4cb 100644 --- a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java +++ b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java @@ -103,7 +103,7 @@ public final void run(Context context) { return; } - // context.startAsync(new MoveClimbersToBottom()); + context.startAsync(new MoveClimbersToBottom()); context.takeOwnership(drive); // if (!visionSpeakerHelper.updateTarget(context)) { drive.setCurrentPosition( From 5506a75a49412f51823070eee598a02b8f41ebc3 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:16:32 -0700 Subject: [PATCH 06/27] resets gyro to 180 degrees of current after auton is done --- .../com/team766/robot/common/procedures/PathSequenceAuto.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java index 04ceca4cb..ac3d336d7 100644 --- a/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java +++ b/src/main/java/com/team766/robot/common/procedures/PathSequenceAuto.java @@ -111,10 +111,10 @@ public final void run(Context context) { // } // context.takeOwnership(drive); drive.resetGyro( - ((shouldFlipAuton + (shouldFlipAuton ? GeometryUtil.flipFieldRotation(initialPosition.getRotation()) : initialPosition.getRotation()) - .getDegrees())); + .getDegrees()); for (RunnableWithContext pathItem : pathItems) { pathItem.run(context); context.yield(); From 115597d7f051bfe32fd97a6af0f477d4cbafabe9 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sun, 31 Mar 2024 18:50:26 -0700 Subject: [PATCH 07/27] stop shooter at the end of an auton and other context stuff --- src/main/java/com/team766/robot/reva/AutonomousModes.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index 713490ca1..4c21521e4 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -21,7 +21,6 @@ public class AutonomousModes { new AutonomousMode("ClimbersDown", () -> new MoveClimbersToBottom()), new AutonomousMode("ShootOnePiece", () -> new ShootOnePiece()), new AutonomousMode("AltThreePiece", () -> new ThreePieceAutonAmpSide()), - new AutonomousMode("ShootNow", () -> new RotateAndShootNow()), - new AutonomousMode("DoNothing", () -> new RotateAndShootNow()) + new AutonomousMode("ShootNow", () -> new RotateAndShootNow()) }; } From 716cfda84dae3bb977587532415f5f78d8cadd84 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Sun, 31 Mar 2024 20:58:03 -0700 Subject: [PATCH 08/27] Started making a more complete set of autons --- .pathplanner/settings.json | 5 +- ....path => Amp Side Start to Top Piece.path} | 30 +- ..._1.path => Bottom Piece to Top Piece.path} | 49 ++- ...om Start to Bottom Midfield and Back.path} | 74 ++--- ...path => Bottom Start to Bottom Piece.path} | 39 ++- .../pathplanner/paths/Example Path.path | 103 ------ ...th => Fast Top Piece to Middle Piece.path} | 34 +- .../pathplanner/paths/Intake_Path_2.path | 52 ---- .../pathplanner/paths/Intake_Path_3.path | 52 ---- .../pathplanner/paths/Intake_Path_4.path | 68 ---- src/main/deploy/pathplanner/paths/Luis.path | 292 ------------------ ...path => Middle Piece to Bottom Piece.path} | 48 +-- ... 3.path => Middle Piece to Top Piece.path} | 37 ++- ...path => Middle Start to Middle Piece.path} | 24 +- .../pathplanner/paths/MidfieldSource 1.path | 68 ---- .../pathplanner/paths/MidfieldSource 2.path | 65 ---- .../pathplanner/paths/RotationTest.path | 174 ----------- .../deploy/pathplanner/paths/TestPath1.path | 148 --------- ... 2.path => Top Piece to Bottom Piece.path} | 34 +- ... 2.path => Top Piece to Middle Piece.path} | 42 +-- .../team766/robot/reva/AutonomousModes.java | 14 +- .../reva/procedures/OldThreePieceAuton.java | 20 -- .../procedures/OneShotBackupSourceSide.java | 14 - .../robot/reva/procedures/ShootOnePiece.java | 13 - .../FourPieceAmpSide.java | 13 +- .../ThreePieceAmpSide.java} | 13 +- 26 files changed, 223 insertions(+), 1302 deletions(-) rename src/main/deploy/pathplanner/paths/{3 Piece 1.path => Amp Side Start to Top Piece.path} (60%) rename src/main/deploy/pathplanner/paths/{Intake_Path_1.path => Bottom Piece to Top Piece.path} (52%) rename src/main/deploy/pathplanner/paths/{Loop Test.path => Bottom Start to Bottom Midfield and Back.path} (52%) rename src/main/deploy/pathplanner/paths/{3 Piece 2.path => Bottom Start to Bottom Piece.path} (51%) delete mode 100644 src/main/deploy/pathplanner/paths/Example Path.path rename src/main/deploy/pathplanner/paths/{3 Piece 1 Stop 1.path => Fast Top Piece to Middle Piece.path} (54%) delete mode 100644 src/main/deploy/pathplanner/paths/Intake_Path_2.path delete mode 100644 src/main/deploy/pathplanner/paths/Intake_Path_3.path delete mode 100644 src/main/deploy/pathplanner/paths/Intake_Path_4.path delete mode 100644 src/main/deploy/pathplanner/paths/Luis.path rename src/main/deploy/pathplanner/paths/{4 Piece 3.path => Middle Piece to Bottom Piece.path} (51%) rename src/main/deploy/pathplanner/paths/{3 Piece 3.path => Middle Piece to Top Piece.path} (53%) rename src/main/deploy/pathplanner/paths/{BackupSource.path => Middle Start to Middle Piece.path} (65%) delete mode 100644 src/main/deploy/pathplanner/paths/MidfieldSource 1.path delete mode 100644 src/main/deploy/pathplanner/paths/MidfieldSource 2.path delete mode 100644 src/main/deploy/pathplanner/paths/RotationTest.path delete mode 100644 src/main/deploy/pathplanner/paths/TestPath1.path rename src/main/deploy/pathplanner/paths/{3 Piece 1 Stop 2.path => Top Piece to Bottom Piece.path} (56%) rename src/main/deploy/pathplanner/paths/{Alternate 3 Piece 2.path => Top Piece to Middle Piece.path} (56%) delete mode 100644 src/main/java/com/team766/robot/reva/procedures/OldThreePieceAuton.java delete mode 100644 src/main/java/com/team766/robot/reva/procedures/OneShotBackupSourceSide.java delete mode 100644 src/main/java/com/team766/robot/reva/procedures/ShootOnePiece.java rename src/main/java/com/team766/robot/reva/procedures/{ => auton_routines}/FourPieceAmpSide.java (59%) rename src/main/java/com/team766/robot/reva/procedures/{ThreePieceAutonAmpSide.java => auton_routines/ThreePieceAmpSide.java} (54%) diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 58c6797b9..2aaab0159 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -2,10 +2,7 @@ "robotWidth": 0.9, "robotLength": 0.9, "holonomicMode": true, - "pathFolders": [ - "RevA", - "gatorade" - ], + "pathFolders": [], "autoFolders": [], "defaultMaxVel": 3.0, "defaultMaxAccel": 3.0, diff --git a/src/main/deploy/pathplanner/paths/3 Piece 1.path b/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path similarity index 60% rename from src/main/deploy/pathplanner/paths/3 Piece 1.path rename to src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path index 040e9239c..f9f37ed86 100644 --- a/src/main/deploy/pathplanner/paths/3 Piece 1.path +++ b/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path @@ -3,35 +3,35 @@ "waypoints": [ { "anchor": { - "x": 0.7483342975945213, - "y": 6.675397934129203 + "x": 0.7231553213106429, + "y": 6.6810394500418635 }, "prevControl": null, "nextControl": { - "x": 2.3770102493908696, - "y": 6.456447732339909 + "x": 1.912268106943622, + "y": 6.38037634408602 }, "isLocked": false, - "linkedName": null + "linkedName": "Amp Side Start" }, { "anchor": { - "x": 2.809031599544681, - "y": 6.921961871701522 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": { - "x": 2.2404261799264344, - "y": 6.638104544727609 + "x": 1.67324598538086, + "y": 6.336669441857402 }, "nextControl": null, "isLocked": false, - "linkedName": "3 Piece 1" + "linkedName": "Top Piece" } ], "rotationTargets": [ { - "waypointRelativePos": 0.2, - "rotationDegrees": 37.38608672087997, + "waypointRelativePos": 0.25, + "rotationDegrees": 60.0, "rotateFast": false } ], @@ -45,13 +45,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 36.0, + "rotation": 31.5, "rotateFast": true }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": 59.33438905954238, + "rotation": 60.0, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/Intake_Path_1.path b/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path similarity index 52% rename from src/main/deploy/pathplanner/paths/Intake_Path_1.path rename to src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path index 124675bab..905590d57 100644 --- a/src/main/deploy/pathplanner/paths/Intake_Path_1.path +++ b/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path @@ -3,52 +3,41 @@ "waypoints": [ { "anchor": { - "x": 2.0, - "y": 7.0 + "x": 2.6321255373992227, + "y": 4.231077550118064 }, "prevControl": null, "nextControl": { - "x": 3.0, - "y": 7.0 + "x": 2.1686898512685917, + "y": 4.780086124987065 }, "isLocked": false, - "linkedName": null + "linkedName": "Bottom Piece" }, { "anchor": { - "x": 2.9208403278961947, - "y": 7.0 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": { - "x": 2.647327938174395, - "y": 6.99797387557738 - }, - "nextControl": { - "x": 3.2912178856275127, - "y": 7.0027436819811815 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.4866439657691353, - "y": 6.6044715548077715 - }, - "prevControl": { - "x": 4.13474631460541, - "y": 7.149700514939878 + "x": 2.1594852726731264, + "y": 6.5465932181858735 }, "nextControl": null, "isLocked": false, - "linkedName": "intake test 1" + "linkedName": "Top Piece" } ], "rotationTargets": [ { - "waypointRelativePos": 0.9, + "waypointRelativePos": 0.15, "rotationDegrees": 0, "rotateFast": false + }, + { + "waypointRelativePos": 0.65, + "rotationDegrees": 65.51032725616209, + "rotateFast": true } ], "constraintZones": [], @@ -61,13 +50,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": -98.13010235415607, + "rotation": 31.5, "rotateFast": false }, "reversed": false, - "folder": "gatorade", + "folder": null, "previewStartingState": { - "rotation": -140.22201891090498, + "rotation": -31.5, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/pathplanner/paths/Loop Test.path b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path similarity index 52% rename from src/main/deploy/pathplanner/paths/Loop Test.path rename to src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path index 0d71e9ddb..322346ef5 100644 --- a/src/main/deploy/pathplanner/paths/Loop Test.path +++ b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path @@ -3,93 +3,93 @@ "waypoints": [ { "anchor": { - "x": 2.0, - "y": 7.0 + "x": 0.7132975145579924, + "y": 4.40352978391142 }, "prevControl": null, "nextControl": { - "x": 3.78497679301123, - "y": 7.746366169424069 + "x": 0.7139507427163005, + "y": 3.9251886188957568 }, "isLocked": false, - "linkedName": null + "linkedName": "Bottom Start" }, { "anchor": { - "x": 1.892106440854486, - "y": 6.625046232543462 + "x": 2.0177347623213766, + "y": 1.3250436269391064 }, "prevControl": { - "x": 3.666472230445174, - "y": 6.262107775581731 + "x": 0.5501092437370062, + "y": 2.1267327303173134 }, "nextControl": { - "x": 0.9868206202577819, - "y": 6.81021833221097 + "x": 3.8443245108246487, + "y": 0.32727063977417226 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 1.892106440854486, - "y": 6.028380578064414 + "x": 8.214257072032662, + "y": 0.7568538979670562 }, "prevControl": { - "x": 0.4814081429543926, - "y": 6.097759182890737 + "x": 7.759606904612749, + "y": 1.1302501893122792 }, "nextControl": { - "x": 2.519634111949928, - "y": 5.997518561448019 + "x": 8.548531735952361, + "y": 0.48231991834354104 }, "isLocked": false, - "linkedName": null + "linkedName": "Bottom Midfield" }, { "anchor": { - "x": 1.892106440854486, - "y": 7.0 + "x": 2.2572913432863904, + "y": 1.0581702320812059 }, "prevControl": { - "x": 3.373483238194546, - "y": 7.005677770748894 + "x": 3.286422614511896, + "y": 0.5297680363879256 }, "nextControl": { - "x": 0.4107296435144261, - "y": 6.994322229251106 + "x": 1.40343002029556, + "y": 1.4965809679134259 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.0, - "y": 7.0 + "x": 0.7132975145579924, + "y": 4.40352978391142 }, "prevControl": { - "x": 1.2593116013299703, - "y": 6.973747551510271 + "x": 1.0087347952473684, + "y": 2.9745634954232876 }, "nextControl": null, "isLocked": false, - "linkedName": null + "linkedName": "Bottom Start" } ], "rotationTargets": [ { "waypointRelativePos": 0.5, - "rotationDegrees": 92.17550814898085, + "rotationDegrees": 0, "rotateFast": false }, { "waypointRelativePos": 2.0, - "rotationDegrees": -89.42127443439517, + "rotationDegrees": 0.0, "rotateFast": false }, { - "waypointRelativePos": 2.9, - "rotationDegrees": 1.583432759888603, + "waypointRelativePos": 2.8, + "rotationDegrees": 0, "rotateFast": false } ], @@ -103,13 +103,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 0, - "rotateFast": false + "rotation": -60.0, + "rotateFast": true }, "reversed": false, - "folder": "gatorade", + "folder": null, "previewStartingState": { - "rotation": 0, + "rotation": -60.0, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/pathplanner/paths/3 Piece 2.path b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path similarity index 51% rename from src/main/deploy/pathplanner/paths/3 Piece 2.path rename to src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path index d0954b51d..7e36b2a26 100644 --- a/src/main/deploy/pathplanner/paths/3 Piece 2.path +++ b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path @@ -3,32 +3,43 @@ "waypoints": [ { "anchor": { - "x": 2.809031599544681, - "y": 6.921961871701522 + "x": 0.7132975145579924, + "y": 4.40352978391142 }, "prevControl": null, "nextControl": { - "x": 2.791631976782473, - "y": 6.351931227010602 + "x": 1.7176655001447887, + "y": 4.387436617470951 }, "isLocked": false, - "linkedName": "3 Piece 1" + "linkedName": "Bottom Start" }, { "anchor": { - "x": 1.9935059360859464, - "y": 5.974899810910733 + "x": 2.6321255373992227, + "y": 4.231077550118064 }, "prevControl": { - "x": 2.1068113293633997, - "y": 6.400626416993576 + "x": 2.0118557088955766, + "y": 4.191705707490613 }, "nextControl": null, "isLocked": false, - "linkedName": "3 Piece 2" + "linkedName": "Bottom Piece" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.6, + "rotationDegrees": 0, + "rotateFast": true + }, + { + "waypointRelativePos": 0.05, + "rotationDegrees": -60.0, + "rotateFast": false } ], - "rotationTargets": [], "constraintZones": [], "eventMarkers": [], "globalConstraints": { @@ -39,13 +50,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 15.318588677171732, + "rotation": -31.5, "rotateFast": false }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": -8.829999999999984, + "rotation": -60.0, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/Example Path.path b/src/main/deploy/pathplanner/paths/Example Path.path deleted file mode 100644 index b78a44801..000000000 --- a/src/main/deploy/pathplanner/paths/Example Path.path +++ /dev/null @@ -1,103 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.9435431352065715, - "y": 5.894645172748993 - }, - "prevControl": null, - "nextControl": { - "x": 2.2763946160991675, - "y": 6.05256313767883 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.774689454140814, - "y": 6.172403322250253 - }, - "prevControl": { - "x": 3.6203793710861167, - "y": 6.553034860454937 - }, - "nextControl": { - "x": 3.974215112810719, - "y": 5.680240030860483 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.2933126568007527, - "y": 4.536716441853937 - }, - "prevControl": { - "x": 3.270609849491937, - "y": 4.351544342185679 - }, - "nextControl": { - "x": 0.7203084226064851, - "y": 4.834759349386213 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.1368744441749534, - "y": 0.6892517043179445 - }, - "prevControl": { - "x": 4.361067769754587, - "y": 0.47321758803918634 - }, - "nextControl": { - "x": 1.4047056396811404, - "y": 0.9949285521697926 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 7.827900969085148, - "y": 3.106776338865961 - }, - "prevControl": { - "x": 9.257841072073122, - "y": 2.417524634548016 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 2.45, - "rotationDegrees": 111.75817787041754, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -33.55493622107905, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/3 Piece 1 Stop 1.path b/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path similarity index 54% rename from src/main/deploy/pathplanner/paths/3 Piece 1 Stop 1.path rename to src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path index 8b2dfd13c..7acb4f94d 100644 --- a/src/main/deploy/pathplanner/paths/3 Piece 1 Stop 1.path +++ b/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path @@ -3,36 +3,36 @@ "waypoints": [ { "anchor": { - "x": 0.7483342975945213, - "y": 6.675397934129203 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": null, "nextControl": { - "x": 1.406194437388875, - "y": 7.089841508386721 + "x": 2.7727477445695636, + "y": 6.834904373512451 }, "isLocked": false, - "linkedName": null + "linkedName": "Top Piece" }, { "anchor": { - "x": 2.1015855040969345, - "y": 6.522126854438895 + "x": 2.7642557785115573, + "y": 5.544778760853818 }, "prevControl": { - "x": 1.7969436448132157, - "y": 6.6332944101073394 + "x": 2.050039863968617, + "y": 5.886595240783075 }, "nextControl": null, "isLocked": false, - "linkedName": "3 Piece 1 Stop 1" + "linkedName": "Middle Piece" } ], "rotationTargets": [ { - "waypointRelativePos": 0.2, - "rotationDegrees": 37.38608672087997, - "rotateFast": false + "waypointRelativePos": 0.6, + "rotationDegrees": -52.571672837394004, + "rotateFast": true } ], "constraintZones": [], @@ -40,18 +40,18 @@ "globalConstraints": { "maxVelocity": 3.0, "maxAcceleration": 3.0, - "maxAngularVelocity": 360.0, + "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, "goalEndState": { "velocity": 0, - "rotation": 35.26397392088418, + "rotation": 0, "rotateFast": true }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": 59.08161572041965, + "rotation": 31.5, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/Intake_Path_2.path b/src/main/deploy/pathplanner/paths/Intake_Path_2.path deleted file mode 100644 index 37d45c357..000000000 --- a/src/main/deploy/pathplanner/paths/Intake_Path_2.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 3.4866439657691353, - "y": 6.6044715548077715 - }, - "prevControl": null, - "nextControl": { - "x": 2.5196341119499284, - "y": 6.481023488362766 - }, - "isLocked": false, - "linkedName": "intake test 1" - }, - { - "anchor": { - "x": 2.0258418461699086, - "y": 6.203265338861505 - }, - "prevControl": { - "x": 2.787104922580773, - "y": 6.666195588030274 - }, - "nextControl": null, - "isLocked": false, - "linkedName": "intake test 2" - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -156.16125981682833, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": -88.83086067209265, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Intake_Path_3.path b/src/main/deploy/pathplanner/paths/Intake_Path_3.path deleted file mode 100644 index b30b142a1..000000000 --- a/src/main/deploy/pathplanner/paths/Intake_Path_3.path +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.0258418461699086, - "y": 6.203265338861505 - }, - "prevControl": null, - "nextControl": { - "x": 1.3983141750744656, - "y": 5.915219850489826 - }, - "isLocked": false, - "linkedName": "intake test 2" - }, - { - "anchor": { - "x": 2.2418759624486673, - "y": 5.555162990025228 - }, - "prevControl": { - "x": 1.2418759624486673, - "y": 5.555162990025228 - }, - "nextControl": null, - "isLocked": false, - "linkedName": "intake test 3" - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 0, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": -167.38067770656923, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Intake_Path_4.path b/src/main/deploy/pathplanner/paths/Intake_Path_4.path deleted file mode 100644 index ac0c064c6..000000000 --- a/src/main/deploy/pathplanner/paths/Intake_Path_4.path +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.2418759624486673, - "y": 5.555162990025228 - }, - "prevControl": null, - "nextControl": { - "x": 3.2418759624486673, - "y": 5.555162990025228 - }, - "isLocked": false, - "linkedName": "intake test 3" - }, - { - "anchor": { - "x": 3.3426212215832956, - "y": 5.90493251161941 - }, - "prevControl": { - "x": 3.674838120352668, - "y": 5.68960674389852 - }, - "nextControl": { - "x": 2.787104922580773, - "y": 6.264989372084007 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.087565879392411, - "y": 5.555162990025228 - }, - "prevControl": { - "x": 2.9414150056370305, - "y": 6.131253966768585 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -175.072890052351, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": 0, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Luis.path b/src/main/deploy/pathplanner/paths/Luis.path deleted file mode 100644 index ac26017c8..000000000 --- a/src/main/deploy/pathplanner/paths/Luis.path +++ /dev/null @@ -1,292 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.0, - "y": 7.0 - }, - "prevControl": null, - "nextControl": { - "x": 3.0, - "y": 7.0 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8488289558032753, - "y": 7.0 - }, - "prevControl": { - "x": 1.8488289558032753, - "y": 7.0 - }, - "nextControl": { - "x": 3.848828955803278, - "y": 7.0 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.840669746502401, - "y": 6.038667916934832 - }, - "prevControl": { - "x": 1.8513290622959686, - "y": 6.315810127605033 - }, - "nextControl": { - "x": 1.8200950687641575, - "y": 5.503726295668239 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8694036335441093, - "y": 5.575737667766062 - }, - "prevControl": { - "x": 2.493636459703998, - "y": 5.811726102148946 - }, - "nextControl": { - "x": 3.2451708073842207, - "y": 5.339749233383178 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.840669746502401, - "y": 4.598440475071534 - }, - "prevControl": { - "x": 2.4876986070902483, - "y": 5.137631192232601 - }, - "nextControl": { - "x": 1.5320495803924792, - "y": 4.341257003311107 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8694036335441093, - "y": 4.114935548166836 - }, - "prevControl": { - "x": 2.7150935504904443, - "y": 4.08407353155068 - }, - "nextControl": { - "x": 3.840448744563738, - "y": 4.30914457040489 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0, - "y": 7.0 - }, - "prevControl": { - "x": 2.7088844096564495, - "y": 5.369565857749103 - }, - "nextControl": { - "x": 1.8971266112984198, - "y": 7.236608794019594 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.9495742149404953, - "y": 6.851367687692877 - }, - "prevControl": { - "x": 2.396186045510106, - "y": 6.841080348817555 - }, - "nextControl": { - "x": 5.5029623843708855, - "y": 6.861655026568198 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0258418461724994, - "y": 5.297979518259897 - }, - "prevControl": { - "x": 3.934316709711028, - "y": 5.764495596013759 - }, - "nextControl": { - "x": 1.5629115970037306, - "y": 5.184818790685309 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.653369517267942, - "y": 6.409012116264942 - }, - "prevControl": { - "x": 1.8200950687641575, - "y": 5.771197106299083 - }, - "nextControl": { - "x": 3.4866439657717265, - "y": 7.046827126230801 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.455781949160475, - "y": 5.411140245834485 - }, - "prevControl": { - "x": 2.69012446267079, - "y": 3.903752069307917 - }, - "nextControl": { - "x": 4.114171636867169, - "y": 6.707344943507038 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.455781949160475, - "y": 6.409012116264942 - }, - "prevControl": { - "x": 5.44701958295624, - "y": 5.824915743684851 - }, - "nextControl": { - "x": 1.9126811185979113, - "y": 6.8616550265632945 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.661528726568816, - "y": 7.098263820582888 - }, - "prevControl": { - "x": 3.2706098494929674, - "y": 7.26286124250956 - }, - "nextControl": { - "x": 4.052447603644664, - "y": 6.933666398656216 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 4.659400596999275, - "y": 7.098263820582888 - }, - "prevControl": { - "x": 4.299343736534676, - "y": 7.08797648171247 - }, - "nextControl": { - "x": 5.019457457463873, - "y": 7.108551159453306 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.1904392680991727, - "y": 4.516141764108197 - }, - "prevControl": { - "x": 3.7578645782770046, - "y": 5.622559630116077 - }, - "nextControl": { - "x": 1.840669746504992, - "y": 4.269245631218188 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0258418461724994, - "y": 7.0 - }, - "prevControl": { - "x": 1.6043941897160863, - "y": 5.946380858858969 - }, - "nextControl": { - "x": 2.211013945840007, - "y": 7.462930249168768 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.3529085604563034, - "y": 6.038667916934832 - }, - "prevControl": { - "x": 2.9838502784800904, - "y": 7.437746003311557 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 0, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": 0, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/4 Piece 3.path b/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path similarity index 51% rename from src/main/deploy/pathplanner/paths/4 Piece 3.path rename to src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path index a1505de03..9a931b82b 100644 --- a/src/main/deploy/pathplanner/paths/4 Piece 3.path +++ b/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path @@ -3,53 +3,37 @@ "waypoints": [ { "anchor": { - "x": 2.6682193623646513, - "y": 5.646385431659753 + "x": 2.7642557785115573, + "y": 5.544778760853818 }, "prevControl": null, "nextControl": { - "x": 1.7207519017022372, - "y": 5.204122117306238 + "x": 2.2568162682621664, + "y": 4.97742041317416 }, "isLocked": false, - "linkedName": "Alt 3 Piece 2" + "linkedName": "Middle Piece" }, { "anchor": { - "x": 2.26791208351892, - "y": 4.282931630251178 + "x": 2.6321255373992227, + "y": 4.231077550118064 }, "prevControl": { - "x": 1.4151987346458874, - "y": 4.575610792998139 - }, - "nextControl": { - "x": 3.241256971385167, - "y": 3.9488477705095315 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.878971786560425, - "y": 4.75130160117236 - }, - "prevControl": { - "x": 2.4722472139697835, - "y": 4.470391778621396 + "x": 2.237100654756865, + "y": 4.471703049887583 }, "nextControl": null, "isLocked": false, - "linkedName": null + "linkedName": "Bottom Piece" } ], "rotationTargets": [], "constraintZones": [ { "name": "Don't Smash Stage", - "minWaypointRelativePos": 1.05, - "maxWaypointRelativePos": 1.5, + "minWaypointRelativePos": 0.55, + "maxWaypointRelativePos": 0.75, "constraints": { "maxVelocity": 1.0, "maxAcceleration": 3.0, @@ -67,13 +51,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": -26.692555230133284, - "rotateFast": false + "rotation": -31.5, + "rotateFast": true }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": 1.6, + "rotation": 0.0, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/3 Piece 3.path b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path similarity index 53% rename from src/main/deploy/pathplanner/paths/3 Piece 3.path rename to src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path index f42f10431..3b773f88f 100644 --- a/src/main/deploy/pathplanner/paths/3 Piece 3.path +++ b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path @@ -3,32 +3,38 @@ "waypoints": [ { "anchor": { - "x": 1.9935059360859464, - "y": 5.974899810910733 + "x": 2.7642557785115573, + "y": 5.544778760853818 }, "prevControl": null, "nextControl": { - "x": 2.0333528537427448, - "y": 5.602916066943245 + "x": 2.221304410198268, + "y": 6.166889505079905 }, "isLocked": false, - "linkedName": "3 Piece 2" + "linkedName": "Middle Piece" }, { "anchor": { - "x": 2.7314162174620646, - "y": 5.524053612922041 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": { - "x": 2.442629987111826, - "y": 5.477021185523853 + "x": 2.453853634555976, + "y": 6.883777716634106 }, "nextControl": null, "isLocked": false, - "linkedName": "3 Piece 3" + "linkedName": "Top Piece" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.5, + "rotationDegrees": 53.054260493817424, + "rotateFast": true } ], - "rotationTargets": [], "constraintZones": [], "eventMarkers": [], "globalConstraints": { @@ -39,14 +45,11 @@ }, "goalEndState": { "velocity": 0, - "rotation": -4.232774294389117, + "rotation": 31.5, "rotateFast": false }, "reversed": false, - "folder": "RevA", - "previewStartingState": { - "rotation": 15.0, - "velocity": 0 - }, + "folder": null, + "previewStartingState": null, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/BackupSource.path b/src/main/deploy/pathplanner/paths/Middle Start to Middle Piece.path similarity index 65% rename from src/main/deploy/pathplanner/paths/BackupSource.path rename to src/main/deploy/pathplanner/paths/Middle Start to Middle Piece.path index e27e89fc3..e9b888c3e 100644 --- a/src/main/deploy/pathplanner/paths/BackupSource.path +++ b/src/main/deploy/pathplanner/paths/Middle Start to Middle Piece.path @@ -3,29 +3,29 @@ "waypoints": [ { "anchor": { - "x": 0.7191765679827657, - "y": 4.407449152861269 + "x": 1.34799774692142, + "y": 5.545847679658323 }, "prevControl": null, "nextControl": { - "x": 0.8936478706290749, - "y": 3.6077197339579867 + "x": 1.84799774692142, + "y": 5.545847679658323 }, "isLocked": false, - "linkedName": null + "linkedName": "Middle Start" }, { "anchor": { - "x": 3.0376614549525396, - "y": 2.014733793356476 + "x": 2.7642557785115573, + "y": 5.544778760853818 }, "prevControl": { - "x": 1.5874355591303775, - "y": 2.3987131816856233 + "x": 2.2642557785115573, + "y": 5.544778760853818 }, "nextControl": null, "isLocked": false, - "linkedName": null + "linkedName": "Middle Piece" } ], "rotationTargets": [], @@ -43,9 +43,9 @@ "rotateFast": false }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": -60.158434364273226, + "rotation": 0, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/MidfieldSource 1.path b/src/main/deploy/pathplanner/paths/MidfieldSource 1.path deleted file mode 100644 index dd166e054..000000000 --- a/src/main/deploy/pathplanner/paths/MidfieldSource 1.path +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 0.711931673863348, - "y": 4.38945568631878 - }, - "prevControl": null, - "nextControl": { - "x": 1.383093914335977, - "y": 3.4618717015211815 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.9200803864570695, - "y": 2.2531026867609296 - }, - "prevControl": { - "x": 2.0452891137263762, - "y": 2.8716503683007364 - }, - "nextControl": { - "x": 4.074795335647494, - "y": 1.436626486179335 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 8.114253779433485, - "y": 0.7819734898729062 - }, - "prevControl": { - "x": 6.706868714663355, - "y": 0.8558211977535082 - }, - "nextControl": null, - "isLocked": false, - "linkedName": "Midfield Source 1" - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 0, - "rotateFast": false - }, - "reversed": false, - "folder": "RevA", - "previewStartingState": { - "rotation": -60.51720636570292, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/MidfieldSource 2.path b/src/main/deploy/pathplanner/paths/MidfieldSource 2.path deleted file mode 100644 index ebe5eb8dc..000000000 --- a/src/main/deploy/pathplanner/paths/MidfieldSource 2.path +++ /dev/null @@ -1,65 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 8.114253779433485, - "y": 0.7819734898729062 - }, - "prevControl": null, - "nextControl": { - "x": 6.683141534009618, - "y": 0.8995741958097596 - }, - "isLocked": false, - "linkedName": "Midfield Source 1" - }, - { - "anchor": { - "x": 4.217456841114, - "y": 1.5303722419845476 - }, - "prevControl": { - "x": 5.359677131778603, - "y": 0.6965060611173377 - }, - "nextControl": { - "x": 3.0751072233464023, - "y": 2.364332836773782 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.5321934538940616, - "y": 4.070796281497174 - }, - "prevControl": { - "x": 2.503244159906444, - "y": 2.9102461543555838 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -44.54082726978178, - "rotateFast": false - }, - "reversed": false, - "folder": "RevA", - "previewStartingState": null, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/RotationTest.path b/src/main/deploy/pathplanner/paths/RotationTest.path deleted file mode 100644 index 26fa8fdb9..000000000 --- a/src/main/deploy/pathplanner/paths/RotationTest.path +++ /dev/null @@ -1,174 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 1.5783182277216394, - "y": 6.964284639469753 - }, - "prevControl": null, - "nextControl": { - "x": 1.5796974421638617, - "y": 6.964284639469753 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8914165885196352, - "y": 6.964284639469753 - }, - "prevControl": { - "x": 1.8369373784966605, - "y": 7.644593807222689 - }, - "nextControl": { - "x": 3.4944691690320155, - "y": 6.5752184584962095 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.8214845908357342, - "y": 6.011072496076271 - }, - "prevControl": { - "x": 1.6782603195895598, - "y": 6.818336570372892 - }, - "nextControl": { - "x": 1.928477790604124, - "y": 5.408019915563528 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8914165885196352, - "y": 5.544193078909905 - }, - "prevControl": { - "x": 2.9400498611416306, - "y": 5.81653940559308 - }, - "nextControl": { - "x": 2.8055133995253843, - "y": 5.063135220542098 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 1.704764736542945, - "y": 4.697974135282393 - }, - "prevControl": { - "x": 1.545572943937628, - "y": 5.481687575800873 - }, - "nextControl": { - "x": 1.831211245360134, - "y": 4.075468245720851 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.764970079702084, - "y": 4.056014936676843 - }, - "prevControl": { - "x": 2.104009982547969, - "y": 4.005171852280372 - }, - "nextControl": { - "x": 3.144309606153648, - "y": 4.08519490025004 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8914165885196352, - "y": 5.719272860349089 - }, - "prevControl": { - "x": 2.8816899339952364, - "y": 5.515013115336708 - }, - "nextControl": { - "x": 2.947425880685064, - "y": 6.895467995823131 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.8932620045323794, - "y": 7.090731148289363 - }, - "prevControl": { - "x": 3.329116042117231, - "y": 7.02264456662099 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [ - { - "waypointRelativePos": 1.0, - "rotationDegrees": 0, - "rotateFast": false - }, - { - "waypointRelativePos": 3.0, - "rotationDegrees": 1.380354073444752, - "rotateFast": false - }, - { - "waypointRelativePos": 4.949999999999999, - "rotationDegrees": 8.25566444999381, - "rotateFast": false - }, - { - "waypointRelativePos": 1.85, - "rotationDegrees": -152.44287908618307, - "rotateFast": false - }, - { - "waypointRelativePos": 3.8, - "rotationDegrees": 147.51751392369286, - "rotateFast": false - } - ], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 1.0, - "maxAcceleration": 1.0, - "maxAngularVelocity": 100.0, - "maxAngularAcceleration": 200.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": -0.5846305204174452, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": 0.0, - "velocity": 0 - }, - "useDefaultConstraints": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/TestPath1.path b/src/main/deploy/pathplanner/paths/TestPath1.path deleted file mode 100644 index 71ecb95b6..000000000 --- a/src/main/deploy/pathplanner/paths/TestPath1.path +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 1.0, - "waypoints": [ - { - "anchor": { - "x": 2.0257443358488607, - "y": 6.2736921682374165 - }, - "prevControl": null, - "nextControl": { - "x": 2.3369972806296317, - "y": 6.108339041322632 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8427833158983855, - "y": 7.090731148286942 - }, - "prevControl": { - "x": 1.7242180455924891, - "y": 7.333897511396918 - }, - "nextControl": { - "x": 3.1816534103666534, - "y": 7.017063736446015 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0257443358488607, - "y": 6.011072496078642 - }, - "prevControl": { - "x": 2.3564505896784302, - "y": 6.691938312786579 - }, - "nextControl": { - "x": 1.7536703712618387, - "y": 5.450920216046537 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8427833158983855, - "y": 5.544193078907484 - }, - "prevControl": { - "x": 2.823330006849587, - "y": 6.049979114176238 - }, - "nextControl": { - "x": 2.853223862935349, - "y": 5.272738855946444 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.0257443358488607, - "y": 4.882780571248346 - }, - "prevControl": { - "x": 2.1083767638426925, - "y": 5.004298847709863 - }, - "nextControl": { - "x": 1.5296849551045069, - "y": 4.153281481918413 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.8427833158983855, - "y": 4.0657415911988215 - }, - "prevControl": { - "x": 2.8207984142075695, - "y": 4.005021386528949 - }, - "nextControl": { - "x": 3.251302805923148, - "y": 5.194033516029117 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 3.1734895697279546, - "y": 6.2736921682374165 - }, - "prevControl": { - "x": 3.178466881222862, - "y": 6.27019665176771 - }, - "nextControl": { - "x": 3.168512258233047, - "y": 6.277187684707123 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 2.1521908446660496, - "y": 6.156972313944628 - }, - "prevControl": { - "x": 2.169155497967395, - "y": 6.139266763130683 - }, - "nextControl": null, - "isLocked": false, - "linkedName": null - } - ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [], - "globalConstraints": { - "maxVelocity": 3.0, - "maxAcceleration": 3.0, - "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0 - }, - "goalEndState": { - "velocity": 0, - "rotation": 6.0724564072078495, - "rotateFast": false - }, - "reversed": false, - "folder": "gatorade", - "previewStartingState": { - "rotation": -2.96093613416366, - "velocity": 0 - }, - "useDefaultConstraints": true -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/3 Piece 1 Stop 2.path b/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path similarity index 56% rename from src/main/deploy/pathplanner/paths/3 Piece 1 Stop 2.path rename to src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path index 4de4ddbc6..344e6378e 100644 --- a/src/main/deploy/pathplanner/paths/3 Piece 1 Stop 2.path +++ b/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path @@ -3,32 +3,38 @@ "waypoints": [ { "anchor": { - "x": 2.1015855040969345, - "y": 6.522126854438895 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": null, "nextControl": { - "x": 2.328968287566205, - "y": 6.561759988334791 + "x": 2.4009421537361595, + "y": 6.069320971975277 }, "isLocked": false, - "linkedName": "3 Piece 1 Stop 1" + "linkedName": "Top Piece" }, { "anchor": { - "x": 2.809031599544681, - "y": 6.921961871701522 + "x": 2.6069465611153446, + "y": 4.141407139295761 }, "prevControl": { - "x": 2.6349878644201734, - "y": 6.817492873874638 + "x": 2.2031921749028687, + "y": 5.300055739000367 }, "nextControl": null, "isLocked": false, - "linkedName": "3 Piece 1" + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.85, + "rotationDegrees": -45.62973422076138, + "rotateFast": true } ], - "rotationTargets": [], "constraintZones": [], "eventMarkers": [], "globalConstraints": { @@ -39,13 +45,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 36.0, + "rotation": -31.5, "rotateFast": false }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": 35.26, + "rotation": 31.5, "velocity": 0 }, "useDefaultConstraints": false diff --git a/src/main/deploy/pathplanner/paths/Alternate 3 Piece 2.path b/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path similarity index 56% rename from src/main/deploy/pathplanner/paths/Alternate 3 Piece 2.path rename to src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path index c79c3bae8..746330eea 100644 --- a/src/main/deploy/pathplanner/paths/Alternate 3 Piece 2.path +++ b/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path @@ -3,51 +3,51 @@ "waypoints": [ { "anchor": { - "x": 2.809031599544681, - "y": 6.921961871701522 + "x": 2.8691879744870605, + "y": 6.9776644182918 }, "prevControl": null, "nextControl": { - "x": 2.1920279118336023, - "y": 7.089722739630666 + "x": 2.252184286775982, + "y": 7.145425286220944 }, "isLocked": false, - "linkedName": "3 Piece 1" + "linkedName": "Top Piece" }, { "anchor": { - "x": 2.9128948767156797, - "y": 5.502794005588011 + "x": 2.93, + "y": 5.544778760853818 }, "prevControl": { - "x": 2.6179920554285556, - "y": 5.609151426636186 + "x": 2.635097178712876, + "y": 5.651136181901993 }, "nextControl": { - "x": 2.9147974811266733, - "y": 5.5021078266713594 + "x": 2.9319026044109937, + "y": 5.544092581937167 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.6682193623646513, - "y": 5.646385431659753 + "x": 2.7642557785115573, + "y": 5.544778760853818 }, "prevControl": { - "x": 2.6807494661285625, - "y": 5.638427925003999 + "x": 2.7767858822754685, + "y": 5.536821254198064 }, "nextControl": null, "isLocked": false, - "linkedName": "Alt 3 Piece 2" + "linkedName": "Middle Piece" } ], "rotationTargets": [ { "waypointRelativePos": 0.85, - "rotationDegrees": -54.676493707084944, + "rotationDegrees": -62.253982514217135, "rotateFast": true } ], @@ -61,14 +61,14 @@ }, "goalEndState": { "velocity": 0, - "rotation": 1.603601095467792, + "rotation": 0.0, "rotateFast": true }, "reversed": false, - "folder": "RevA", + "folder": null, "previewStartingState": { - "rotation": 36.0, + "rotation": 31.5, "velocity": 0 }, - "useDefaultConstraints": false + "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index 4c21521e4..c87eca997 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -1,11 +1,8 @@ package com.team766.robot.reva; import com.team766.framework.AutonomousMode; -import com.team766.robot.reva.procedures.MoveClimbersToBottom; -import com.team766.robot.reva.procedures.OneShotBackupSourceSide; -import com.team766.robot.reva.procedures.RotateAndShootNow; -import com.team766.robot.reva.procedures.ShootOnePiece; -import com.team766.robot.reva.procedures.ThreePieceAutonAmpSide; +import com.team766.robot.reva.procedures.auton_routines.FourPieceAmpSide; +import com.team766.robot.reva.procedures.auton_routines.ThreePieceAmpSide; public class AutonomousModes { public static final AutonomousMode[] AUTONOMOUS_MODES = @@ -17,10 +14,7 @@ public class AutonomousModes { // define one or more different autonomous modes with it like this: // new AutonomousMode("DriveFast", () -> new DriveStraight(1.0)), // new AutonomousMode("DriveSlow", () -> new DriveStraight(0.4)), - new AutonomousMode("OneShotBackupSourceSide", () -> new OneShotBackupSourceSide()), - new AutonomousMode("ClimbersDown", () -> new MoveClimbersToBottom()), - new AutonomousMode("ShootOnePiece", () -> new ShootOnePiece()), - new AutonomousMode("AltThreePiece", () -> new ThreePieceAutonAmpSide()), - new AutonomousMode("ShootNow", () -> new RotateAndShootNow()) + new AutonomousMode("3 Piece Amp Side", () -> new ThreePieceAmpSide()), + new AutonomousMode("4 Piece Amp Side", () -> new FourPieceAmpSide()), }; } diff --git a/src/main/java/com/team766/robot/reva/procedures/OldThreePieceAuton.java b/src/main/java/com/team766/robot/reva/procedures/OldThreePieceAuton.java deleted file mode 100644 index 4fe9ea523..000000000 --- a/src/main/java/com/team766/robot/reva/procedures/OldThreePieceAuton.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.team766.robot.reva.procedures; - -import com.team766.robot.common.procedures.PathSequenceAuto; -import com.team766.robot.reva.Robot; -import edu.wpi.first.math.geometry.Pose2d; -import edu.wpi.first.math.geometry.Rotation2d; - -public class OldThreePieceAuton extends PathSequenceAuto { - public OldThreePieceAuton() { - super(Robot.drive, new Pose2d(2.00, 6.75, Rotation2d.fromDegrees(33))); - addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); - addPath("3 Piece 1"); - addPath("3 Piece 2"); - addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); - addPath("3 Piece 3"); - addProcedure(new ShootNow()); - } -} diff --git a/src/main/java/com/team766/robot/reva/procedures/OneShotBackupSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/OneShotBackupSourceSide.java deleted file mode 100644 index 2f75a444c..000000000 --- a/src/main/java/com/team766/robot/reva/procedures/OneShotBackupSourceSide.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.team766.robot.reva.procedures; - -import com.team766.robot.common.procedures.PathSequenceAuto; -import com.team766.robot.reva.Robot; -import edu.wpi.first.math.geometry.Pose2d; -import edu.wpi.first.math.geometry.Rotation2d; - -public class OneShotBackupSourceSide extends PathSequenceAuto { - public OneShotBackupSourceSide() { - super(Robot.drive, new Pose2d(0.72, 4.41, Rotation2d.fromDegrees(-60))); - addProcedure(new ShootNow()); - addPath("BackupSource"); - } -} diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootOnePiece.java b/src/main/java/com/team766/robot/reva/procedures/ShootOnePiece.java deleted file mode 100644 index 2448edfd3..000000000 --- a/src/main/java/com/team766/robot/reva/procedures/ShootOnePiece.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.team766.robot.reva.procedures; - -import com.team766.robot.common.procedures.PathSequenceAuto; -import com.team766.robot.reva.Robot; -import edu.wpi.first.math.geometry.Pose2d; -import edu.wpi.first.math.geometry.Rotation2d; - -public class ShootOnePiece extends PathSequenceAuto { - public ShootOnePiece() { - super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); - addProcedure(new ShootNow()); - } -} diff --git a/src/main/java/com/team766/robot/reva/procedures/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java similarity index 59% rename from src/main/java/com/team766/robot/reva/procedures/FourPieceAmpSide.java rename to src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index 33bc91253..6fd8233c9 100644 --- a/src/main/java/com/team766/robot/reva/procedures/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -1,22 +1,25 @@ -package com.team766.robot.reva.procedures; +package com.team766.robot.reva.procedures.auton_routines; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; +import com.team766.robot.reva.procedures.AutoIntake; +import com.team766.robot.reva.procedures.ShootAtSubwoofer; +import com.team766.robot.reva.procedures.ShootNow; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; public class FourPieceAmpSide extends PathSequenceAuto { public FourPieceAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); - addProcedure(new ShootNow()); + addProcedure(new ShootAtSubwoofer()); addProcedure(new AutoIntake()); - addPath("3 Piece 1"); + addPath("Amp Side Start to Top Piece"); addProcedure(new ShootNow()); addProcedure(new AutoIntake()); - addPath("Alternate 3 Piece 2"); + addPath("Fast Top Piece to Middle Piece"); addProcedure(new ShootNow()); addProcedure(new AutoIntake()); - addPath("4 Piece 3"); + addPath("Middle Piece to Bottom Piece"); addProcedure(new ShootNow()); } } diff --git a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java similarity index 54% rename from src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java rename to src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index 874bbab0d..b16156bbc 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ThreePieceAutonAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -1,19 +1,22 @@ -package com.team766.robot.reva.procedures; +package com.team766.robot.reva.procedures.auton_routines; import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; +import com.team766.robot.reva.procedures.AutoIntake; +import com.team766.robot.reva.procedures.ShootAtSubwoofer; +import com.team766.robot.reva.procedures.ShootNow; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; -public class ThreePieceAutonAmpSide extends PathSequenceAuto { - public ThreePieceAutonAmpSide() { +public class ThreePieceAmpSide extends PathSequenceAuto { + public ThreePieceAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new AutoIntake()); - addPath("3 Piece 1"); + addPath("Amp Side Start to Top Piece"); addProcedure(new ShootNow()); addProcedure(new AutoIntake()); - addPath("Alternate 3 Piece 2"); + addPath("Top Piece to Middle Piece"); addProcedure(new ShootNow()); } } From 93625bc562be40fa086e281bfc130b7e70d86f9d Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:44:28 -0700 Subject: [PATCH 09/27] renamed autoIntake --- .../robot/reva/procedures/MidfieldAutonSourceSide.java | 2 +- .../procedures/{AutoIntake.java => StartAutoIntake.java} | 2 +- .../reva/procedures/auton_routines/FourPieceAmpSide.java | 8 ++++---- .../reva/procedures/auton_routines/ThreePieceAmpSide.java | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/main/java/com/team766/robot/reva/procedures/{AutoIntake.java => StartAutoIntake.java} (91%) diff --git a/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java index ec58d4bd5..a353e66be 100644 --- a/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/MidfieldAutonSourceSide.java @@ -9,7 +9,7 @@ public class MidfieldAutonSourceSide extends PathSequenceAuto { public MidfieldAutonSourceSide() { super(Robot.drive, new Pose2d(0.71, 4.39, Rotation2d.fromDegrees(-60))); addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("MidfieldSource 1"); addPath("MidfieldSource 2"); addProcedure(new ShootNow()); diff --git a/src/main/java/com/team766/robot/reva/procedures/AutoIntake.java b/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java similarity index 91% rename from src/main/java/com/team766/robot/reva/procedures/AutoIntake.java rename to src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java index fdfb56a31..27d424751 100644 --- a/src/main/java/com/team766/robot/reva/procedures/AutoIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/StartAutoIntake.java @@ -5,7 +5,7 @@ import com.team766.robot.reva.Robot; import com.team766.robot.reva.mechanisms.Shoulder.ShoulderPosition; -public class AutoIntake extends Procedure { +public class StartAutoIntake extends Procedure { public void run(Context context) { context.takeOwnership(Robot.shoulder); Robot.shoulder.rotate(ShoulderPosition.BOTTOM); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index 6fd8233c9..b50654be7 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -2,7 +2,7 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; -import com.team766.robot.reva.procedures.AutoIntake; +import com.team766.robot.reva.procedures.StartAutoIntake; import com.team766.robot.reva.procedures.ShootAtSubwoofer; import com.team766.robot.reva.procedures.ShootNow; import edu.wpi.first.math.geometry.Pose2d; @@ -12,13 +12,13 @@ public class FourPieceAmpSide extends PathSequenceAuto { public FourPieceAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("Fast Top Piece to Middle Piece"); addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("Middle Piece to Bottom Piece"); addProcedure(new ShootNow()); } diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index b16156bbc..9caeabeb1 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -2,7 +2,7 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; -import com.team766.robot.reva.procedures.AutoIntake; +import com.team766.robot.reva.procedures.StartAutoIntake; import com.team766.robot.reva.procedures.ShootAtSubwoofer; import com.team766.robot.reva.procedures.ShootNow; import edu.wpi.first.math.geometry.Pose2d; @@ -12,10 +12,10 @@ public class ThreePieceAmpSide extends PathSequenceAuto { public ThreePieceAmpSide() { super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); addProcedure(new ShootNow()); - addProcedure(new AutoIntake()); + addProcedure(new StartAutoIntake()); addPath("Top Piece to Middle Piece"); addProcedure(new ShootNow()); } From df4e12ba99d34ffd675128dac8f4a1d44be00a98 Mon Sep 17 00:00:00 2001 From: Leek <134633159+Leek865@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:27:09 -0700 Subject: [PATCH 10/27] defualt 4800 --- .../java/com/team766/robot/reva/BoxOpOI.java | 2 +- .../reva/VisionUtil/VisionPIDProcedure.java | 20 +++++++++---------- .../robot/reva/mechanisms/Shooter.java | 2 +- .../procedures/ShootVelocityAndIntake.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/BoxOpOI.java b/src/main/java/com/team766/robot/reva/BoxOpOI.java index 4ee20efaf..a5e396c7c 100644 --- a/src/main/java/com/team766/robot/reva/BoxOpOI.java +++ b/src/main/java/com/team766/robot/reva/BoxOpOI.java @@ -177,7 +177,7 @@ protected void handleOI(Context context) { // shooter if (shooterShoot.isNewlyTriggering()) { context.takeOwnership(shooter); - shooter.shoot(5600); + shooter.shoot(4800); context.releaseOwnership(shooter); } else if (shooterShoot.isFinishedTriggering()) { context.takeOwnership(shooter); diff --git a/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java b/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java index d43ea3570..b6eafaef9 100644 --- a/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java +++ b/src/main/java/com/team766/robot/reva/VisionUtil/VisionPIDProcedure.java @@ -17,18 +17,18 @@ public abstract class VisionPIDProcedure extends Procedure { /* * Scoringposition distances need to be in sequential order. Ie, the first one added needs to be the closest distance. */ - private static AnywhereScoringPosition aa1 = new AnywhereScoringPosition(1.237, 5600, 17.343); - private static AnywhereScoringPosition a1 = new AnywhereScoringPosition(1.453, 5600, 17.80599); + private static AnywhereScoringPosition aa1 = new AnywhereScoringPosition(1.237, 4800, 17.343); + private static AnywhereScoringPosition a1 = new AnywhereScoringPosition(1.453, 4800, 17.80599); private static AnywhereScoringPosition a2 = - new AnywhereScoringPosition(1.7201, 5600, 22.205946); - private static AnywhereScoringPosition a3 = new AnywhereScoringPosition(1.9506, 5600, 23.516); - private static AnywhereScoringPosition a4 = new AnywhereScoringPosition(2.072, 5600, 27.32); - private static AnywhereScoringPosition a5 = new AnywhereScoringPosition(2.29161, 5600, 31.109); - private static AnywhereScoringPosition a6 = new AnywhereScoringPosition(2.4616, 5600, 31.8987); - private static AnywhereScoringPosition a7 = new AnywhereScoringPosition(2.6942, 5600, 32.699); + new AnywhereScoringPosition(1.7201, 4800, 22.205946); + private static AnywhereScoringPosition a3 = new AnywhereScoringPosition(1.9506, 4800, 23.516); + private static AnywhereScoringPosition a4 = new AnywhereScoringPosition(2.072, 4800, 27.32); + private static AnywhereScoringPosition a5 = new AnywhereScoringPosition(2.29161, 4800, 31.109); + private static AnywhereScoringPosition a6 = new AnywhereScoringPosition(2.4616, 4800, 31.8987); + private static AnywhereScoringPosition a7 = new AnywhereScoringPosition(2.6942, 4800, 32.699); private static AnywhereScoringPosition a8 = - new AnywhereScoringPosition(2.8657, 5600, 34.103733); - private static AnywhereScoringPosition a9 = new AnywhereScoringPosition(3.2926, 5600, 34.6842); + new AnywhereScoringPosition(2.8657, 4800, 34.103733); + private static AnywhereScoringPosition a9 = new AnywhereScoringPosition(3.2926, 4800, 34.6842); private static AnywhereScoringPosition a10 = new AnywhereScoringPosition(0, 0, 0); private static AnywhereScoringPosition a11 = new AnywhereScoringPosition(0, 0, 0); diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index aa3dddb55..1a67a89d5 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -13,7 +13,7 @@ public class Shooter extends Mechanism { private static final double DEFAULT_SPEED = - 5600.0; // motor shaft rps, does not take gearing into account + 4800.0; // motor shaft rps, does not take gearing into account private static final double NUDGE_INCREMENT = 100.0; private static final double CURRENT_LIMIT = 40.0; // needs tuning private static final double MAX_SPEED = 5600.0; // spec is 6000.0 diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index 03c07a091..756396ade 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -9,7 +9,7 @@ public class ShootVelocityAndIntake extends Procedure { double speed; public ShootVelocityAndIntake() { - this(5600); + this(4800); } public ShootVelocityAndIntake(double speed) { From f87f579f754684d6b4cafe6b5f6201af29840cd0 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:42:45 -0700 Subject: [PATCH 11/27] Shooter 4800 Changes and added center auton --- .../team766/robot/reva/AutonomousModes.java | 2 ++ .../robot/reva/mechanisms/Shooter.java | 2 +- .../auton_routines/FourPieceAmpSide.java | 2 +- .../auton_routines/ThreePieceAmpSide.java | 2 +- .../ThreePieceStartCenterTopAndAmp.java | 22 +++++++++++++++++++ 5 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index c87eca997..e7578a3ff 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -3,6 +3,7 @@ import com.team766.framework.AutonomousMode; import com.team766.robot.reva.procedures.auton_routines.FourPieceAmpSide; import com.team766.robot.reva.procedures.auton_routines.ThreePieceAmpSide; +import com.team766.robot.reva.procedures.auton_routines.ThreePieceStartCenterTopAndAmp; public class AutonomousModes { public static final AutonomousMode[] AUTONOMOUS_MODES = @@ -16,5 +17,6 @@ public class AutonomousModes { // new AutonomousMode("DriveSlow", () -> new DriveStraight(0.4)), new AutonomousMode("3 Piece Amp Side", () -> new ThreePieceAmpSide()), new AutonomousMode("4 Piece Amp Side", () -> new FourPieceAmpSide()), + new AutonomousMode("3 Piece Center Start Center and Top", () -> new ThreePieceStartCenterTopAndAmp()) }; } diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index 1a67a89d5..169f475e2 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -20,7 +20,7 @@ public class Shooter extends Mechanism { private static final double MIN_SPEED = 0.0; // TODO: Get the voltage of the battery and set the speed tolerance propotional to this - private static final double SPEED_TOLERANCE = 800.0; // rpm + private static final double SPEED_TOLERANCE = 200.0; // rpm private MotorController shooterMotorTop; private MotorController shooterMotorBottom; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index b50654be7..aaa17205d 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -10,7 +10,7 @@ public class FourPieceAmpSide extends PathSequenceAuto { public FourPieceAmpSide() { - super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); + super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index 9caeabeb1..e7dc10f6b 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -10,7 +10,7 @@ public class ThreePieceAmpSide extends PathSequenceAuto { public ThreePieceAmpSide() { - super(Robot.drive, new Pose2d(0.75, 6.68, Rotation2d.fromDegrees(60))); + super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java new file mode 100644 index 000000000..b102f107e --- /dev/null +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java @@ -0,0 +1,22 @@ +package com.team766.robot.reva.procedures.auton_routines; + +import com.team766.robot.common.procedures.PathSequenceAuto; +import com.team766.robot.reva.Robot; +import com.team766.robot.reva.procedures.StartAutoIntake; +import com.team766.robot.reva.procedures.ShootAtSubwoofer; +import com.team766.robot.reva.procedures.ShootNow; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; + +public class ThreePieceStartCenterTopAndAmp extends PathSequenceAuto { + public ThreePieceStartCenterTopAndAmp() { + super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); + addProcedure(new ShootAtSubwoofer()); + addProcedure(new StartAutoIntake()); + addPath("Middle Start to Middle Piece"); + addProcedure(new ShootNow()); + addProcedure(new StartAutoIntake()); + addPath("Middle Piece to Top Piece"); + addProcedure(new ShootNow()); + } +} From 77d10e76d062670121290d2d1b57565f4a9c97a3 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 18:00:19 -0700 Subject: [PATCH 12/27] slight path tweaks --- .pathplanner/settings.json | 4 ++-- .../paths/Amp Side Start to Top Piece.path | 8 ++++---- .../paths/Bottom Piece to Top Piece.path | 8 ++++---- .../paths/Bottom Start to Bottom Piece.path | 8 ++++---- .../paths/Fast Top Piece to Middle Piece.path | 8 ++++---- .../paths/Middle Piece to Bottom Piece.path | 18 ++++++++++++------ .../paths/Middle Piece to Top Piece.path | 10 +++++----- .../paths/Top Piece to Bottom Piece.path | 2 +- .../paths/Top Piece to Middle Piece.path | 6 +++--- .../auton_routines/FourPieceAmpSide.java | 2 +- .../auton_routines/ThreePieceAmpSide.java | 2 +- .../ThreePieceStartCenterTopAndAmp.java | 2 +- 12 files changed, 42 insertions(+), 36 deletions(-) diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 2aaab0159..7b5241447 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -1,6 +1,6 @@ { - "robotWidth": 0.9, - "robotLength": 0.9, + "robotWidth": 0.97, + "robotLength": 0.97, "holonomicMode": true, "pathFolders": [], "autoFolders": [], diff --git a/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path b/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path index f9f37ed86..6a8d4acd8 100644 --- a/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path +++ b/src/main/deploy/pathplanner/paths/Amp Side Start to Top Piece.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 0.7231553213106429, - "y": 6.6810394500418635 + "x": 0.7128224395337682, + "y": 6.718986067601764 }, "prevControl": null, "nextControl": { - "x": 1.912268106943622, - "y": 6.38037634408602 + "x": 1.988042573307369, + "y": 6.3556130584483395 }, "isLocked": false, "linkedName": "Amp Side Start" diff --git a/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path b/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path index 905590d57..eff662fa6 100644 --- a/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path +++ b/src/main/deploy/pathplanner/paths/Bottom Piece to Top Piece.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.6321255373992227, - "y": 4.231077550118064 + "x": 2.496610386739292, + "y": 4.342898333944817 }, "prevControl": null, "nextControl": { - "x": 2.1686898512685917, - "y": 4.780086124987065 + "x": 2.033174700608661, + "y": 4.891906908813818 }, "isLocked": false, "linkedName": "Bottom Piece" diff --git a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path index 7e36b2a26..a5b46ce94 100644 --- a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path +++ b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 2.6321255373992227, - "y": 4.231077550118064 + "x": 2.496610386739292, + "y": 4.342898333944817 }, "prevControl": { - "x": 2.0118557088955766, - "y": 4.191705707490613 + "x": 1.876340558235646, + "y": 4.303526491317366 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path b/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path index 7acb4f94d..a84df010c 100644 --- a/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path +++ b/src/main/deploy/pathplanner/paths/Fast Top Piece to Middle Piece.path @@ -8,8 +8,8 @@ }, "prevControl": null, "nextControl": { - "x": 2.7727477445695636, - "y": 6.834904373512451 + "x": 2.729397148609112, + "y": 6.803430653157602 }, "isLocked": false, "linkedName": "Top Piece" @@ -30,8 +30,8 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.6, - "rotationDegrees": -52.571672837394004, + "waypointRelativePos": 0.5, + "rotationDegrees": -60.80632561397451, "rotateFast": true } ], diff --git a/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path b/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path index 9a931b82b..d1dd16bbd 100644 --- a/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path +++ b/src/main/deploy/pathplanner/paths/Middle Piece to Bottom Piece.path @@ -16,19 +16,25 @@ }, { "anchor": { - "x": 2.6321255373992227, - "y": 4.231077550118064 + "x": 2.496610386739292, + "y": 4.342898333944817 }, "prevControl": { - "x": 2.237100654756865, - "y": 4.471703049887583 + "x": 1.9195723854410676, + "y": 4.741189357378715 }, "nextControl": null, "isLocked": false, "linkedName": "Bottom Piece" } ], - "rotationTargets": [], + "rotationTargets": [ + { + "waypointRelativePos": 0.7, + "rotationDegrees": -45.0, + "rotateFast": true + } + ], "constraintZones": [ { "name": "Don't Smash Stage", @@ -52,7 +58,7 @@ "goalEndState": { "velocity": 0, "rotation": -31.5, - "rotateFast": true + "rotateFast": false }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path index 3b773f88f..5596aedb1 100644 --- a/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path +++ b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path @@ -8,8 +8,8 @@ }, "prevControl": null, "nextControl": { - "x": 2.221304410198268, - "y": 6.166889505079905 + "x": 2.087630175260351, + "y": 6.068964665707109 }, "isLocked": false, "linkedName": "Middle Piece" @@ -20,8 +20,8 @@ "y": 6.9776644182918 }, "prevControl": { - "x": 2.453853634555976, - "y": 6.883777716634106 + "x": 2.6331350718256994, + "y": 6.696420003951119 }, "nextControl": null, "isLocked": false, @@ -31,7 +31,7 @@ "rotationTargets": [ { "waypointRelativePos": 0.5, - "rotationDegrees": 53.054260493817424, + "rotationDegrees": 59.93497852372517, "rotateFast": true } ], diff --git a/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path b/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path index 344e6378e..db515a58e 100644 --- a/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path +++ b/src/main/deploy/pathplanner/paths/Top Piece to Bottom Piece.path @@ -31,7 +31,7 @@ "rotationTargets": [ { "waypointRelativePos": 0.85, - "rotationDegrees": -45.62973422076138, + "rotationDegrees": -58.618005410603416, "rotateFast": true } ], diff --git a/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path b/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path index 746330eea..4af7909de 100644 --- a/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path +++ b/src/main/deploy/pathplanner/paths/Top Piece to Middle Piece.path @@ -33,11 +33,11 @@ { "anchor": { "x": 2.7642557785115573, - "y": 5.544778760853818 + "y": 5.55 }, "prevControl": { "x": 2.7767858822754685, - "y": 5.536821254198064 + "y": 5.542042493344246 }, "nextControl": null, "isLocked": false, @@ -47,7 +47,7 @@ "rotationTargets": [ { "waypointRelativePos": 0.85, - "rotationDegrees": -62.253982514217135, + "rotationDegrees": -69.25629836674636, "rotateFast": true } ], diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index aaa17205d..78f0585c5 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -10,7 +10,7 @@ public class FourPieceAmpSide extends PathSequenceAuto { public FourPieceAmpSide() { - super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); + super(Robot.drive, new Pose2d(0.71, 6.72, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index e7dc10f6b..5730e4190 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -10,7 +10,7 @@ public class ThreePieceAmpSide extends PathSequenceAuto { public ThreePieceAmpSide() { - super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); + super(Robot.drive, new Pose2d(0.71, 6.72, Rotation2d.fromDegrees(60))); addProcedure(new ShootAtSubwoofer()); addProcedure(new StartAutoIntake()); addPath("Amp Side Start to Top Piece"); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java index b102f107e..16cf69a62 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java @@ -10,7 +10,7 @@ public class ThreePieceStartCenterTopAndAmp extends PathSequenceAuto { public ThreePieceStartCenterTopAndAmp() { - super(Robot.drive, new Pose2d(0.78, 6.72, Rotation2d.fromDegrees(60))); + super(Robot.drive, new Pose2d(1.35, 5.55, Rotation2d.fromDegrees(0))); addProcedure(new ShootAtSubwoofer()); addProcedure(new StartAutoIntake()); addPath("Middle Start to Middle Piece"); From 4d733aee9a983909ab7c7c84e953052866d357db Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 18:56:28 -0700 Subject: [PATCH 13/27] spotless --- src/main/java/com/team766/robot/reva/AutonomousModes.java | 4 +++- src/main/java/com/team766/robot/reva/DriverOI.java | 5 ----- .../reva/procedures/auton_routines/FourPieceAmpSide.java | 2 +- .../reva/procedures/auton_routines/ThreePieceAmpSide.java | 2 +- .../auton_routines/ThreePieceStartCenterTopAndAmp.java | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index e7578a3ff..df12c6ab8 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -17,6 +17,8 @@ public class AutonomousModes { // new AutonomousMode("DriveSlow", () -> new DriveStraight(0.4)), new AutonomousMode("3 Piece Amp Side", () -> new ThreePieceAmpSide()), new AutonomousMode("4 Piece Amp Side", () -> new FourPieceAmpSide()), - new AutonomousMode("3 Piece Center Start Center and Top", () -> new ThreePieceStartCenterTopAndAmp()) + new AutonomousMode( + "3 Piece Center Start Center and Top", + () -> new ThreePieceStartCenterTopAndAmp()) }; } diff --git a/src/main/java/com/team766/robot/reva/DriverOI.java b/src/main/java/com/team766/robot/reva/DriverOI.java index ca8f52d32..0423d2287 100644 --- a/src/main/java/com/team766/robot/reva/DriverOI.java +++ b/src/main/java/com/team766/robot/reva/DriverOI.java @@ -76,11 +76,6 @@ protected void handlePre() { * ControlConstants.MAX_ROTATIONAL_VELOCITY; // For steer } - @Override - protected void handleOI(Context context) { - - } - @Override protected void handleOI(Context context) { diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java index 78f0585c5..8a76dc8a9 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/FourPieceAmpSide.java @@ -2,9 +2,9 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; -import com.team766.robot.reva.procedures.StartAutoIntake; import com.team766.robot.reva.procedures.ShootAtSubwoofer; import com.team766.robot.reva.procedures.ShootNow; +import com.team766.robot.reva.procedures.StartAutoIntake; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java index 5730e4190..e01d272e1 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceAmpSide.java @@ -2,9 +2,9 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; -import com.team766.robot.reva.procedures.StartAutoIntake; import com.team766.robot.reva.procedures.ShootAtSubwoofer; import com.team766.robot.reva.procedures.ShootNow; +import com.team766.robot.reva.procedures.StartAutoIntake; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java index 16cf69a62..236a7f34c 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceStartCenterTopAndAmp.java @@ -2,9 +2,9 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; -import com.team766.robot.reva.procedures.StartAutoIntake; import com.team766.robot.reva.procedures.ShootAtSubwoofer; import com.team766.robot.reva.procedures.ShootNow; +import com.team766.robot.reva.procedures.StartAutoIntake; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; From 677b025df21ae7a70d72811e76f193dce6fa61e2 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 19:09:59 -0700 Subject: [PATCH 14/27] updated path --- .../paths/Fast Middle Piece to Top Piece.path | 55 +++++++++++++++++++ .../paths/Middle Piece to Top Piece.path | 12 ++-- 2 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 src/main/deploy/pathplanner/paths/Fast Middle Piece to Top Piece.path diff --git a/src/main/deploy/pathplanner/paths/Fast Middle Piece to Top Piece.path b/src/main/deploy/pathplanner/paths/Fast Middle Piece to Top Piece.path new file mode 100644 index 000000000..5596aedb1 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Fast Middle Piece to Top Piece.path @@ -0,0 +1,55 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 2.7642557785115573, + "y": 5.544778760853818 + }, + "prevControl": null, + "nextControl": { + "x": 2.087630175260351, + "y": 6.068964665707109 + }, + "isLocked": false, + "linkedName": "Middle Piece" + }, + { + "anchor": { + "x": 2.8691879744870605, + "y": 6.9776644182918 + }, + "prevControl": { + "x": 2.6331350718256994, + "y": 6.696420003951119 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Top Piece" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.5, + "rotationDegrees": 59.93497852372517, + "rotateFast": true + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 31.5, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": null, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path index 5596aedb1..6a260377e 100644 --- a/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path +++ b/src/main/deploy/pathplanner/paths/Middle Piece to Top Piece.path @@ -8,8 +8,8 @@ }, "prevControl": null, "nextControl": { - "x": 2.087630175260351, - "y": 6.068964665707109 + "x": 2.1919685274555736, + "y": 5.721625438621247 }, "isLocked": false, "linkedName": "Middle Piece" @@ -20,8 +20,8 @@ "y": 6.9776644182918 }, "prevControl": { - "x": 2.6331350718256994, - "y": 6.696420003951119 + "x": 2.676901358432347, + "y": 6.4491434538424635 }, "nextControl": null, "isLocked": false, @@ -30,8 +30,8 @@ ], "rotationTargets": [ { - "waypointRelativePos": 0.5, - "rotationDegrees": 59.93497852372517, + "waypointRelativePos": 0.65, + "rotationDegrees": 70.08786468033425, "rotateFast": true } ], From 288d9bf17bfb2d177a3aae4e345ee307bd9ef08d Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 19:51:11 -0700 Subject: [PATCH 15/27] Added midfield autons --- .../Bottom Midfield to Bottom Start.path | 71 +++++++++++++++ ...h => Bottom Start to Bottom Midfield.path} | 38 +------- .../paths/Bottom Start to Bottom Piece.path | 2 +- .../Retrieve Top Midfield from Top Piece.path | 90 +++++++++++++++++++ .../team766/robot/reva/AutonomousModes.java | 10 ++- .../ThreePieceMidfieldAmpSide.java | 22 +++++ .../TwoPieceMidfieldSourceSide.java | 20 +++++ 7 files changed, 214 insertions(+), 39 deletions(-) create mode 100644 src/main/deploy/pathplanner/paths/Bottom Midfield to Bottom Start.path rename src/main/deploy/pathplanner/paths/{Bottom Start to Bottom Midfield and Back.path => Bottom Start to Bottom Midfield.path} (68%) create mode 100644 src/main/deploy/pathplanner/paths/Retrieve Top Midfield from Top Piece.path create mode 100644 src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java create mode 100644 src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java diff --git a/src/main/deploy/pathplanner/paths/Bottom Midfield to Bottom Start.path b/src/main/deploy/pathplanner/paths/Bottom Midfield to Bottom Start.path new file mode 100644 index 000000000..9606978b7 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Bottom Midfield to Bottom Start.path @@ -0,0 +1,71 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 8.214257072032662, + "y": 0.7568538979670562 + }, + "prevControl": null, + "nextControl": { + "x": 6.569428569412694, + "y": 0.762851720147885 + }, + "isLocked": false, + "linkedName": "Bottom Midfield" + }, + { + "anchor": { + "x": 3.263143938324914, + "y": 0.7568538979670562 + }, + "prevControl": { + "x": 6.679111515630439, + "y": 0.5865395017827079 + }, + "nextControl": { + "x": 1.184384913527094, + "y": 0.860497325519864 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 0.7132975145579924, + "y": 4.40352978391142 + }, + "prevControl": { + "x": 0.9196582282053455, + "y": 3.2139419232542177 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Bottom Start" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 1.3, + "rotationDegrees": 0, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": -60.0, + "rotateFast": true + }, + "reversed": false, + "folder": null, + "previewStartingState": null, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield.path similarity index 68% rename from src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path rename to src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield.path index 322346ef5..00198e012 100644 --- a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield and Back.path +++ b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Midfield.path @@ -8,7 +8,7 @@ }, "prevControl": null, "nextControl": { - "x": 0.7139507427163005, + "x": 0.7139507427163004, "y": 3.9251886188957568 }, "isLocked": false, @@ -39,41 +39,9 @@ "x": 7.759606904612749, "y": 1.1302501893122792 }, - "nextControl": { - "x": 8.548531735952361, - "y": 0.48231991834354104 - }, - "isLocked": false, - "linkedName": "Bottom Midfield" - }, - { - "anchor": { - "x": 2.2572913432863904, - "y": 1.0581702320812059 - }, - "prevControl": { - "x": 3.286422614511896, - "y": 0.5297680363879256 - }, - "nextControl": { - "x": 1.40343002029556, - "y": 1.4965809679134259 - }, - "isLocked": false, - "linkedName": null - }, - { - "anchor": { - "x": 0.7132975145579924, - "y": 4.40352978391142 - }, - "prevControl": { - "x": 1.0087347952473684, - "y": 2.9745634954232876 - }, "nextControl": null, "isLocked": false, - "linkedName": "Bottom Start" + "linkedName": "Bottom Midfield" } ], "rotationTargets": [ @@ -88,7 +56,7 @@ "rotateFast": false }, { - "waypointRelativePos": 2.8, + "waypointRelativePos": 2, "rotationDegrees": 0, "rotateFast": false } diff --git a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path index a5b46ce94..47c2e6e47 100644 --- a/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path +++ b/src/main/deploy/pathplanner/paths/Bottom Start to Bottom Piece.path @@ -8,7 +8,7 @@ }, "prevControl": null, "nextControl": { - "x": 1.7176655001447887, + "x": 1.717665500144788, "y": 4.387436617470951 }, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Retrieve Top Midfield from Top Piece.path b/src/main/deploy/pathplanner/paths/Retrieve Top Midfield from Top Piece.path new file mode 100644 index 000000000..a47393bc0 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Retrieve Top Midfield from Top Piece.path @@ -0,0 +1,90 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 2.8691879744870605, + "y": 6.9776644182918 + }, + "prevControl": null, + "nextControl": { + "x": 3.948677198273418, + "y": 7.253148547960372 + }, + "isLocked": false, + "linkedName": "Top Piece" + }, + { + "anchor": { + "x": 6.129687250113633, + "y": 7.41402082804109 + }, + "prevControl": { + "x": 5.435674451486059, + "y": 7.413758998171294 + }, + "nextControl": { + "x": 7.3889329861976965, + "y": 7.414495903065314 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.324593246407106, + "y": 7.279871518075803 + }, + "prevControl": { + "x": 8.628401422766833, + "y": 7.608855830165738 + }, + "nextControl": { + "x": 7.95195627428131, + "y": 6.876354669375438 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.8691879744870605, + "y": 6.9776644182918 + }, + "prevControl": { + "x": 3.4604485343229965, + "y": 6.996875264583863 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "Top Piece" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 2.6, + "rotationDegrees": 0, + "rotateFast": true + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 31.5, + "rotateFast": true + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 31.5, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index df12c6ab8..16f3bc951 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -3,7 +3,9 @@ import com.team766.framework.AutonomousMode; import com.team766.robot.reva.procedures.auton_routines.FourPieceAmpSide; import com.team766.robot.reva.procedures.auton_routines.ThreePieceAmpSide; +import com.team766.robot.reva.procedures.auton_routines.ThreePieceMidfieldAmpSide; import com.team766.robot.reva.procedures.auton_routines.ThreePieceStartCenterTopAndAmp; +import com.team766.robot.reva.procedures.auton_routines.TwoPieceMidfieldSourceSide; public class AutonomousModes { public static final AutonomousMode[] AUTONOMOUS_MODES = @@ -15,10 +17,12 @@ public class AutonomousModes { // define one or more different autonomous modes with it like this: // new AutonomousMode("DriveFast", () -> new DriveStraight(1.0)), // new AutonomousMode("DriveSlow", () -> new DriveStraight(0.4)), - new AutonomousMode("3 Piece Amp Side", () -> new ThreePieceAmpSide()), - new AutonomousMode("4 Piece Amp Side", () -> new FourPieceAmpSide()), + new AutonomousMode("3p Start Amp, Amp and Center Pieces", () -> new ThreePieceAmpSide()), + new AutonomousMode("4p Start Amp, All Close Pieces", () -> new FourPieceAmpSide()), + new AutonomousMode("2p Start Source, Bottom Midfield Piece", () -> new TwoPieceMidfieldSourceSide()), + new AutonomousMode("3p Start Amp, Amp and Top Midfield Pieces", () -> new ThreePieceMidfieldAmpSide()), new AutonomousMode( - "3 Piece Center Start Center and Top", + "3p Start Center, Amp and Center Pieces", () -> new ThreePieceStartCenterTopAndAmp()) }; } diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java new file mode 100644 index 000000000..1b6a87770 --- /dev/null +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/ThreePieceMidfieldAmpSide.java @@ -0,0 +1,22 @@ +package com.team766.robot.reva.procedures.auton_routines; + +import com.team766.robot.common.procedures.PathSequenceAuto; +import com.team766.robot.reva.Robot; +import com.team766.robot.reva.procedures.ShootAtSubwoofer; +import com.team766.robot.reva.procedures.ShootNow; +import com.team766.robot.reva.procedures.StartAutoIntake; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; + +public class ThreePieceMidfieldAmpSide extends PathSequenceAuto { + public ThreePieceMidfieldAmpSide() { + super(Robot.drive, new Pose2d(0.71, 6.72, Rotation2d.fromDegrees(60))); + addProcedure(new ShootAtSubwoofer()); + addProcedure(new StartAutoIntake()); + addPath("Amp Side Start to Top Piece"); + addProcedure(new ShootNow()); + addProcedure(new StartAutoIntake()); + addPath("Retrieve Top Midfield from Top Piece"); + addProcedure(new ShootNow()); + } +} diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java new file mode 100644 index 000000000..9b8a91d03 --- /dev/null +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java @@ -0,0 +1,20 @@ +package com.team766.robot.reva.procedures.auton_routines; + +import com.team766.robot.common.procedures.PathSequenceAuto; +import com.team766.robot.reva.Robot; +import com.team766.robot.reva.procedures.ShootAtSubwoofer; +import com.team766.robot.reva.procedures.ShootNow; +import com.team766.robot.reva.procedures.StartAutoIntake; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; + +public class TwoPieceMidfieldSourceSide extends PathSequenceAuto { + public TwoPieceMidfieldSourceSide() { + super(Robot.drive, new Pose2d(0.71, 4.40, Rotation2d.fromDegrees(-60))); + addProcedure(new ShootAtSubwoofer()); + addProcedure(new StartAutoIntake()); + addPath("Bottom Start to Bottom Midfield"); // moves to midfield position + addPath("Bottom Midfield to Bottom Start"); // moves to subwoofer scoring position + addProcedure(new ShootAtSubwoofer()); + } +} From d3d8094caf5a92240354790a7bee64cee5e4607b Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 19:57:04 -0700 Subject: [PATCH 16/27] increased moveClimbersToBottom speed --- .../com/team766/robot/reva/procedures/MoveClimbersToBottom.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java index 87eaa4c83..18d05231b 100644 --- a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java +++ b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java @@ -7,7 +7,7 @@ public class MoveClimbersToBottom extends Procedure { public void run(Context context) { context.takeOwnership(Robot.climber); - Robot.climber.setPower(0.25); + Robot.climber.setPower(0.40); context.waitFor(() -> Robot.climber.isLeftAtBottom() && Robot.climber.isRightAtBottom()); Robot.climber.stop(); } From fb39f2bd1ea9221fae3388610942c9fcdd506e57 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Tue, 2 Apr 2024 20:05:14 -0700 Subject: [PATCH 17/27] slightly decreased the intake feeding time into shooter for auton --- .../team766/robot/reva/procedures/ShootVelocityAndIntake.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index 756396ade..fdd9dd1e0 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -23,7 +23,7 @@ public void run(Context context) { context.waitForConditionOrTimeout(Robot.shooter::isCloseToExpectedSpeed, 1.5); new IntakeIn().run(context); - context.waitForSeconds(1.5); + context.waitForSeconds(1.2); new IntakeStop().run(context); Robot.lights.signalFinishedShootingProcedure(); From 21ac302f375613f6cdf2ac36bde05299440b1d4d Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:28:43 -0700 Subject: [PATCH 18/27] lowered climber speed back down, since it doesn't actually slow down the auton --- .../com/team766/robot/reva/procedures/MoveClimbersToBottom.java | 2 +- .../team766/robot/reva/procedures/ShootVelocityAndIntake.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java index 18d05231b..5c4946edf 100644 --- a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java +++ b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java @@ -7,7 +7,7 @@ public class MoveClimbersToBottom extends Procedure { public void run(Context context) { context.takeOwnership(Robot.climber); - Robot.climber.setPower(0.40); + Robot.climber.setPower(0.30); context.waitFor(() -> Robot.climber.isLeftAtBottom() && Robot.climber.isRightAtBottom()); Robot.climber.stop(); } diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index fdd9dd1e0..f2608aa11 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -23,7 +23,7 @@ public void run(Context context) { context.waitForConditionOrTimeout(Robot.shooter::isCloseToExpectedSpeed, 1.5); new IntakeIn().run(context); - context.waitForSeconds(1.2); + context.waitForSeconds(1.1); new IntakeStop().run(context); Robot.lights.signalFinishedShootingProcedure(); From 75f17c46b2c2588831e515cd7295092e2e0021cc Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:31:49 -0700 Subject: [PATCH 19/27] moved prox sensor threshold into a constant we should increase to above 200 --- src/main/java/com/team766/robot/reva/mechanisms/Intake.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java index b1016b7a9..58ef58ad2 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java @@ -35,6 +35,7 @@ private record IntakePosition(double intakePower, double proximityValue) {} private static final double CURRENT_LIMIT = 30.0; // a little lower than max efficiency private static final double MAX_POWER = 1.0; private static final double MIN_POWER = -1 * MAX_POWER; + private static final double IS_CLOSE_THRESHOLD = 200; // This should be the amount that getRange() should return less than for a note to be classified // as in @@ -111,7 +112,7 @@ private boolean isNoteReady() { } public boolean isNoteClose() { - return (200) > sensor.getRange() && sensor.isRangeValid(); + return (IS_CLOSE_THRESHOLD) > sensor.getRange() && sensor.isRangeValid(); } public boolean hasNoteInIntake() { From 558ab50b37c956766588cb56b9962583059a0bcd Mon Sep 17 00:00:00 2001 From: Leek <134633159+Leek865@users.noreply.github.com> Date: Wed, 3 Apr 2024 18:26:11 -0700 Subject: [PATCH 20/27] Added minimal changes for shooter assist. --- src/main/java/com/team766/robot/reva/BoxOpOI.java | 10 +++++++--- .../com/team766/robot/reva/mechanisms/Shooter.java | 7 ++++++- .../com/team766/robot/reva/mechanisms/Shoulder.java | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/BoxOpOI.java b/src/main/java/com/team766/robot/reva/BoxOpOI.java index a5e396c7c..4d1ee9ed8 100644 --- a/src/main/java/com/team766/robot/reva/BoxOpOI.java +++ b/src/main/java/com/team766/robot/reva/BoxOpOI.java @@ -100,14 +100,18 @@ protected void handleOI(Context context) { shoulder.rotate(ShoulderPosition.SHOOT_LOW); context.releaseOwnership(shoulder); } else if (gamepad.getButtonPressed(InputConstants.XBOX_X)) { - // other shoot pos + // amp shot context.takeOwnership(shoulder); shoulder.rotate(ShoulderPosition.AMP); context.releaseOwnership(shoulder); } else if (gamepad.getButtonPressed(InputConstants.XBOX_Y)) { - // amp shot + // shooter assist context.takeOwnership(shoulder); - shoulder.rotate(ShoulderPosition.TOP); + shoulder.rotate(ShoulderPosition.SHOOTER_ASSIST); + // Checks if the shooter is moving. + if (shooter.hasTargetSpeed()) { + shooter.shoot(Shooter.SHOOTER_ASSIST_SPEED); + } context.releaseOwnership(shoulder); } else if (gamepad.getPOV() == 0) { context.takeOwnership(shoulder); diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index 169f475e2..6d0125daa 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -12,8 +12,9 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Shooter extends Mechanism { - private static final double DEFAULT_SPEED = + public static final double DEFAULT_SPEED = 4800.0; // motor shaft rps, does not take gearing into account + public static final double SHOOTER_ASSIST_SPEED = 4000.0; private static final double NUDGE_INCREMENT = 100.0; private static final double CURRENT_LIMIT = 40.0; // needs tuning private static final double MAX_SPEED = 5600.0; // spec is 6000.0 @@ -58,6 +59,10 @@ private double getShooterSpeedBottom() { return shooterMotorBottom.getSensorVelocity(); } + public boolean hasTargetSpeed() { + return targetSpeed > 0; + } + public void shoot(double speed) { targetSpeed = com.team766.math.Math.clamp(speed, MIN_SPEED, MAX_SPEED); shoot(); diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java index 13c0fbbc6..bcdc0bafe 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java @@ -21,6 +21,7 @@ public enum ShoulderPosition { BOTTOM(0), INTAKE_FLOOR(0), SHOOT_LOW(15), + SHOOTER_ASSIST(18.339), SHOOT_MEDIUM(30), SHOOT_HIGH(80), AMP(90), From 01365d655b4f37b95a2c4d4c78106b89a62f51af Mon Sep 17 00:00:00 2001 From: Leek <134633159+Leek865@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:07:16 -0700 Subject: [PATCH 21/27] Added some comments. --- src/main/java/com/team766/robot/reva/BoxOpOI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/BoxOpOI.java b/src/main/java/com/team766/robot/reva/BoxOpOI.java index 4d1ee9ed8..6169ec982 100644 --- a/src/main/java/com/team766/robot/reva/BoxOpOI.java +++ b/src/main/java/com/team766/robot/reva/BoxOpOI.java @@ -108,7 +108,8 @@ protected void handleOI(Context context) { // shooter assist context.takeOwnership(shoulder); shoulder.rotate(ShoulderPosition.SHOOTER_ASSIST); - // Checks if the shooter is moving. + // Currently it will only modify the speed if the right trigger is already held. + // TODO: Make this more tolerant for when Y is pressed before right trigger. if (shooter.hasTargetSpeed()) { shooter.shoot(Shooter.SHOOTER_ASSIST_SPEED); } From de17ba2a3e99100aad3c3dcdbfedc0c7a5846d9f Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:07:40 -0700 Subject: [PATCH 22/27] reverted changes --- .../java/com/team766/robot/reva/AutonomousModes.java | 11 ++++++++--- .../com/team766/robot/reva/mechanisms/Shooter.java | 5 ++--- .../com/team766/robot/reva/mechanisms/Shoulder.java | 5 ++--- .../robot/reva/procedures/MoveClimbersToBottom.java | 2 +- .../robot/reva/procedures/ShootVelocityAndIntake.java | 4 +++- .../auton_routines/TwoPieceMidfieldSourceSide.java | 1 - 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/AutonomousModes.java b/src/main/java/com/team766/robot/reva/AutonomousModes.java index 16f3bc951..be5ab8bc3 100644 --- a/src/main/java/com/team766/robot/reva/AutonomousModes.java +++ b/src/main/java/com/team766/robot/reva/AutonomousModes.java @@ -17,10 +17,15 @@ public class AutonomousModes { // define one or more different autonomous modes with it like this: // new AutonomousMode("DriveFast", () -> new DriveStraight(1.0)), // new AutonomousMode("DriveSlow", () -> new DriveStraight(0.4)), - new AutonomousMode("3p Start Amp, Amp and Center Pieces", () -> new ThreePieceAmpSide()), + new AutonomousMode( + "3p Start Amp, Amp and Center Pieces", () -> new ThreePieceAmpSide()), new AutonomousMode("4p Start Amp, All Close Pieces", () -> new FourPieceAmpSide()), - new AutonomousMode("2p Start Source, Bottom Midfield Piece", () -> new TwoPieceMidfieldSourceSide()), - new AutonomousMode("3p Start Amp, Amp and Top Midfield Pieces", () -> new ThreePieceMidfieldAmpSide()), + new AutonomousMode( + "2p Start Source, Bottom Midfield Piece", + () -> new TwoPieceMidfieldSourceSide()), + new AutonomousMode( + "3p Start Amp, Amp and Top Midfield Pieces", + () -> new ThreePieceMidfieldAmpSide()), new AutonomousMode( "3p Start Center, Amp and Center Pieces", () -> new ThreePieceStartCenterTopAndAmp()) diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index 169f475e2..62ba0d4b4 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -9,7 +9,6 @@ import com.team766.hal.MotorController.ControlMode; import com.team766.hal.RobotProvider; import com.team766.library.RateLimiter; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Shooter extends Mechanism { private static final double DEFAULT_SPEED = @@ -85,8 +84,8 @@ public void nudgeDown() { public void run() { if (speedUpdated || rateLimiter.next()) { // SmartDashboard.putNumber("[SHOOTER TARGET SPEED]", shouldRun ? targetSpeed : 0.0); - SmartDashboard.putNumber("[SHOOTER TOP MOTOR SPEED]", getShooterSpeedTop()); - SmartDashboard.putNumber("[SHOOTER BOTTOM MOTOR SPEED]", getShooterSpeedBottom()); + // SmartDashboard.putNumber("[SHOOTER TOP MOTOR SPEED]", getShooterSpeedTop()); + // SmartDashboard.putNumber("[SHOOTER BOTTOM MOTOR SPEED]", getShooterSpeedBottom()); // SmartDashboard.putNumber( // "[SHOOTER] Top Motor Current", MotorUtil.getCurrentUsage(shooterMotorTop)); // SmartDashboard.putNumber( diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java index 13c0fbbc6..b936558ae 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shoulder.java @@ -13,7 +13,6 @@ import com.team766.hal.RobotProvider; import com.team766.hal.wpilib.REVThroughBoreDutyCycleEncoder; import com.team766.library.ValueProvider; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Shoulder extends Mechanism { public enum ShoulderPosition { @@ -153,7 +152,7 @@ public void run() { leftMotor.setSensorPosition(convertedPos); encoderInitializationCount++; } - SmartDashboard.putNumber("[SHOULDER] Angle", getAngle()); + // SmartDashboard.putNumber("[SHOULDER] Angle", getAngle()); // SmartDashboard.putNumber("[SHOULDER] Target Angle", targetAngle); // SmartDashboard.putNumber("[SHOULDER] Rotations", getRotations()); // SmartDashboard.putNumber("[SHOULDER] Target Rotations", targetRotations); @@ -170,7 +169,7 @@ public void run() { // SmartDashboard.putNumber( // "[SHOULDER] Right Motor Stator Current", // MotorUtil.getStatorCurrentUsage(rightMotor)); - SmartDashboard.putBoolean("Shoulder at angle", isFinished()); + // SmartDashboard.putBoolean("Shoulder at angle", isFinished()); TalonFX leftTalon = (TalonFX) leftMotor; // SmartDashboard.putNumber("[SHOULDER] ffGain", ffGain.get()); diff --git a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java index 5c4946edf..87eaa4c83 100644 --- a/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java +++ b/src/main/java/com/team766/robot/reva/procedures/MoveClimbersToBottom.java @@ -7,7 +7,7 @@ public class MoveClimbersToBottom extends Procedure { public void run(Context context) { context.takeOwnership(Robot.climber); - Robot.climber.setPower(0.30); + Robot.climber.setPower(0.25); context.waitFor(() -> Robot.climber.isLeftAtBottom() && Robot.climber.isRightAtBottom()); Robot.climber.stop(); } diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index f2608aa11..8bb62aba2 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -23,7 +23,9 @@ public void run(Context context) { context.waitForConditionOrTimeout(Robot.shooter::isCloseToExpectedSpeed, 1.5); new IntakeIn().run(context); - context.waitForSeconds(1.1); + + // FIXME: This should be less than 1.5 seconds + context.waitForSeconds(1.5); new IntakeStop().run(context); Robot.lights.signalFinishedShootingProcedure(); diff --git a/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java index 9b8a91d03..80765b5d7 100644 --- a/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java +++ b/src/main/java/com/team766/robot/reva/procedures/auton_routines/TwoPieceMidfieldSourceSide.java @@ -3,7 +3,6 @@ import com.team766.robot.common.procedures.PathSequenceAuto; import com.team766.robot.reva.Robot; import com.team766.robot.reva.procedures.ShootAtSubwoofer; -import com.team766.robot.reva.procedures.ShootNow; import com.team766.robot.reva.procedures.StartAutoIntake; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; From fbcc3940691f9d64519414198062a265f42bcc71 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:11:47 -0700 Subject: [PATCH 23/27] changed intake feeding time to 1.2 seconds --- .../team766/robot/reva/procedures/ShootVelocityAndIntake.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java index 8bb62aba2..16c3bc6f7 100644 --- a/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java +++ b/src/main/java/com/team766/robot/reva/procedures/ShootVelocityAndIntake.java @@ -24,8 +24,8 @@ public void run(Context context) { new IntakeIn().run(context); - // FIXME: This should be less than 1.5 seconds - context.waitForSeconds(1.5); + // FIXME: change this value back to 1.5s if doesn't intake for long enough + context.waitForSeconds(1.2); new IntakeStop().run(context); Robot.lights.signalFinishedShootingProcedure(); From 4271155ff450e35fd1fa28cd497d2972e2e59060 Mon Sep 17 00:00:00 2001 From: Leek <134633159+Leek865@users.noreply.github.com> Date: Wed, 3 Apr 2024 19:29:07 -0700 Subject: [PATCH 24/27] Changed logic to rely on should run instead of target speed. --- src/main/java/com/team766/robot/reva/BoxOpOI.java | 2 +- src/main/java/com/team766/robot/reva/mechanisms/Shooter.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/team766/robot/reva/BoxOpOI.java b/src/main/java/com/team766/robot/reva/BoxOpOI.java index 6169ec982..9f0a54e16 100644 --- a/src/main/java/com/team766/robot/reva/BoxOpOI.java +++ b/src/main/java/com/team766/robot/reva/BoxOpOI.java @@ -110,7 +110,7 @@ protected void handleOI(Context context) { shoulder.rotate(ShoulderPosition.SHOOTER_ASSIST); // Currently it will only modify the speed if the right trigger is already held. // TODO: Make this more tolerant for when Y is pressed before right trigger. - if (shooter.hasTargetSpeed()) { + if (shooter.getShouldRun()) { shooter.shoot(Shooter.SHOOTER_ASSIST_SPEED); } context.releaseOwnership(shoulder); diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java index 6d0125daa..00cc8e924 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Shooter.java @@ -59,8 +59,8 @@ private double getShooterSpeedBottom() { return shooterMotorBottom.getSensorVelocity(); } - public boolean hasTargetSpeed() { - return targetSpeed > 0; + public boolean getShouldRun() { + return shouldRun; } public void shoot(double speed) { From d32ee62305eea293a11230563c33ff7cf73e159b Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:29:48 -0700 Subject: [PATCH 25/27] commented log --- src/main/java/com/team766/robot/reva/mechanisms/Intake.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java index 58ef58ad2..56e3ab77a 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java @@ -100,7 +100,7 @@ public void nudgeDown() { public void run() { // SmartDashboard.putString("[INTAKE]", state.toString()); - SmartDashboard.putNumber("[INTAKE POWER]", intakePower); + // SmartDashboard.putNumber("[INTAKE POWER]", intakePower); // SmartDashboard.putNumber("[INTAKE] Current", MotorUtil.getCurrentUsage(intakeMotor)); // SmartDashboard.putNumber("Prox Sensor", sensor.getRange()); } From 455578d49ecc0e9af7285c12aecdd197d36e7f66 Mon Sep 17 00:00:00 2001 From: qntmcube <100043837+qntmcube@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:56:19 -0700 Subject: [PATCH 26/27] spotless --- src/main/java/com/team766/robot/reva/mechanisms/Intake.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java index 56e3ab77a..691a6dd49 100644 --- a/src/main/java/com/team766/robot/reva/mechanisms/Intake.java +++ b/src/main/java/com/team766/robot/reva/mechanisms/Intake.java @@ -10,7 +10,6 @@ import com.team766.hal.MotorController; import com.team766.hal.RobotProvider; import com.team766.library.ValueProvider; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class Intake extends Mechanism { From 96a1d0798a2d5a5a90fe82d5800c6fd70239f2d2 Mon Sep 17 00:00:00 2001 From: Debajit Ghosh Date: Thu, 4 Apr 2024 16:14:23 -0700 Subject: [PATCH 27/27] Merge remote-tracking branch 'origin/Better-Auton-Paths' into Shooter-Assist