}
public TurretAutoShoot(Turret turret, Drivetrain drivetrain, boolean SOTM){
- this(turret, drivetrain, null);
+ this(turret, drivetrain, null, SOTM);
this.SOTM = SOTM;
}
double xVel = chassisSpeed.vxMetersPerSecond;
double yVel = chassisSpeed.vyMetersPerSecond;
- D_y = target.getY() - drivepose.getY() + (Units.secondsToMilliseconds(yVel) * 20); // every periodic predict where the robot will be in one periodic into the future
- D_x = target.getX() - drivepose.getX() + (Units.secondsToMilliseconds(xVel) * 20);
+ D_y = target.getY() - drivepose.getY() + (0.92) * yVel;
+ D_x = target.getX() - drivepose.getX() + (0.92) * xVel;
} else {
D_y = target.getY() - drivepose.getY();
D_x = target.getX() - drivepose.getX();
private TurretIOInputsAutoLogged inputs = new TurretIOInputsAutoLogged();
- private double dV = 2.0;
- private double kP = 10.0;
+ private double dV = 1.0;
+ private double kP = 15.0;
private double kI = 0.0;
private double kD = 0.0;