35 using namespace MemoryXUtility;
56 auto channels = getObjectMemoryObserver()->getAvailableChannels(
false);
58 for (
auto& channel : channels)
60 if (channel.first.find(
"_query_") != std::string::npos)
63 getObjectMemoryObserver()->releaseObjectClass(ref);
64 ARMARX_INFO <<
"Releasing channel for " << ref->getChannelName();
67 auto entities = getPriorKnowledge()->getObjectClassesSegment()->getAllEntities();
68 auto instanceSegment = getWorkingMemory()->getObjectInstancesSegment();
69 for (memoryx::EntityBasePtr base : entities)
72 auto var = entity->getAttributeValue(
"recognitionMethod");
73 if (var && !var->getString().empty() && var->getString() !=
"<none>")
75 auto objInstances = instanceSegment->getObjectInstancesByClass(entity->getName());
76 ARMARX_INFO <<
"Checking instances of class: " << entity->getName() <<
" got " << objInstances.size() <<
" instances";
77 for (
auto& obj : objInstances)
79 instanceSegment->removeEntity(obj->getId());
80 ARMARX_INFO <<
"Removing instance " << obj->getName() <<
" with id " << obj->getId();