GazeTargetReachedMonitor Class Reference

Debounces the low-level controller's residual into a "reached" / "unreachable" decision for one control target. More...

#include <armarx/view_selection/gaze_scheduler/GazeTargetReachedMonitor.h>

Public Member Functions

 GazeTargetReachedMonitor (const GazeReachedConfig &config)
 
bool reached () const
 Whether the gaze has been on target for filterCount consecutive reports.
 
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.
 
bool unreachable () const
 Whether the controller could not reach the 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.
 

Detailed Description

Debounces the low-level controller's residual into a "reached" / "unreachable" decision for one control target.

Modelled on navigation's server::GoalReachedMonitor. Reports about any other target are dropped, so a residual still in flight for a superseded target can never be misattributed.

Thread-safe: reports arrive on the topic listener thread, the verdict is read by the scheduler's periodic task.

Definition at line 43 of file GazeTargetReachedMonitor.h.

Constructor & Destructor Documentation

◆ GazeTargetReachedMonitor()

GazeTargetReachedMonitor ( const GazeReachedConfig & config)
explicit

Definition at line 8 of file GazeTargetReachedMonitor.cpp.

Member Function Documentation

◆ reached()

bool reached ( ) const

Whether the gaze has been on target for filterCount consecutive reports.

Definition at line 47 of file GazeTargetReachedMonitor.cpp.

◆ reset()

void reset ( std::int64_t targetId)

Begin monitoring another control target, dropping all state about the previous one.

Definition at line 14 of file GazeTargetReachedMonitor.cpp.

◆ residual()

gaze_controller::GazeResidual residual ( ) const

Residual of the most recently accepted report.

Definition at line 63 of file GazeTargetReachedMonitor.cpp.

+ Here is the caller graph for this function:

◆ unreachable()

bool unreachable ( ) const

Whether the controller could not reach the target for filterCount consecutive reports.

Definition at line 55 of file GazeTargetReachedMonitor.cpp.

◆ update()

void update ( std::int64_t targetId,
const gaze_controller::GazeResidual & residual,
bool targetReachable )

Feed one controller report. Reports about a different target are ignored.

Definition at line 25 of file GazeTargetReachedMonitor.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: