17 #include <RobotAPI/libraries/armem_objects/aron/Attachment.aron.generated.h>
28 template <
typename AronClass,
typename ArmemClass>
32 using ArmemClassVector = std::vector<ArmemClass>;
34 ArmemClassVector attachments;
39 ARMARX_WARNING <<
"No entity snapshot found";
46 AronClass aronAttachment;
47 aronAttachment.fromAron(instance.data());
49 ArmemClass attachment;
50 fromAron(aronAttachment, attachment);
52 if (attachment.active)
54 attachments.push_back(attachment);
70 memoryNameSystem(memoryNameSystem)
77 const std::string prefix = propertyPrefix;
79 def->optional(properties.memoryName, prefix +
"MemoryName");
81 def->optional(properties.coreAttachmentsSegmentName,
82 prefix +
"CoreSegment",
83 "Name of the memory core segment to use for object attachments.");
90 ARMARX_IMPORTANT <<
"Reader: Waiting for memory '" << properties.memoryName <<
"' ...";
93 memoryReader = memoryNameSystem.
useReader(properties.memoryName);
94 ARMARX_IMPORTANT <<
"Reader: Connected to memory '" << properties.memoryName <<
"'";
121 if (not qResult.success)
126 return getAttachments <
127 ::armarx::armem::arondto::attachment::ObjectAttachment,
148 if (not qResult.success)
153 return getAttachments<::armarx::armem::arondto::attachment::ObjectAttachment, ::armarx::armem::attachment::ObjectAttachment>(qResult.memory);
173 if (not qResult.success)
178 return getAttachments<::armarx::armem::arondto::attachment::ArticulatedObjectAttachment, ::armarx::armem::attachment::ArticulatedObjectAttachment>(qResult.memory);
198 if (not qResult.success)
203 return getAttachments<::armarx::armem::arondto::attachment::ArticulatedObjectAttachment, ::armarx::armem::attachment::ArticulatedObjectAttachment>(qResult.memory);