5#include <SimoxUtility/algorithm/string/string_tools.h>
15#include <RobotAPI/libraries/armem_objects/aron/Attachment.aron.generated.h>
26 const std::string prefix = propertyPrefix;
28 def->optional(properties.memoryName, prefix +
"MemoryName");
30 def->optional(properties.coreSegmentName,
31 prefix +
"CoreSegment",
32 "Name of the memory core segment to use for object instances.");
39 ARMARX_IMPORTANT <<
"Reader: Waiting for memory '" << properties.memoryName <<
"' ...";
42 memoryReader = memoryNameSystem.
useReader(properties.memoryName);
43 ARMARX_IMPORTANT <<
"Reader: Connected to memory '" << properties.memoryName <<
"'";
52 std::optional<armem::grasping::arondto::KnownGraspInfo>
57 .getCoreSegment(properties.coreSegmentName);
62 if (instance ==
nullptr)
67 return armem::grasping::arondto::KnownGraspInfo::FromAron(instance->
data());
70 std::optional<armarx::armem::grasping::arondto::KnownGraspInfo>
99 auto split = simox::alg::split(entityName,
"/");
100 if (
split.size() > 2)
102 ARMARX_INFO <<
"No grasp found for object entity " << entityName
103 <<
". Search for grasp without the index";
const DataT & data() const
The memory name system (MNS) client.
Reader useReader(const MemoryID &memoryID)
Use a memory server and get a reader for it.
The query::Builder class provides a fluent-style specification of hierarchical queries.
QueryInput buildQueryInput() const
CoreSegmentSelector & coreSegments()
Start specifying core segments.
CoreSegmentSelector & withName(const std::string &name) override
ProviderSegmentSelector & providerSegments()
Start specifying provider segments.
EntitySelector & withName(const std::string &name) override
SnapshotSelector & snapshots()
Start specifying entity snapshots.
EntitySelector & entities()
Start specifying entities.
ProviderSegmentSelector & all() override
SnapshotSelector & beforeOrAtTime(Time timestamp)
Indicates that a query to the Memory Name System failed.
std::optional< armem::grasping::arondto::KnownGraspInfo > queryKnownGraspInfoByEntityName(const std::string &, const armem::Time &)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
std::optional< armem::grasping::arondto::KnownGraspInfo > queryKnownGraspInfo(const armem::wm::Memory &memory, const armem::Time &)
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Client-side working memory core segment.
Client-side working entity instance.
Client-side working memory.
Brief description of class memory.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_VERBOSE
The logging level for verbose information.
armem::wm::EntityInstance EntityInstance
armarx::core::time::DateTime Time
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
wm::Memory memory
The slice of the memory that matched the query.