} else {
turret.setFieldRelativeTarget(Rotation2d.fromDegrees(turretSetpoint), turretVelocity - drivetrain.getAngularRate(2));
- boolean shuttling = target != FieldConstants.getHubTranslation().toTranslation2d(); // if we're aiming at the hub, we're not shuttling
+ boolean shuttling = !target.equals(FieldConstants.getHubTranslation().toTranslation2d()); // if we're aiming at the hub, we're not shuttling
// shuttling will move the hood so its angles very close to max (less arch)
if (shuttling) {
static {
// we can be less aggressive: y = 0.65 * (1.34959x + 9.79618)
// will likely be this that requires tuning.
- shooterVelocityMap.put(0.0, 6.2075);
- shooterVelocityMap.put(1.00, 7.475);
- shooterVelocityMap.put(1.49, 7.475);
- shooterVelocityMap.put(2.09, 8.125);
- shooterVelocityMap.put(2.95, 8.775);
- shooterVelocityMap.put(4.07, 10.075);
- shooterVelocityMap.put(5.05, 10.855);
- shooterVelocityMap.put(5.79, 11.7);
- shooterVelocityMap.put(25.0, 28.236);
+ shooterVelocityMap.put(0.0, 9.0);
+ shooterVelocityMap.put(4.0, 12.8);
+ shooterVelocityMap.put(7.6, 19.0);
+
// always shoot at low angle to ground.
- newHoodMap.put(0.0, 80.0);
- newHoodMap.put(1.00, 80.0);
- newHoodMap.put(1.49, 80.0);
- newHoodMap.put(2.09, 80.0);
- newHoodMap.put(2.95, 80.0);
- newHoodMap.put(5.05, 80.0);
- newHoodMap.put(5.79, 80.0);
- newHoodMap.put(4.07, 80.0);
- newHoodMap.put(27.99, 80.0);
+ newHoodMap.put(0.0, 60.0);
+ newHoodMap.put(27.99, 60.0);
}
}