diff --git a/src/main/deploy/pathplanner/paths/Trench FL-mid-bump-left shot pos.path b/src/main/deploy/pathplanner/paths/Trench FL-mid-bump-left shot pos.path index c36c18a0..1599e356 100644 --- a/src/main/deploy/pathplanner/paths/Trench FL-mid-bump-left shot pos.path +++ b/src/main/deploy/pathplanner/paths/Trench FL-mid-bump-left shot pos.path @@ -68,24 +68,24 @@ "y": 5.5595860927152305 }, "prevControl": { - "x": 5.282624057650272, - "y": 5.542529628143782 + "x": 5.282506242801578, + "y": 5.532923467094039 }, "nextControl": { - "x": 1.9828973509933765, - "y": 5.574105960264898 + "x": 1.1925534950071324, + "y": 5.594108416547789 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 2.9339486754966884, - "y": 5.051390728476821 + "x": 2.809885877318117, + "y": 5.076562054208274 }, "prevControl": { - "x": 2.360413907284768, - "y": 5.305488410596026 + "x": 2.2363511091061965, + "y": 5.33065973632748 }, "nextControl": null, "isLocked": false, @@ -112,7 +112,7 @@ ], "constraintZones": [ { - "name": "Constraints Zone", + "name": "Slow Intake", "minWaypointRelativePos": 0.19021739130434828, "maxWaypointRelativePos": 1.8688693856479086, "constraints": { @@ -123,6 +123,19 @@ "nominalVoltage": 12.0, "unlimited": false } + }, + { + "name": "Faster Over Bump", + "minWaypointRelativePos": 2.764105642256889, + "maxWaypointRelativePos": 3.880552220888336, + "constraints": { + "maxVelocity": 8.0, + "maxAcceleration": 5.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + } } ], "pointTowardsZones": [], diff --git a/src/main/deploy/pathplanner/paths/Trench FR-mid-bump-right shot pos.path b/src/main/deploy/pathplanner/paths/Trench FR-mid-bump-right shot pos.path index 49f1fe27..ea1eef32 100644 --- a/src/main/deploy/pathplanner/paths/Trench FR-mid-bump-right shot pos.path +++ b/src/main/deploy/pathplanner/paths/Trench FR-mid-bump-right shot pos.path @@ -84,8 +84,8 @@ "y": 3.018609271523179 }, "prevControl": { - "x": 2.3967135761589407, - "y": 3.2727069536423845 + "x": 1.7359771754636228, + "y": 2.7993580599144083 }, "nextControl": null, "isLocked": false, @@ -112,8 +112,8 @@ ], "constraintZones": [ { - "name": "Constraints Zone", - "minWaypointRelativePos": 0.19798136645962736, + "name": "Slow Intake", + "minWaypointRelativePos": 0.2, "maxWaypointRelativePos": 1.8688693856479086, "constraints": { "maxVelocity": 2.5, @@ -123,6 +123,19 @@ "nominalVoltage": 12.0, "unlimited": false } + }, + { + "name": "Faster Over Bump", + "minWaypointRelativePos": 2.76, + "maxWaypointRelativePos": 3.88, + "constraints": { + "maxVelocity": 8.0, + "maxAcceleration": 5.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + } } ], "pointTowardsZones": [], diff --git a/src/main/deploy/pathplanner/paths/left 2.5 pass.path b/src/main/deploy/pathplanner/paths/left 2.5 pass.path index 0789cdd9..5e52a302 100644 --- a/src/main/deploy/pathplanner/paths/left 2.5 pass.path +++ b/src/main/deploy/pathplanner/paths/left 2.5 pass.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.9339486754966884, - "y": 5.051390728476821 + "x": 2.809885877318117, + "y": 5.076562054208274 }, "prevControl": null, "nextControl": { - "x": 1.6643285940496975, - "y": 6.549526550648494 + "x": 1.5402657958711259, + "y": 6.574697876379948 }, "isLocked": false, "linkedName": "DRUM-Left Shot pos" diff --git a/src/main/deploy/pathplanner/paths/left shot pos-trench-hairpin-bump-left shot pos.path b/src/main/deploy/pathplanner/paths/left shot pos-trench-hairpin-bump-left shot pos.path index d2b5f6d6..f26c4c0c 100644 --- a/src/main/deploy/pathplanner/paths/left shot pos-trench-hairpin-bump-left shot pos.path +++ b/src/main/deploy/pathplanner/paths/left shot pos-trench-hairpin-bump-left shot pos.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.9339486754966884, - "y": 5.051390728476821 + "x": 2.809885877318117, + "y": 5.076562054208274 }, "prevControl": null, "nextControl": { - "x": 2.454793046357616, - "y": 7.178551324503311 + "x": 2.3307302481790444, + "y": 7.203722650234765 }, "isLocked": false, "linkedName": "DRUM-Left Shot pos" @@ -128,12 +128,12 @@ }, { "anchor": { - "x": 2.9339486754966884, - "y": 5.051390728476821 + "x": 2.809885877318117, + "y": 5.076562054208274 }, "prevControl": { - "x": 2.2587748344370855, - "y": 5.595885761589403 + "x": 1.4642653352353778, + "y": 5.490599144079885 }, "nextControl": null, "isLocked": false, @@ -168,7 +168,7 @@ ], "constraintZones": [ { - "name": "Constraints Zone", + "name": "Slow Intake", "minWaypointRelativePos": 2.6742385131646964, "maxWaypointRelativePos": 5.2, "constraints": { @@ -179,6 +179,19 @@ "nominalVoltage": 12.0, "unlimited": false } + }, + { + "name": "Faster Over Bump", + "minWaypointRelativePos": 5.7671068427370775, + "maxWaypointRelativePos": 6.84, + "constraints": { + "maxVelocity": 8.0, + "maxAcceleration": 5.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + } } ], "pointTowardsZones": [], diff --git a/src/main/deploy/pathplanner/paths/right shot pos-trench-hairpin-bump-right shot pos.path b/src/main/deploy/pathplanner/paths/right shot pos-trench-hairpin-bump-right shot pos.path index 788e4cff..e00fe859 100644 --- a/src/main/deploy/pathplanner/paths/right shot pos-trench-hairpin-bump-right shot pos.path +++ b/src/main/deploy/pathplanner/paths/right shot pos-trench-hairpin-bump-right shot pos.path @@ -132,8 +132,8 @@ "y": 3.018609271523179 }, "prevControl": { - "x": 1.844958609271523, - "y": 2.510413907284768 + "x": 1.3866333808844504, + "y": 2.5923395149786024 }, "nextControl": null, "isLocked": false, @@ -168,7 +168,7 @@ ], "constraintZones": [ { - "name": "Constraints Zone", + "name": "Slow Intake", "minWaypointRelativePos": 2.992256066081573, "maxWaypointRelativePos": 4.9943211151264695, "constraints": { @@ -179,6 +179,19 @@ "nominalVoltage": 12.0, "unlimited": false } + }, + { + "name": "Faster Over Bump", + "minWaypointRelativePos": 6.132052821128415, + "maxWaypointRelativePos": 6.842737094837935, + "constraints": { + "maxVelocity": 8.0, + "maxAcceleration": 5.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + } } ], "pointTowardsZones": [], diff --git a/src/main/java/com/team2813/commands/VariableShooterCommand.java b/src/main/java/com/team2813/commands/VariableShooterCommand.java index 261b347d..5ac7368b 100644 --- a/src/main/java/com/team2813/commands/VariableShooterCommand.java +++ b/src/main/java/com/team2813/commands/VariableShooterCommand.java @@ -14,9 +14,9 @@ public class VariableShooterCommand { // TODO: Tweak the speeds and distance after pinnacles if we have time. private static final AngularVelocity MIN_SPEED = - RotationsPerSecond.of(36); // 2 meters. Hub shot speed. + RotationsPerSecond.of(34); // 2 meters. Hub shot speed. private static final AngularVelocity MAX_SPEED = - RotationsPerSecond.of(55); // 5 meters from hub speed. + RotationsPerSecond.of(52); // 5 meters from hub speed. // Hub to square edge is 1.3 meters based on the HubStatus/Utils calculation . // Get these values off of the /AdvantageKit/RealOutputs/HubStatus/Distance To Our Hub (Meters) @@ -24,7 +24,7 @@ public class VariableShooterCommand { public static final Distance MAX_DIST = Meters.of(5.0); /** - * Calculates the speed to shoot at if between the 1.5/3.1 MIN/MAX distance. + * Calculates the speed to shoot at if between the 2.0/5.0 MIN/MAX distance. * * @param shooter Instance of the shooter class to apply the calculated speed to. * @param distanceSupplier A supplier of the distance from the hub diff --git a/src/main/java/com/team2813/subsystems/shooter/ShooterIOReal.java b/src/main/java/com/team2813/subsystems/shooter/ShooterIOReal.java index edbeca19..d07a2004 100644 --- a/src/main/java/com/team2813/subsystems/shooter/ShooterIOReal.java +++ b/src/main/java/com/team2813/subsystems/shooter/ShooterIOReal.java @@ -15,6 +15,9 @@ public class ShooterIOReal implements ShooterIO { private TalonFX upperRightShooterMotor; private TalonFX lowerRightShooterMotor; + // private Follower rightShooterFollower; + // private Follower leftShooterFollower; + private TalonFX upperLeftShooterMotor; private TalonFX lowerLeftShooterMotor; @@ -31,12 +34,20 @@ public ShooterIOReal() { .getConfigurator() .apply(ShooterConstants.LOWER_RIGHT_SHOOTER_MOTOR_CONFIG); + // rightShooterFollower = + // new Follower(Constants.UPPER_RIGHT_SHOOTER_MOTOR_ID, MotorAlignmentValue.Aligned); + // lowerRightShooterMotor.setControl(rightShooterFollower); + upperLeftShooterMotor = new TalonFX(Constants.UPPER_LEFT_SHOOTER_MOTOR_ID); upperLeftShooterMotor.getConfigurator().apply(ShooterConstants.UPPER_LEFT_SHOOTER_MOTOR_CONFIG); lowerLeftShooterMotor = new TalonFX(Constants.LOWER_LEFT_SHOOTER_MOTOR_ID); lowerLeftShooterMotor.getConfigurator().apply(ShooterConstants.LOWER_LEFT_SHOOTER_MOTOR_CONFIG); + // leftShooterFollower = + // new Follower(Constants.UPPER_LEFT_SHOOTER_MOTOR_ID, MotorAlignmentValue.Aligned); + // lowerLeftShooterMotor.setControl(leftShooterFollower); + shooterVelocityControl = new VelocityVoltage(RotationsPerSecond.of(0)); } @@ -93,8 +104,10 @@ public void setShooterMotorVelocity(AngularVelocity shooterMotorVelocity) { // AngularVelocity converting its value (i.e. Rot/s) to the base unit (rad/s) upperRightShooterSetpoint = shooterMotorVelocity; upperRightShooterMotor.setControl(shooterVelocityControl.withVelocity(shooterMotorVelocity)); + lowerRightShooterMotor.setControl(shooterVelocityControl); // same velocity upperLeftShooterMotor.setControl(shooterVelocityControl); + lowerLeftShooterMotor.setControl(shooterVelocityControl); } @Override