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 <map>
27#include <vector>
28
29#include <Eigen/Core>
30
33
34#include <RobotAPI/interface/core/RobotState.h>
35
37#include <MemoryX/interface/components/WorkingMemoryInterface.h>
38
39namespace memoryx
40{
42 virtual public armarx::Component,
43 virtual public WorkingMemoryListenerInterface,
45 {
46 public:
47 /// @see armarx::ManagedIceObject::getDefaultName()
48 std::string getDefaultName() const override;
49
50 static std::string GetDefaultName();
51
53
54 protected:
55 /// @see armarx::ManagedIceObject::onInitComponent()
56 void onInitComponent() override;
57
58 /// @see armarx::ManagedIceObject::onConnectComponent()
59 void onConnectComponent() override;
60
61 /// @see armarx::ManagedIceObject::onDisconnectComponent()
62 void onDisconnectComponent() override;
63
64 /// @see armarx::ManagedIceObject::onExitComponent()
65 void onExitComponent() override;
66
67 /// @see PropertyUser::createPropertyDefinitions()
69
70
71 void
72 reportEntityCreated(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
73 void reportEntityUpdated(const std::string&,
74 const EntityBasePtr&,
75 const EntityBasePtr&,
76 const Ice::Current&) override;
77 void
78 reportEntityRemoved(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
79 void reportSnapshotLoaded(const std::string&, const Ice::Current&) override;
80 void reportSnapshotCompletelyLoaded(const Ice::Current&) override;
81 void reportMemoryCleared(const std::string&, const Ice::Current&) override;
82
83 private:
84 WorkingMemoryInterfacePrx memoryPrx;
85
86 float minOrientationDistance = 0.2;
87 float minPositionDistance = 100;
88
89 std::map<std::string, std::map<int, memoryx::EntityBasePtr>> entityMap;
90 };
91} // namespace memoryx
#define ARMARXCOMPONENT_IMPORT_EXPORT
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
void reportEntityUpdated(const std::string &, const EntityBasePtr &, const EntityBasePtr &, const Ice::Current &) override
void reportEntityRemoved(const std::string &, const EntityBasePtr &, const Ice::Current &) override
void reportSnapshotLoaded(const std::string &, const Ice::Current &) override
void reportEntityCreated(const std::string &, const EntityBasePtr &, const Ice::Current &) override
void reportMemoryCleared(const std::string &, const Ice::Current &) override
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
VirtualRobot headers.