commit_and_wait.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <functional>
5
7
9
11{
12 class ViewSelection;
13}
14
16{
17
18 /**
19 * @brief Commit a gaze target, optionally blocking until the robot's gaze is fixed on it.
20 *
21 * Shared by the skills that offer the opt-in blocking mode, so they agree on what counts as
22 * success and on what to do when it does not happen.
23 *
24 * The verdict is "was this target reached at some point", not "is it still the active one": a
25 * target that settled and was then superseded by something more important did what the caller
26 * asked for, and reporting that as a failure would be wrong.
27 *
28 * @param waitTimeout_ms Non-positive waits indefinitely.
29 * @param shouldAbort Polled while waiting; pass the skill's shouldSkillTerminate().
30 */
31 ::armarx::skills::Skill::MainResult
32 commitAndMaybeWait(client::ViewSelection& viewSelection,
33 const gaze_targets::GazeTarget& target,
34 bool waitUntilReached,
35 std::int64_t waitTimeout_ms,
36 const std::function<bool()>& shouldAbort);
37
38} // namespace armarx::view_selection::skills
This file is part of ArmarX.
::armarx::skills::Skill::MainResult commitAndMaybeWait(client::ViewSelection &viewSelection, const gaze_targets::GazeTarget &target, const bool waitUntilReached, const std::int64_t waitTimeout_ms, const std::function< bool()> &shouldAbort)
Commit a gaze target, optionally blocking until the robot's gaze is fixed on it.