SimpleEpisodicMemoryWorkingMemoryConnector.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package MemoryX::ArmarXObjects::SimpleEpisodicMemoryWorkingMemoryConnector
17  * @author fabian.peller-konrad@kit.edu ( fabian dot peller-konrad at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 // STD/STL
26 #include <vector>
27 #include <map>
28 
29 #include <Eigen/Core>
30 
32 #include <RobotAPI/interface/core/RobotState.h>
34 
35 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
37 
38 namespace memoryx
39 {
41  virtual public armarx::Component,
42  virtual public WorkingMemoryListenerInterface,
43  virtual public SimpleEpisodicMemoryConnector
44  {
45  public:
46 
47  /// @see armarx::ManagedIceObject::getDefaultName()
48  std::string getDefaultName() const override;
49 
51 
52  protected:
53 
54  /// @see armarx::ManagedIceObject::onInitComponent()
55  void onInitComponent() override;
56 
57  /// @see armarx::ManagedIceObject::onConnectComponent()
58  void onConnectComponent() override;
59 
60  /// @see armarx::ManagedIceObject::onDisconnectComponent()
61  void onDisconnectComponent() override;
62 
63  /// @see armarx::ManagedIceObject::onExitComponent()
64  void onExitComponent() override;
65 
66  /// @see PropertyUser::createPropertyDefinitions()
67  armarx::PropertyDefinitionsPtr createPropertyDefinitions() override;
68 
69 
70  void reportEntityCreated(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
71  void reportEntityUpdated(const std::string&, const EntityBasePtr&, const EntityBasePtr&, const Ice::Current&) override;
72  void reportEntityRemoved(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
73  void reportSnapshotLoaded(const std::string&, const Ice::Current&) override;
74  void reportSnapshotCompletelyLoaded(const Ice::Current&) override;
75  void reportMemoryCleared(const std::string&, const Ice::Current&) override;
76 
77  private:
78  WorkingMemoryInterfacePrx memoryPrx;
79 
80  float minOrientationDistance = 0.2;
81  float minPositionDistance = 100;
82 
83  std::map<std::string, std::map<int, memoryx::EntityBasePtr>> entityMap;
84  };
85 }
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
memoryx::SimpleEpisodicMemoryConnector
Definition: SimpleEpisodicMemoryConnector.h:35
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
memoryx::SimpleEpisodicMemoryWorkingMemoryConnector
Definition: SimpleEpisodicMemoryWorkingMemoryConnector.h:40
IceUtil::Handle< class PropertyDefinitionContainer >
SimpleEpisodicMemoryConnector.h
ImportExportComponent.h