31 #include <RobotAPI/interface/units/HandUnitInterface.h>
35 #include <MemoryX/interface/memorytypes/MemorySegments.h>
36 #include <MemoryX/interface/observers/WorldStateObserver.h>
54 virtual public WorldStateObserverInterface,
62 return "WorldStateObserver";
65 void onInitComponent()
override;
66 void onConnectComponent()
override;
69 memoryx::PredicateInstanceList getWorldState(const ::Ice::Current&)
override;
70 bool isObservable(const ::std::string& predicateName, const ::Ice::Current&)
override;
71 bool updatePredicateValue(
const PredicateInstance&
pi,
73 const ::Ice::Current&)
override;
74 void setPredicateArgumentWhitelist(
const EntityBaseList& argumentWhitelist,
75 const Ice::Current&)
override;
76 void resetPredicateArgumentWhitelist(const ::Ice::Current&)
override;
79 bool areAllowed(
const std::vector<memoryx::EntityRefBasePtr>& entityRefs);
80 void addListToList(PredicateInstanceList&
target,
const PredicateInstanceList&
source);
81 PredicateInstanceList getHandEmptyPredicates();
83 PredicateInstanceList getNonobservableRelationsAndPredicates();
85 std::mutex updaterMutex;
86 std::map<std::string, WorldStateUpdaterInterfacePrx> updaters;
88 EntityBaseList argumentWhitelist;
89 WorkingMemoryInterfacePrx wm;
90 PriorKnowledgeInterfacePrx prior;
92 ObjectInstanceMemorySegmentBasePrx objectInstances;
93 PersistentObjectClassSegmentBasePrx objectClasses;
94 RelationMemorySegmentBasePrx objectRelations;
96 PredicateInstanceList observablePredicateInstances;
100 void addObservablePredicateInstances(
const PredicateInstanceList& predicates,
101 const Ice::Current&)
override;
102 void registerAsUpdater(
const std::string& name,
103 const WorldStateUpdaterInterfacePrx& updater,
104 const Ice::Current&)
override;
105 WorldStateUpdaterInterfaceList getRegisteredUpdaters(
const Ice::Current&)
override;