27 #include <MemoryX/interface/components/CommonPlacesLearnerInterface.h>
28 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
29 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
48 defineOptionalProperty<std::string>(
"LTMSegment",
"objects",
"Name of segment in LTM to store learned CommonPlaces / to run queries on");
49 defineOptionalProperty<float>(
"AgingFactor", 0.8,
"Discount factor to make older observations less significant");
50 defineOptionalProperty<float>(
"PruningThreshold", 0.0,
"Maximum weight of Gauss component to be pruned");
51 defineOptionalProperty<std::string>(
"MergingDistanceType",
"KL",
"Distance type to be used for association/merging: Mahalanobis, ISD, KL");
52 defineOptionalProperty<float>(
"MergingThreshold", 0.0,
"Maximum distance value for association (meaning depends upon measure used)");
53 defineOptionalProperty<std::string>(
"GMMReducerAlgorithm",
"West",
"A GMM reducing algorithm to be used for queries: West, Runnalls, Williams");
58 virtual public CommonPlacesLearnerInterface,
65 return "CommonPlacesLearner";
67 void onInitComponent()
override;
68 void onConnectComponent()
override;
69 void onExitComponent()
override;
72 void setLTMSegmentName(const ::std::string& segmentName, const ::Ice::Current& = Ice::emptyCurrent)
override;
73 void setAgingFactor(
float factor, const ::Ice::Current& = Ice::emptyCurrent)
override;
74 void setMergingThreshold(
float threshold, const ::Ice::Current& = Ice::emptyCurrent)
override;
76 void learnFromSnapshot(const ::std::string& snapshotName, const ::Ice::Current& = Ice::emptyCurrent)
override;
77 void learnFromObject(
const ObjectInstanceBasePtr& newObject, const ::Ice::Current& = Ice::emptyCurrent)
override;
78 void learnFromObjectMCA(const ::std::string& objectName,
const MultivariateNormalDistributionBasePtr& posDist,
79 const ::Ice::Current& = Ice::emptyCurrent)
override;
82 GaussianMixtureDistributionBasePtr getPositionFull(const ::std::string& objectName, const ::Ice::Current& = Ice::emptyCurrent)
override;
83 GaussianMixtureDistributionBasePtr getPositionReducedByComponentCount(const ::std::string& objectName,
Ice::Int compCount, const ::Ice::Current& = Ice::emptyCurrent)
override;
84 GaussianMixtureDistributionBasePtr getPositionReducedByMaxDeviation(const ::std::string& objectName,
Ice::Float maxDeviation, DeviationType devType, const ::Ice::Current& = Ice::emptyCurrent)
override;
85 NormalDistributionBasePtr getPositionAsGaussian(const ::std::string& objectName, const ::Ice::Current& = Ice::emptyCurrent)
override;
87 Cluster3DList getPositionClustersByComponentCount(const ::std::string& objectName,
Ice::Int compCount, const ::Ice::Current& = Ice::emptyCurrent)
override;
88 Cluster3DList getPositionClustersByMaxDeviation(const ::std::string& objectName,
Ice::Float maxDeviation, DeviationType devType, const ::Ice::Current& = Ice::emptyCurrent)
override;
91 PriorKnowledgeInterfacePrx priorKnowledgePrx;
93 LongtermMemoryInterfacePrx longtermMemoryPrx;
94 PersistentObjectInstanceSegmentBasePrx ltmInstancesSegmentPrx;
102 Cluster3DList gmmToClusterList(
const GaussianMixtureDistributionBasePtr& gmm);
103 void getChildClasses(std::string className, NameList& result);
113 getConfigIdentifier()));