Skip to content
Snippets Groups Projects
Commit 9d19ad89 authored by Joana Plewnia's avatar Joana Plewnia
Browse files

loading only CoreSegments with certain names from LTM possible

- names are still hard coded at the moment
parent 4158af31
No related branches found
No related tags found
1 merge request!469Loading the last n Snapshots from LTM on Startup
Pipeline #20770 passed
......@@ -380,15 +380,29 @@ namespace armarx::armem::server
return ret;
}
// LTM LOADING FROM LTM
// WM LOADING FROM LTM
armem::CommitResult
MemoryToIceAdapter::reloadFromLTM()
{
ARMARX_INFO << "Reloading of data from LTM into WM triggered";
std::array<std::string, 2> names = {"Localization", "Proprioception"};
armem::wm::Memory m;
//this->longtermMemory->loadAllReferences(m);
this->longtermMemory->forEachCoreSegment(
[&](auto& core)
{
if(std::find(names.begin(), names.end(), core.id().coreSegmentName) != names.end()){
ARMARX_INFO << core.id().coreSegmentName;
armem::wm::CoreSegment s;
core.loadAllReferences(s);
m.addCoreSegment(s);
}
}
);
armarx::armem::wm::Memory mem = this->longtermMemory->loadAllAndResolve();
auto com = armem::toCommit(mem);
auto com = armem::toCommit(m);
auto res = this->commit(com);
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment