Interface Gate
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
One rejection rule in a source's gate chain.
Gates are per source type, not universal: AprilTag sources declare the 2026 tag-flip,
tilt, height and spin gates; QuestNav declares tracking-loss, jump and time-since-reset gates.
Every gate has a name, and a rejection is recorded under that name. A log then says why
a frame was thrown out, not just that it was. The 2026 Vision.java did this too.
-
Method Summary
Modifier and TypeMethodDescriptioncheck(PoseObservation observation, GateContext context) Checks one observation.static GaterejectIf(String reason, BiPredicate<PoseObservation, GateContext> rejectIf) A named gate: returnsreasonwheneverrejectIfis true.
-
Method Details
-
check
Checks one observation.- Parameters:
observation- the measurement under testcontext- robot state at gating time- Returns:
nullto pass, or the rejection reason (a short, stable string: it becomes a log value that analysis groups by)
-
rejectIf
A named gate: returnsreasonwheneverrejectIfis true.- Parameters:
reason- the rejection reason to logrejectIf- predicate that is true for observations to reject- Returns:
- the gate
-