@@ -28,8 +28,11 @@ public class AimCalc {
2828 private static final double kHubObstacleRadiusMeters = Units .inchesToMeters (41.0 );
2929
3030 // TUNE THESE: The coordinates of the corner in front of the HP station
31- private static final Translation2d kBlueHumanPlayerCorner = new Translation2d (1.6 , 1.45 );
32- private static final Translation2d kRedHumanPlayerCorner = new Translation2d (15 , 6.6 );
31+ private static final Translation2d kBlueHumanPlayerRightCorner = new Translation2d (1.6 , 1.45 );
32+ private static final Translation2d kBlueHumanPlayerLeftCorner = new Translation2d (1.6 , 6.6 );
33+
34+ private static final Translation2d kRedHumanPlayerLeftCorner = new Translation2d (15 , 1.45 );
35+ private static final Translation2d kRedHumanPlayerRightCorner = new Translation2d (15 , 6.6 );
3336
3437 // TUNE THESE: Turret physical soft limits to prevent infinite spinning/wire damage
3538 private static final double kTurretMinAngleDeg = -270.0 ;
@@ -184,7 +187,6 @@ private Rotation2d wrapTurretAngle(Rotation2d rawTargetAngle, Rotation2d current
184187
185188 double currentDeg = currentAngle .getDegrees ();
186189
187- // The turret might have a range > 360. Check which equivalent angle is closest.
188190 double [] possibleAngles = {
189191 normalizedTarget - 360.0 ,
190192 normalizedTarget ,
@@ -205,16 +207,13 @@ private Rotation2d wrapTurretAngle(Rotation2d rawTargetAngle, Rotation2d current
205207 }
206208 }
207209
208- // Fallback constraint just in case all angles are somehow out of bounds
209210 if (minError == Double .MAX_VALUE ) {
210211 bestAngle = MathUtil .clamp (normalizedTarget , kTurretMinAngleDeg , kTurretMaxAngleDeg );
211212 }
212213
213214 return Rotation2d .fromDegrees (bestAngle );
214215 }
215-
216- // Overloaded to maintain backwards compatibility if currentTurretAngle isn't wired yet.
217- // NOTE: Call the other update method to get wrap logic working correctly.
216+
218217 public void update (Pose2d robotPose , ChassisSpeeds fieldSpeeds ) {
219218 update (robotPose , fieldSpeeds , new Rotation2d ());
220219 }
@@ -224,7 +223,7 @@ public void update(Pose2d robotPose, ChassisSpeeds fieldSpeeds, Rotation2d curre
224223 Translation2d hub = FieldPositions .getAllianceHubPose (alliance ).getTranslation ();
225224
226225 Translation2d target = passingMode ?
227- (alliance == DriverStation .Alliance .Blue ? kBlueHumanPlayerCorner : kRedHumanPlayerCorner )
226+ (alliance == DriverStation .Alliance .Blue ? kBlueHumanPlayerRightCorner : kRedHumanPlayerRightCorner )
228227 : hub ;
229228
230229 Translation2d shooterPos = robotPose .getTranslation ().plus (
0 commit comments