import frc.robot.subsystems.turret.Turret;
import frc.robot.subsystems.turret.TurretConstants;
import frc.robot.util.PhaseManager;
- import frc.robot.util.ShooterPhysics;
+import frc.robot.util.PhaseManager.CurrentState;
+ import frc.robot.util.ShooterPhysics;
import frc.robot.util.ShooterPhysics.Constraints;
import frc.robot.util.ShooterPhysics.TurretState;
target == FieldConstants.getHubTranslation().toTranslation2d() ?
FieldConstants.getHubTranslation().getZ() : 0.0); // Height of 0 if it's not the hub
- goalState = ShooterPhysics.getShotParams(
+ var goalStateWithT = ShooterPhysics.getShotParamsWithT(
+ Translation2d.kZero,
target3d.minus(lookahead3d),
- 2.0);
+ target == FieldConstants.getHubTranslation().toTranslation2d() ?
+ 2.0 : 3.0);
+ goalState = goalStateWithT.getFirst();
- timeOfFlight = goalState.timeOfFlight();
+ timeOfFlight = goalStateWithT.getSecond();
double offsetX = turretVelocityX * timeOfFlight;
double offsetY = turretVelocityY * timeOfFlight;
lookaheadPose =
import frc.robot.commands.gpm.ReverseMotors;
import frc.robot.constants.Constants;
import frc.robot.subsystems.Climb.LinearClimb;
+ import frc.robot.subsystems.Intake.Intake;
import frc.robot.subsystems.drivetrain.Drivetrain;
+ import frc.robot.subsystems.hood.Hood;
++import frc.robot.subsystems.hood.HoodConstants;
import frc.robot.subsystems.shooter.Shooter;
import frc.robot.subsystems.spindexer.Spindexer;
import frc.robot.subsystems.turret.Turret;