6#include <VirtualRobot/MathTools.h>
23 float angularTh = VirtualRobot::MathTools::deg2rad(2.F);
49 void reset(std::int64_t targetId);
52 void update(std::int64_t targetId,
54 bool targetReachable);
68 mutable std::mutex mutex;
70 std::int64_t activeTargetId = -1;
74 int unreachableCount = 0;
bool unreachable() const
Whether the controller could not reach the target for filterCount consecutive reports.
bool reached() const
Whether the gaze has been on target for filterCount consecutive reports.
void update(std::int64_t targetId, const gaze_controller::GazeResidual &residual, bool targetReachable)
Feed one controller report. Reports about a different target are ignored.
GazeTargetReachedMonitor(const GazeReachedConfig &config)
void reset(std::int64_t targetId)
Begin monitoring another control target, dropping all state about the previous one.
gaze_controller::GazeResidual residual() const
Residual of the most recently accepted report.
How far the gaze currently is from a target.
Thresholds deciding when the gaze counts as fixed on the active target.
float lateralTh
Lateral miss distance below which the target counts as fixated [mm].
int filterCount
Consecutive controller reports required before a decision is taken.
float angularTh
Angular gaze error below which the target counts as fixated [rad].