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
51
52 protected:
53 /// @see armarx::ManagedIceObject::onInitComponent()
54 void onInitComponent() override;
55
56 /// @see armarx::ManagedIceObject::onConnectComponent()
57 void onConnectComponent() override;
58
59 /// @see armarx::ManagedIceObject::onDisconnectComponent()
60 void onDisconnectComponent() override;
61
62 /// @see armarx::ManagedIceObject::onExitComponent()
63 void onExitComponent() override;
64
65 /// @see PropertyUser::createPropertyDefinitions()
67
68
69 void
70 reportEntityCreated(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
71 void reportEntityUpdated(const std::string&,
72 const EntityBasePtr&,
73 const EntityBasePtr&,
74 const Ice::Current&) override;
75 void
76 reportEntityRemoved(const std::string&, const EntityBasePtr&, const Ice::Current&) override;
77 void reportSnapshotLoaded(const std::string&, const Ice::Current&) override;
78 void reportSnapshotCompletelyLoaded(const Ice::Current&) override;
79 void reportMemoryCleared(const std::string&, const Ice::Current&) override;
80
81 private:
82 WorkingMemoryInterfacePrx memoryPrx;
83
84 float minOrientationDistance = 0.2;
85 float minPositionDistance = 100;
86
87 std::map<std::string, std::map<int, memoryx::EntityBasePtr>> entityMap;
88 };
89} // 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.