30 #include <MemoryX/interface/components/CommonPlacesLearnerInterface.h>
31 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
32 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
46 defineOptionalProperty<std::string>(
49 "Name of segment in LTM to store learned CommonPlaces / to run queries on");
50 defineOptionalProperty<float>(
51 "AgingFactor", 0.8,
"Discount factor to make older observations less significant");
52 defineOptionalProperty<float>(
53 "PruningThreshold", 0.0,
"Maximum weight of Gauss component to be pruned");
54 defineOptionalProperty<std::string>(
55 "MergingDistanceType",
57 "Distance type to be used for association/merging: Mahalanobis, ISD, KL");
58 defineOptionalProperty<float>(
61 "Maximum distance value for association (meaning depends upon measure used)");
62 defineOptionalProperty<std::string>(
63 "GMMReducerAlgorithm",
65 "A GMM reducing algorithm to be used for queries: West, Runnalls, Williams");
70 virtual public CommonPlacesLearnerInterface,
78 return "CommonPlacesLearner";
81 void onInitComponent()
override;
82 void onConnectComponent()
override;
83 void onExitComponent()
override;
86 void setLTMSegmentName(const ::std::string& segmentName,
87 const ::Ice::Current& = Ice::emptyCurrent)
override;
88 void setAgingFactor(
float factor, const ::Ice::Current& = Ice::emptyCurrent)
override;
89 void setMergingThreshold(
float threshold,
90 const ::Ice::Current& = Ice::emptyCurrent)
override;
92 void learnFromSnapshot(const ::std::string& snapshotName,
93 const ::Ice::Current& = Ice::emptyCurrent)
override;
94 void learnFromObject(
const ObjectInstanceBasePtr& newObject,
95 const ::Ice::Current& = Ice::emptyCurrent)
override;
96 void learnFromObjectMCA(const ::std::string& objectName,
97 const MultivariateNormalDistributionBasePtr& posDist,
98 const ::Ice::Current& = Ice::emptyCurrent)
override;
101 GaussianMixtureDistributionBasePtr
102 getPositionFull(const ::std::string& objectName,
103 const ::Ice::Current& = Ice::emptyCurrent)
override;
104 GaussianMixtureDistributionBasePtr
105 getPositionReducedByComponentCount(const ::std::string& objectName,
107 const ::Ice::Current& = Ice::emptyCurrent)
override;
108 GaussianMixtureDistributionBasePtr
109 getPositionReducedByMaxDeviation(const ::std::string& objectName,
111 DeviationType devType,
112 const ::Ice::Current& = Ice::emptyCurrent)
override;
113 NormalDistributionBasePtr
114 getPositionAsGaussian(const ::std::string& objectName,
115 const ::Ice::Current& = Ice::emptyCurrent)
override;
118 getPositionClustersByComponentCount(const ::std::string& objectName,
120 const ::Ice::Current& = Ice::emptyCurrent)
override;
122 getPositionClustersByMaxDeviation(const ::std::string& objectName,
124 DeviationType devType,
125 const ::Ice::Current& = Ice::emptyCurrent)
override;
128 PriorKnowledgeInterfacePrx priorKnowledgePrx;
130 LongtermMemoryInterfacePrx longtermMemoryPrx;
131 PersistentObjectInstanceSegmentBasePrx ltmInstancesSegmentPrx;
139 Cluster3DList gmmToClusterList(
const GaussianMixtureDistributionBasePtr& gmm);
140 void getChildClasses(std::string className, NameList& result);