RequestedObjects.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <set>
4 #include <deque>
5 #include <vector>
6 
7 
8 #include <RobotAPI/interface/objectpose/object_pose_types.h>
10 
11 
12 
13 namespace armarx::objpose
14 {
15  /**
16  * @brief Handles requests for object pose estimation from the ObjectPoseProviderInterface.
17  */
19  {
20 
21  public:
22  struct Request
23  {
24  std::vector<armarx::ObjectID> objectIDs;
25  bool infinite = false;
26  };
27  struct Update
28  {
29  std::vector<armarx::ObjectID> added;
30  std::vector<armarx::ObjectID> removed;
31  std::vector<armarx::ObjectID> current;
32  };
33 
34 
35  public:
36 
38 
39  void requestObjects(const std::vector<armarx::data::ObjectID>& objectIDs, long relativeTimeOutMS);
40  void requestObjects(const std::vector<armarx::ObjectID>& objectIDs, long relativeTimeOutMS);
41  void requestObjects(const std::vector<armarx::ObjectID>& objectIDs, IceUtil::Time relativeTimeout);
42 
43 
46 
47 
48  public:
49 
50  /// Map from (absolute timeout) to (request)
51  std::map<IceUtil::Time, std::vector<Request>> currentRequests;
52  std::vector<armarx::ObjectID> infiniteRequests;
53 
54 
55  private:
56  std::vector<armarx::ObjectID> lastCurrent;
57 
58  };
59 }
armarx::objpose::RequestedObjects::Update::added
std::vector< armarx::ObjectID > added
Definition: RequestedObjects.h:29
armarx::objpose::RequestedObjects::requestObjects
void requestObjects(const std::vector< armarx::data::ObjectID > &objectIDs, long relativeTimeOutMS)
Definition: RequestedObjects.cpp:14
armarx::objpose::RequestedObjects::Request::infinite
bool infinite
Definition: RequestedObjects.h:25
armarx::objpose::RequestedObjects::Update::removed
std::vector< armarx::ObjectID > removed
Definition: RequestedObjects.h:30
armarx::objpose::RequestedObjects::infiniteRequests
std::vector< armarx::ObjectID > infiniteRequests
Definition: RequestedObjects.h:52
armarx::objpose::RequestedObjects::currentRequests
std::map< IceUtil::Time, std::vector< Request > > currentRequests
Map from (absolute timeout) to (request)
Definition: RequestedObjects.h:51
armarx::objpose::RequestedObjects::Request::objectIDs
std::vector< armarx::ObjectID > objectIDs
Definition: RequestedObjects.h:24
armarx::objpose::RequestedObjects::updateRequestedObjects
Update updateRequestedObjects()
Definition: RequestedObjects.cpp:43
armarx::objpose::RequestedObjects::RequestedObjects
RequestedObjects()
Definition: RequestedObjects.cpp:10
armarx::objpose::RequestedObjects::Update::current
std::vector< armarx::ObjectID > current
Definition: RequestedObjects.h:31
armarx::objpose
This file is part of ArmarX.
Definition: objpose.h:7
ObjectID.h
armarx::objpose::RequestedObjects::Request
Definition: RequestedObjects.h:22
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::objpose::RequestedObjects::Update
Definition: RequestedObjects.h:27
armarx::objpose::RequestedObjects
Handles requests for object pose estimation from the ObjectPoseProviderInterface.
Definition: RequestedObjects.h:18