GazeTargetStatus.h
Go to the documentation of this file.
1#pragma once
2
3#include <iosfwd>
4#include <string>
5
7
9
11
13{
14 /**
15 * @brief Business Object (BO) class of GazeTargetStatus: the lifecycle of one gaze target
16 * request, as observed and published by the gaze scheduler.
17 *
18 * A request (GazeTarget) is owned by whoever commits it; this status is owned by the scheduler
19 * and lives in its own core segment, keyed the same way. Every transition publishes a new
20 * snapshot carrying all timestamps accumulated so far, so the latest snapshot is the complete
21 * lifecycle and the snapshot history is the event stream.
22 */
24 {
25 public:
26 /// The gaze target request snapshot this status refers to. Disambiguates concurrent
27 /// targets that share an entity name.
29
31
33
35
37
38 /// Most recent preemption, if any.
40
42
44
45 /// Angle between the gaze ray and the direction to the target at the transition [rad].
46 float angularError = 0.F;
47
48 /// Lateral miss distance at target range at the transition [mm].
49 float lateralError = 0.F;
50
51 /// Reason, for the terminal states. Empty otherwise.
52 std::string message;
53
54 /**
55 * @brief Whether the gaze was fixed on this target at some point.
56 *
57 * This is the success criterion, not `status == Reached`: a target that was reached and
58 * then superseded reports Released, and a client that only sees that last snapshot must
59 * still consider its request fulfilled.
60 */
61 bool wasReached() const;
62
63 /// Whether the target has left the scheduler's queue for good.
64 bool isTerminal() const;
65 };
66
67 ::std::ostream& operator<<(::std::ostream& os, const GazeTargetStatus& status);
68
69} // namespace armarx::view_selection::gaze_targets
static DateTime Invalid()
Definition DateTime.cpp:57
Represents a point in time.
Definition DateTime.h:25
Business Object (BO) class of GazeTargetStatus: the lifecycle of one gaze target request,...
bool wasReached() const
Whether the gaze was fixed on this target at some point.
bool isTerminal() const
Whether the target has left the scheduler's queue for good.
std::string message
Reason, for the terminal states. Empty otherwise.
float lateralError
Lateral miss distance at target range at the transition [mm].
armarx::armem::MemoryID gazeTargetID
The gaze target request snapshot this status refers to.
armarx::DateTime preemptedTimestamp
Most recent preemption, if any.
float angularError
Angle between the gaze ray and the direction to the target at the transition [rad].
TargetStatus
The lifecycle state of a gaze target, as observed by the gaze scheduler.
@ Requested
admitted to the scheduler's queue, waiting for scheduling
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)