Skip to content

Conversation

@rokadias
Copy link
Contributor

@rokadias rokadias commented Apr 1, 2025

Only real change here is to use stale in doWeSeeOurTargetTag:

boolean doWeSeeOurTargetTag = targetObservation.isPresent()
                && targetObservation.get().ambiguity() < maxTagAmbiguity.get() && !targetObservation.get().stale();

Relies on: Team488/SeriouslyCommonLib#594

Why are we doing this?

To make sure we are still seeing the tag before moving into ApproachWhileCentering.

Asana task URL:

Whats changing?

Questions/notes for reviewers

How this was tested

  • tested on robot
  • tested in simulator
  • unit tests added

Video/screenshots (from simulator or live robot)


PR feedback legend

Symbol Meaning
⭐ ⭐ ⭐ must be addressed
⭐ ⭐ should be addressed
something to consider, a good idea

@rokadias rokadias requested review from a team and Rongrrz as code owners April 1, 2025 07:33
Optional<AprilTagVisionIO.TargetObservation> targetObservation = aprilTagVisionSubsystem
.getTargetObservation(targetCameraID, targetAprilTagID);
boolean doWeSeeOurTargetTag = targetObservation.isPresent()
&& targetObservation.get().ambiguity() < maxTagAmbiguity.get() && !targetObservation.get().stale();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the only change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rokadias could you disable your formatter when editing this repo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, perhaps:

boolean doWeSeeOurTargetTag = targetObservation
    .map(obs -> obs.ambiguity() < maxTagAmbiguity.get() && !obs.stale())
    .orElse(false);

Copy link
Contributor

@JohnGilb JohnGilb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but see if you can disable your formatter in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants