GraspCandidateReader.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
5 #include <RobotAPI/interface/units/GraspCandidateProviderInterface.h>
8 
9 namespace armarx::armem
10 {
11 
13  {
14  public:
16 
17  void connect(armem::client::MemoryNameSystem& memoryNameSystem, bool use = true);
18 
19  ::armarx::grasping::GraspCandidatePtr
21 
22  ::armarx::grasping::GraspCandidateDict
23  queryGraspCandidateInstancesByID(std::vector<armem::MemoryID> const& ids) const;
24 
25  ::armarx::grasping::BimanualGraspCandidatePtr
27 
28  ::armarx::grasping::GraspCandidateDict
29  queryLatestGraspCandidateEntity(std::string const& provider,
30  std::string const& entity) const;
31 
32  std::map<std::string, ::armarx::grasping::BimanualGraspCandidatePtr>
33  queryLatestBimanualGraspCandidateEntity(std::string const& provider,
34  std::string const& entity) const;
35 
36  ::armarx::grasping::GraspCandidateDict
37  queryLatestGraspCandidates(std::string const& provider = "") const;
38 
39  ::armarx::grasping::GraspCandidateDict queryGraspCandidatesNewerThan(
40  std::string const& provider = "",
41  const armarx::DateTime& timestamp = armarx::DateTime::Now()) const;
42 
43  std::map<std::string, ::armarx::grasping::BimanualGraspCandidatePtr>
44  queryLatestBimanualGraspCandidates(std::string const& provider = "") const;
45 
46 
48 
49 
50  private:
51  ::armarx::grasping::GraspCandidateDict
52  getGraspCandidatesFromResultSet(armem::client::QueryResult const& qResult) const;
53 
54  std::map<std::string, ::armarx::grasping::BimanualGraspCandidatePtr>
55  getBimanualGraspCandidatesFromResultSet(armem::client::QueryResult const& qResult) const;
56 
57  armem::client::Reader memoryReader;
58 
59  // Properties
60  struct Properties
61  {
62  std::string memoryName = "Grasp";
63  std::string graspCandidateMemoryName = "GraspCandidate";
64  std::string bimanualGraspCandidateMemoryName = "BimanualGraspCandidate";
65  } properties;
66 
67  const std::string propertyPrefix = "mem.grasping.";
68  };
69 
70 } // namespace armarx::armem
armarx::armem::client::Reader
Reads data from a memory server.
Definition: Reader.h:24
armarx::armem::GraspCandidateReader::queryLatestBimanualGraspCandidates
std::map< std::string, ::armarx::grasping::BimanualGraspCandidatePtr > queryLatestBimanualGraspCandidates(std::string const &provider="") const
Definition: GraspCandidateReader.cpp:225
armarx::armem::GraspCandidateReader::GraspCandidateReader
GraspCandidateReader()
Definition: GraspCandidateReader.cpp:13
Reader.h
armarx::armem::GraspCandidateReader::queryLatestBimanualGraspCandidateEntity
std::map< std::string, ::armarx::grasping::BimanualGraspCandidatePtr > queryLatestBimanualGraspCandidateEntity(std::string const &provider, std::string const &entity) const
Definition: GraspCandidateReader.cpp:166
client.h
armarx::core::time::DateTime::Now
static DateTime Now()
Definition: DateTime.cpp:55
armarx::armem::GraspCandidateReader::queryGraspCandidateInstanceByID
::armarx::grasping::GraspCandidatePtr queryGraspCandidateInstanceByID(armem::MemoryID const &id) const
Definition: GraspCandidateReader.cpp:65
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:31
armarx::armem::client::QueryResult
Result of a QueryInput.
Definition: Query.h:50
use
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE The MIT Marcin Kalicinski Permission is hereby free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: license.txt:39
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::armem::GraspCandidateReader::queryGraspCandidateInstancesByID
::armarx::grasping::GraspCandidateDict queryGraspCandidateInstancesByID(std::vector< armem::MemoryID > const &ids) const
Definition: GraspCandidateReader.cpp:79
armarx::armem::GraspCandidateReader::queryGraspCandidatesNewerThan
::armarx::grasping::GraspCandidateDict queryGraspCandidatesNewerThan(std::string const &provider="", const armarx::DateTime &timestamp=armarx::DateTime::Now()) const
Definition: GraspCandidateReader.cpp:327
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::armem::laser_scans::constants::memoryName
const std::string memoryName
Definition: constants.h:28
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::GraspCandidateReader
Definition: GraspCandidateReader.h:12
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
armarx::armem::GraspCandidateReader::registerPropertyDefinitions
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Definition: GraspCandidateReader.cpp:261
armarx::armem::GraspCandidateReader::connect
void connect(armem::client::MemoryNameSystem &memoryNameSystem, bool use=true)
Definition: GraspCandidateReader.cpp:18
armarx::armem::GraspCandidateReader::queryBimanualGraspCandidateInstanceByID
::armarx::grasping::BimanualGraspCandidatePtr queryBimanualGraspCandidateInstanceByID(armem::MemoryID const &id) const
Definition: GraspCandidateReader.cpp:108
armarx::armem::GraspCandidateReader::queryLatestGraspCandidates
::armarx::grasping::GraspCandidateDict queryLatestGraspCandidates(std::string const &provider="") const
Definition: GraspCandidateReader.cpp:188
armarx::armem::GraspCandidateReader::queryLatestGraspCandidateEntity
::armarx::grasping::GraspCandidateDict queryLatestGraspCandidateEntity(std::string const &provider, std::string const &entity) const
Definition: GraspCandidateReader.cpp:144