ObjectMemory.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 RobotAPI::ArmarXObjects::ObjectMemory
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <memory>
26
28
29#include <RobotAPI/interface/armem/server/ObjectMemoryInterface.h>
39
40
41#define ICE_CURRENT_ARG const Ice::Current& = Ice::emptyCurrent
42
44{
45
46 /**
47 * @defgroup Component-ObjectMemory ObjectMemory
48 * @ingroup RobotAPI-Components
49 * A description of the component ObjectMemory.
50 *
51 * @class ObjectMemory
52 * @ingroup Component-ObjectMemory
53 * @brief Brief description of class ObjectMemory.
54 *
55 * Detailed description of class ObjectMemory.
56 */
58 virtual public Component
59
60 ,
61 virtual public armarx::armem::server::ObjectMemoryInterface,
67 {
68 public:
70 virtual ~ObjectMemory() override;
71
72
73 /// @see armarx::ManagedIceObject::getDefaultName()
74 std::string getDefaultName() const override;
75
76
77 public:
79
80 void onInitComponent() override;
81 void onConnectComponent() override;
82
83 void onDisconnectComponent() override;
84 void onExitComponent() override;
85
86 // Without this, ObjectMemory draws the original
87 // methods from ObjectMemoryInterface and complains
88 // that an overload is being hidden.
93
94 // Actions
95 armem::actions::GetActionsOutputSeq
96 getActions(const armem::actions::GetActionsInputSeq& inputs) override;
97 armem::actions::ExecuteActionOutputSeq
98 executeActions(const armem::actions::ExecuteActionInputSeq& inputs) override;
99
100 // Predictions
101 armem::prediction::data::PredictionResultSeq
102 predict(const armem::prediction::data::PredictionRequestSeq& requests) override;
103
104 // Remote GUI
105 void createRemoteGuiTab();
106 void RemoteGui_update() override;
107
108 // Updates the list of known classes and generates a new snapshot in the memory
109 void reloadKnownObjectClasses(const Ice::Current& current) override;
110
111 private:
112 DebugObserverInterfacePrx debugObserver;
113 KinematicUnitObserverInterfacePrx kinematicUnitObserver;
114
115 double predictionTimeWindow = 2;
116
117 clazz::Segment classSegment;
118
119 attachments::Segment attachmentSegment;
120
121 // associations::Segment associationsSegment;
122
123 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
124 {
127 };
128
129 std::unique_ptr<RemoteGuiTab> tab;
130
131 struct Properties
132 {
133 int64_t maxMarkerHistorySize = -1;
134 std::string markerMemoryName = "Marker";
135 };
136
137 Properties p;
138
140 virtualRobotReaderPlugin;
141 };
142
143} // namespace armarx::armem::server::obj
144
145#undef ICE_CURRENT_ARG
Provides a ready-to-use ArViz client arviz as member variable.
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
Definition Component.cpp:66
A component plugin offering client-side access to a reader or writer and manages the lifecycle,...
virtual armem::actions::ExecuteActionOutputSeq executeActions(const armem::actions::ExecuteActionInputSeq &inputs)
virtual armem::actions::GetActionsOutputSeq getActions(const armem::actions::GetActionsInputSeq &inputs)
virtual armem::prediction::data::EngineSupportMap getAvailableEngines()
virtual armem::prediction::data::PredictionResultSeq predict(const armem::prediction::data::PredictionRequestSeq &requests)
armem::actions::ExecuteActionOutputSeq executeActions(const armem::actions::ExecuteActionInputSeq &inputs) override
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
armem::actions::GetActionsOutputSeq getActions(const armem::actions::GetActionsInputSeq &inputs) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Creates the property definition container.
void onConnectComponent() override
Pure virtual hook for the subclass.
void reloadKnownObjectClasses(const Ice::Current &current) override
void onExitComponent() override
Hook for subclass.
armem::prediction::data::PredictionResultSeq predict(const armem::prediction::data::PredictionRequestSeq &requests) override
std::string getDefaultName() const override
Helps implementing the armarx::armem::server::ObjectInstanceSegmentInterface.
Helps implementing the armarx::armem::server::ObjectInstanceSegmentInterface.
Base class of memory server components.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.