|
|
Blocks until the gaze is fixed on a requested target. More...
#include <armarx/view_selection/client/GazeTargetWaiter.h>
Classes | |
| struct | Result |
Public Member Functions | |
| void | bind (const std::string &targetName, const armem::MemoryID &gazeTargetID) |
| Narrow the expectation to the exact request snapshot, once the commit returned its ID. | |
| void | expect (const std::string &targetName) |
| Start collecting updates for this target. Call before committing it. | |
| void | forget (const std::string &targetName) |
| Drop an expectation without waiting for it. | |
| GazeTargetWaiter (StatusHandlerInterface &handler) | |
| Result | wait (const std::string &targetName, const armarx::Duration &timeout, const std::function< bool()> &shouldAbort) |
| Block until the target is reached, ends, the abort predicate fires or the timeout expires. | |
Blocks until the gaze is fixed on a requested target.
The analogue of navigation's client::Navigator::waitForStop, with two differences that matter here:
One instance serves a whole client: expectations are keyed by target name, which is also the memory entity name, so concurrently running skills necessarily use distinct keys.
Definition at line 35 of file GazeTargetWaiter.h.
|
explicit |
| void bind | ( | const std::string & | targetName, |
| const armem::MemoryID & | gazeTargetID ) |
Narrow the expectation to the exact request snapshot, once the commit returned its ID.
Definition at line 45 of file GazeTargetWaiter.cpp.
Here is the call graph for this function:| void expect | ( | const std::string & | targetName | ) |
Start collecting updates for this target. Call before committing it.
Definition at line 36 of file GazeTargetWaiter.cpp.
| void forget | ( | const std::string & | targetName | ) |
Drop an expectation without waiting for it.
Definition at line 69 of file GazeTargetWaiter.cpp.
| GazeTargetWaiter::Result wait | ( | const std::string & | targetName, |
| const armarx::Duration & | timeout, | ||
| const std::function< bool()> & | shouldAbort ) |
Block until the target is reached, ends, the abort predicate fires or the timeout expires.
Consumes the expectation.
| timeout | A non-positive duration waits indefinitely. |
| shouldAbort | Polled regularly; typically the skill's shouldSkillTerminate(). |
Definition at line 105 of file GazeTargetWaiter.cpp.
Here is the call graph for this function: