29 #include <MemoryX/interface/observers/WorldStateObserver.h>
30 #include <MemoryX/interface/memorytypes/MemorySegments.h>
34 #include <RobotAPI/interface/units/HandUnitInterface.h>
57 virtual public WorldStateObserverInterface,
64 return "WorldStateObserver";
66 void onInitComponent()
override;
67 void onConnectComponent()
override;
70 memoryx::PredicateInstanceList getWorldState(const ::Ice::Current&)
override;
71 bool isObservable(const ::std::string& predicateName, const ::Ice::Current&)
override;
72 bool updatePredicateValue(
const PredicateInstance&
pi,
bool removePredicate, const ::Ice::Current&)
override;
73 void setPredicateArgumentWhitelist(
const EntityBaseList& argumentWhitelist,
const Ice::Current&)
override;
74 void resetPredicateArgumentWhitelist(const ::Ice::Current&)
override;
77 bool areAllowed(
const std::vector<memoryx::EntityRefBasePtr>& entityRefs);
78 void addListToList(PredicateInstanceList&
target,
const PredicateInstanceList&
source);
79 PredicateInstanceList getHandEmptyPredicates();
81 PredicateInstanceList getNonobservableRelationsAndPredicates();
83 std::mutex updaterMutex;
84 std::map<std::string, WorldStateUpdaterInterfacePrx> updaters;
86 EntityBaseList argumentWhitelist;
87 WorkingMemoryInterfacePrx wm;
88 PriorKnowledgeInterfacePrx prior;
90 ObjectInstanceMemorySegmentBasePrx objectInstances;
91 PersistentObjectClassSegmentBasePrx objectClasses;
92 RelationMemorySegmentBasePrx objectRelations;
94 PredicateInstanceList observablePredicateInstances;
98 void addObservablePredicateInstances(
const PredicateInstanceList& predicates,
const Ice::Current&)
override;
99 void registerAsUpdater(
const std::string& name,
const WorldStateUpdaterInterfacePrx& updater,
const Ice::Current&)
override;
100 WorldStateUpdaterInterfaceList getRegisteredUpdaters(
const Ice::Current&)
override;