Skip to content

Commit

Permalink
Scoring believes drive is ready if drive is aligned OR if distance to…
Browse files Browse the repository at this point in the history
… goal is below a threshold
  • Loading branch information
aidnem committed Oct 23, 2024
1 parent d76bebe commit d8fd9a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/constants/ScoringConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class ScoringConstants {
public static final double aimAngleMarginRotations = Units.degreesToRotations(1);
public static final double aimAngleVelocityMargin = 2.0;

public static final double minDistanceAlignmentNeeded = 1.3; // TODO: Tune this value

public static final double intakeAngleToleranceRotations = 0.05; // Todo: tune this value

public static final double aimerAmpPositionRot = 0.14;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ private void prime() {
< aimerAngleTolerance.getValue(distanceToGoal)
&& Math.abs(aimerInputs.aimVelocityErrorRotPerSec)
< ScoringConstants.aimAngleVelocityMargin;
boolean driveReady = driveAlignedSupplier.get();
boolean driveReady =
(driveAlignedSupplier.get()
|| distanceToGoal < ScoringConstants.minDistanceAlignmentNeeded);
boolean fieldLocationReady = true;

if (!DriverStation.getAlliance().isPresent()) {
Expand Down

0 comments on commit d8fd9a3

Please sign in to comment.