Skip to content
Snippets Groups Projects

armem/dev => master

Merged Fabian Reister requested to merge armem/dev into master
1 file
+ 8
4
Compare changes
  • Side-by-side
  • Inline
@@ -52,24 +52,28 @@ namespace armarx::armem::server::obj::attachments
// this->visu = std::make_unique<Visu>(arviz, *this);
}
std::vector<armarx::armem::attachments::ObjectAttachment> Segment::getAttachments(const armem::Time& timestamp) const
std::vector<armarx::armem::attachment::ObjectAttachment> Segment::getAttachments(const armem::Time& timestamp) const
{
std::vector<armarx::armem::attachments::ObjectAttachment> attachments;
std::vector<armarx::armem::attachment::ObjectAttachment> attachments;
for (const auto& [_, provSeg] : iceMemory.workingMemory->getCoreSegment(p.coreClassSegmentName))
{
for (const auto& [name, entity] : provSeg.entities())
{
const auto& entityInstance = entity.getLatestSnapshot().getInstance(0);
const auto attachment = tryCast<armarx::arondto::attachment::ObjectAttachment>(entityInstance);
const auto aronAttachment = tryCast<armarx::armem::arondto::attachment::ObjectAttachment>(entityInstance);
if (not attachment)
if (not aronAttachment)
{
ARMARX_WARNING << "Could not convert entity instance to 'ObjectAttachment'";
continue;
}
ARMARX_DEBUG << "Key is " << armem::MemoryID(entity.id());
armarx::armem::attachment::ObjectAttachment attachment;
fromAron(*aronAttachment, attachment);
attachments.push_back(attachment);
}
}
Loading