17 #include <RobotAPI/libraries/armem_objects/aron/Attachment.aron.generated.h>
27 template <
typename AronClass,
typename ArmemClass>
32 using ArmemClassVector = std::vector<ArmemClass>;
34 ArmemClassVector attachments;
40 ARMARX_WARNING <<
"No entity snapshot found";
48 AronClass aronAttachment;
49 aronAttachment.fromAron(instance.data());
51 ArmemClass attachment;
52 fromAron(aronAttachment, attachment);
54 if (attachment.active)
56 attachments.push_back(attachment);
71 memoryNameSystem(memoryNameSystem)
80 const std::string prefix = propertyPrefix;
82 def->optional(properties.memoryName, prefix +
"MemoryName");
84 def->optional(properties.coreAttachmentsSegmentName,
85 prefix +
"CoreSegment",
86 "Name of the memory core segment to use for object attachments.");
93 ARMARX_IMPORTANT <<
"Reader: Waiting for memory '" << properties.memoryName <<
"' ...";
96 memoryReader = memoryNameSystem.
useReader(properties.memoryName);
97 ARMARX_IMPORTANT <<
"Reader: Connected to memory '" << properties.memoryName <<
"'";
106 std::vector<ObjectAttachment>
124 if (not qResult.success)
129 return getAttachments<::armarx::armem::arondto::attachment::ObjectAttachment,
133 std::vector<ObjectAttachment>
135 const std::string& providerName)
const
152 if (not qResult.success)
157 return getAttachments<::armarx::armem::arondto::attachment::ObjectAttachment,
161 std::vector<ArticulatedObjectAttachment>
179 if (not qResult.success)
184 return getAttachments<::armarx::armem::arondto::attachment::ArticulatedObjectAttachment,
189 std::vector<ArticulatedObjectAttachment>
191 const std::string& providerName)
const
208 if (not qResult.success)
213 return getAttachments<::armarx::armem::arondto::attachment::ArticulatedObjectAttachment,