17 const bool targetReachable)
21 this->targetReachable.store(targetReachable);
25 this->targetId.store(targetId);
31 const std::scoped_lock lock(targetNameMutex);
33 this->targetNameId = targetId;
34 this->targetName = targetName;
50 if (lastReported.isValid() and
59 status.targetId = targetId.load();
60 status.angularError = angularError.load();
61 status.lateralError = lateralError.load();
62 status.targetReachable = targetReachable.load();
66 const std::scoped_lock lock(targetNameMutex);
69 status.targetName = targetNameId ==
status.targetId ? targetName : std::string();
static DateTime Now()
Current time on the virtual clock.
Represents a point in time.
void report(const GazeControllerStatusListenerPrx &topic)
Publishes the current residual, rate limited.
void update(std::int64_t targetId, const GazeResidual &residual, bool targetReachable)
Called from the control side, at whatever rate it computes the residual.
void setTarget(std::int64_t targetId, const std::string &targetName)
Called from updateConfig(), so a report can name the target it is about.
void toIce(dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
const armarx::Duration GazeControllerStatusPublishInterval
Rate limit for those reports.
Periodic report of the low-level gaze controller's residual.
How far the gaze currently is from a target.
float lateralError
Lateral miss distance at target range [mm].
float angularError
Angle between the gaze ray and the direction to the target [rad].