diff --git a/src/main/deploy/pathplanner/paths/a5CollectLoop1.path b/src/main/deploy/pathplanner/paths/a5CollectLoop1.path index 76e8ca7..1096fe3 100644 --- a/src/main/deploy/pathplanner/paths/a5CollectLoop1.path +++ b/src/main/deploy/pathplanner/paths/a5CollectLoop1.path @@ -64,12 +64,12 @@ }, { "anchor": { - "x": 3.1160788509402657, - "y": 5.368689988938053 + "x": 1.6491471930309736, + "y": 5.160050815818583 }, "prevControl": { - "x": 2.8778707569951325, - "y": 5.292815724664674 + "x": 1.4109390990858404, + "y": 5.084176551545204 }, "nextControl": null, "isLocked": false, @@ -92,7 +92,7 @@ ], "constraintZones": [ { - "name": "Constraints Zone", + "name": "Bump", "minWaypointRelativePos": 2.5812305900621126, "maxWaypointRelativePos": 3.46074340062112, "constraints": { @@ -103,6 +103,19 @@ "nominalVoltage": 12.0, "unlimited": false } + }, + { + "name": "Balls", + "minWaypointRelativePos": 0.8571306429548563, + "maxWaypointRelativePos": 2.0904155266757862, + "constraints": { + "maxVelocity": 2.0, + "maxAcceleration": 4.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + } } ], "pointTowardsZones": [ @@ -128,7 +141,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -20.997669311569314 }, "reversed": false, "folder": "T2NZ2TSameAlt", diff --git a/src/main/deploy/pathplanner/paths/a5CollectLoop2.path b/src/main/deploy/pathplanner/paths/a5CollectLoop2.path index fbe035d..355edbf 100644 --- a/src/main/deploy/pathplanner/paths/a5CollectLoop2.path +++ b/src/main/deploy/pathplanner/paths/a5CollectLoop2.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 3.1160788509402657, - "y": 5.368689988938053 + "x": 1.6491471930309736, + "y": 5.160050815818583 }, "prevControl": null, "nextControl": { - "x": 2.9648897262168146, - "y": 6.149950013827433 + "x": 1.4979580683075224, + "y": 5.941310840707963 }, "isLocked": false, "linkedName": "a5LoopShoot" @@ -183,7 +183,7 @@ "folder": "T2NZ2TSameAlt", "idealStartingState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -20.997669311569314 }, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/a6DepotCollect1.path b/src/main/deploy/pathplanner/paths/a6DepotCollect1.path index c59f866..6467b91 100644 --- a/src/main/deploy/pathplanner/paths/a6DepotCollect1.path +++ b/src/main/deploy/pathplanner/paths/a6DepotCollect1.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 3.1160788509402657, - "y": 5.368689988938053 + "x": 1.6491471930309736, + "y": 5.160050815818583 }, "prevControl": null, "nextControl": { - "x": 2.144975974834071, - "y": 6.480037679756637 + "x": 1.5575605987278762, + "y": 6.2590596308075215 }, "isLocked": false, "linkedName": "a5LoopShoot" }, { "anchor": { - "x": 0.682, - "y": 7.15 + "x": 0.694, + "y": 7.215 }, "prevControl": { - "x": 1.496274854811947, - "y": 6.692400511615045 + "x": 1.6562055793694692, + "y": 6.721632155696902 }, "nextControl": null, "isLocked": false, @@ -48,7 +48,7 @@ "folder": "Trench NZ Depot", "idealStartingState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -20.997669311569314 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/a6DepotCollect2.path b/src/main/deploy/pathplanner/paths/a6DepotCollect2.path index 2d6b952..01e3d89 100644 --- a/src/main/deploy/pathplanner/paths/a6DepotCollect2.path +++ b/src/main/deploy/pathplanner/paths/a6DepotCollect2.path @@ -3,45 +3,45 @@ "waypoints": [ { "anchor": { - "x": 0.682, - "y": 7.15 + "x": 0.69, + "y": 7.215 }, "prevControl": null, "nextControl": { - "x": 0.6820000000000002, - "y": 6.15 + "x": 0.6900000000000001, + "y": 6.215 }, "isLocked": false, "linkedName": "CollectDepotStart" }, { "anchor": { - "x": 0.668, + "x": 0.681, "y": 5.6 }, "prevControl": { - "x": 0.668, - "y": 6.209319597164331 + "x": 0.6868338021232893, + "y": 6.209291669269567 }, "nextControl": { - "x": 0.668, - "y": 4.990680402835668 + "x": 0.6774018252212392, + "y": 5.224200843473451 }, "isLocked": false, "linkedName": "CollectDepotInner" }, { "anchor": { - "x": 3.116, - "y": 5.369 + "x": 1.6061278691924783, + "y": 5.283591157356194 }, "prevControl": { - "x": 2.1735160398230096, - "y": 4.853859513274335 + "x": 1.0050093680862835, + "y": 4.967934215984511 }, "nextControl": null, "isLocked": false, - "linkedName": "a5LoopShoot" + "linkedName": null } ], "rotationTargets": [ @@ -89,13 +89,13 @@ "maxVelocity": 3.0, "maxAcceleration": 2.0, "maxAngularVelocity": 540.0, - "maxAngularAcceleration": 720.0, + "maxAngularAcceleration": 450.0, "nominalVoltage": 12.0, "unlimited": false }, "goalEndState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -22.27751144368784 }, "reversed": false, "folder": "Trench NZ Depot", diff --git a/src/main/deploy/pathplanner/paths/a7CollectLoop.path b/src/main/deploy/pathplanner/paths/a7CollectLoop.path index 65eb0bb..493e8c4 100644 --- a/src/main/deploy/pathplanner/paths/a7CollectLoop.path +++ b/src/main/deploy/pathplanner/paths/a7CollectLoop.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 3.1160788509402657, - "y": 5.368689988938053 + "x": 1.6491471930309736, + "y": 5.160050815818583 }, "prevControl": null, "nextControl": { - "x": 3.362907698818017, - "y": 5.328997170250767 + "x": 1.8959760409087252, + "y": 5.120357997131297 }, "isLocked": false, "linkedName": "a5LoopShoot" @@ -186,7 +186,7 @@ "folder": "CooperativeDepot", "idealStartingState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -20.997669311569314 }, "useDefaultConstraints": false } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/a7DepotCollectFast.path b/src/main/deploy/pathplanner/paths/a7DepotCollectFast.path index 1432c13..4002f50 100644 --- a/src/main/deploy/pathplanner/paths/a7DepotCollectFast.path +++ b/src/main/deploy/pathplanner/paths/a7DepotCollectFast.path @@ -3,28 +3,28 @@ "waypoints": [ { "anchor": { - "x": 0.682, - "y": 7.15 + "x": 0.694, + "y": 7.215 }, "prevControl": null, "nextControl": { - "x": 0.6820000000000002, - "y": 6.15 + "x": 0.6940000000000001, + "y": 6.215 }, "isLocked": false, "linkedName": "CollectDepotStart" }, { "anchor": { - "x": 0.668, + "x": 0.681, "y": 5.6 }, "prevControl": { - "x": 0.668, + "x": 0.681, "y": 6.209319597164331 }, "nextControl": { - "x": 0.668, + "x": 0.681, "y": 4.990680402835668 }, "isLocked": false, @@ -32,12 +32,12 @@ }, { "anchor": { - "x": 3.116, - "y": 5.369 + "x": 1.6491471930309736, + "y": 5.160050815818583 }, "prevControl": { - "x": 2.1735160398230096, - "y": 4.853859513274335 + "x": 0.7066632328539829, + "y": 4.644910329092919 }, "nextControl": null, "isLocked": false, @@ -95,7 +95,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -41.42897951526977 + "rotation": -20.997669311569314 }, "reversed": false, "folder": "CooperativeDepot", diff --git a/src/main/deploy/pathplanner/paths/a7StartToCollect.path b/src/main/deploy/pathplanner/paths/a7StartToCollect.path index d4ee0b3..96b34da 100644 --- a/src/main/deploy/pathplanner/paths/a7StartToCollect.path +++ b/src/main/deploy/pathplanner/paths/a7StartToCollect.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 0.682, - "y": 7.15 + "x": 0.694, + "y": 7.215 }, "prevControl": { - "x": 1.6802532288177803, - "y": 6.773093005718346 + "x": 1.6922532288177803, + "y": 6.8380930057183456 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/tuning/arc.json b/src/main/deploy/tuning/arc.json index dc89379..7fc013a 100755 --- a/src/main/deploy/tuning/arc.json +++ b/src/main/deploy/tuning/arc.json @@ -27,22 +27,22 @@ { "distance" : 1.91, - "velocity" : 54.0 + "velocity" : 53.0 }, { "distance" : 2.11, - "velocity" : 56.0 + "velocity" : 55.0 }, { "distance" : 2.3, - "velocity" : 58.0 + "velocity" : 57.0 }, { "distance" : 2.49, - "velocity" : 59.0 + "velocity" : 58.0 } ] }, @@ -52,32 +52,32 @@ { "distance" : 2.7, - "velocity" : 54 + "velocity" : 53 }, { "distance" : 2.9, - "velocity" : 56 + "velocity" : 55 }, { "distance" : 3.16, - "velocity" : 57 + "velocity" : 56 }, { "distance" : 3.35, - "velocity" : 59.0 + "velocity" : 58.0 }, { "distance" : 3.53, - "velocity" : 61.0 + "velocity" : 60.0 }, { "distance" : 3.71, - "velocity" : 63 + "velocity" : 62 } ] }, @@ -87,30 +87,30 @@ { "distance" : 3.90, - "velocity" : 61.0 + "velocity" : 59 }, { "distance" : 4.1, - "velocity" : 63.0 + "velocity" : 61 }, { "distance" : 4.3, - "velocity" : 65 + "velocity" : 63 }, { "distance": 4.5, - "velocity": 67 + "velocity": 65 }, { "distance": 4.8, - "velocity": 69 + "velocity": 67 }, { "distance": 5.4, - "velocity": 75.0 + "velocity": 73.0 } ] }, diff --git a/src/main/java/frc/robot/commands/AutoCommands.java b/src/main/java/frc/robot/commands/AutoCommands.java index c4643a9..a226a95 100644 --- a/src/main/java/frc/robot/commands/AutoCommands.java +++ b/src/main/java/frc/robot/commands/AutoCommands.java @@ -122,7 +122,7 @@ public static Command a5CollectNZ(Drive drive, Shooter shooter, IntakeSubsystem shooter.spinUpForDistanceHoodParked(() -> Meters.of(2)) ), - RobotCommands.shoot(shooter, hopper, intake, drive).withTimeout(shootingLength2) + RobotCommands.shoot(shooter, hopper, intake, drive) ); } @@ -146,7 +146,7 @@ public static Command a6CollectNZDepot(Drive drive, Shooter shooter, IntakeSubsy .until(stopIntake) ), - RobotCommands.shoot(shooter, hopper, intake, drive).withTimeout(shootingLength2) + RobotCommands.shoot(shooter, hopper, intake, drive) ); } diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 07630c9..bb3b744 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -81,6 +81,7 @@ public void setPivotAngle(Angle angle) { public void stopRoller() { io.stopRoller(); + setpointVelocity = RotationsPerSecond.zero(); } /** @@ -94,7 +95,7 @@ private void startIntaking() { * Stops the roller. */ private void stopIntaking() { - io.stopRoller(); + stopRoller(); } private void eject(){ diff --git a/src/main/java/frc/robot/subsystems/shooter/HoodIOServo.java b/src/main/java/frc/robot/subsystems/shooter/HoodIOServo.java index e5494e4..1acf17e 100644 --- a/src/main/java/frc/robot/subsystems/shooter/HoodIOServo.java +++ b/src/main/java/frc/robot/subsystems/shooter/HoodIOServo.java @@ -6,8 +6,8 @@ import edu.wpi.first.wpilibj.Servo; public class HoodIOServo implements HoodIO { - private double leftOffset = 0.0; - private double rightOffset = 1.0; + private double leftOffset = 1.0; + private double rightOffset = 7.0; private Servo hoodLeft; private Servo hoodRight;