Skip to content
Snippets Groups Projects

Improve armem prediction interface

Merged Philip Scherer requested to merge prediction-improvements into master
32 files
+ 640
93
Compare changes
  • Side-by-side
  • Inline
Files
32
@@ -27,9 +27,9 @@
#include <SimoxUtility/algorithm/string.h>
#include <RobotAPI/libraries/armem/client/Prediction.h>
#include <RobotAPI/libraries/armem/client/query/Builder.h>
#include <RobotAPI/libraries/armem/core/error.h>
#include <RobotAPI/libraries/armem/core/Prediction.h>
#include <RobotAPI/libraries/armem/core/ice_conversions.h>
#include <RobotAPI/libraries/armem/server/MemoryRemoteGui.h>
@@ -72,6 +72,9 @@ namespace armarx
workingMemory().addCoreSegment("ExampleData", armem::example::ExampleData::ToAronType());
workingMemory().addCoreSegment("LinkedData", armem::example::LinkedData::ToAronType());
// We support the "Latest" prediction engine for the entire memory.
workingMemory().addPredictionEngine({"Latest"});
// For illustration purposes, we add more segments (without types).
bool trim = true;
p.core.defaultCoreSegments = simox::alg::split(p.core._defaultSegmentsStr, ",", trim);
@@ -228,7 +231,7 @@ namespace armarx
armem::prediction::data::PredictionResult
ExampleMemory::predictSingle(const armem::prediction::data::PredictionRequest& request)
{
armem::client::PredictionResult result;
armem::PredictionResult result;
std::string engine = request.settings.predictionEngineID;
if (engine.empty() || engine == "Latest")
@@ -275,12 +278,6 @@ namespace armarx
return result.toIce();
}
armem::prediction::data::EngineSupportMap
ExampleMemory::getAvailableEngines()
{
return {{armarx::toIce<armem::data::MemoryID>(workingMemory().id()), {{"Latest"}}}};
}
// REMOTE GUI
void ExampleMemory::createRemoteGuiTab()
Loading