WorkingMemoryToArViz.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::WorkingMemoryToArViz
17 * @author Rainer Kartmann ( rainer dot kartmann 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#include <mutex>
26
29
31
33#include <MemoryX/interface/components/PriorKnowledgeInterface.h>
34#include <MemoryX/interface/components/WorkingMemoryInterface.h>
35#include <MemoryX/interface/components/WorkingMemoryToArVizInterface.h>
36
37namespace armarx
38{
39 /**
40 * @class WorkingMemoryToArVizPropertyDefinitions
41 * @brief Property definitions of `WorkingMemoryToArViz`.
42 */
48
49 /**
50 * @defgroup Component-WorkingMemoryToArViz WorkingMemoryToArViz
51 * @ingroup MemoryX-Components
52 * A description of the component WorkingMemoryToArViz.
53 *
54 * @class WorkingMemoryToArViz
55 * @ingroup Component-WorkingMemoryToArViz
56 * @brief Brief description of class WorkingMemoryToArViz.
57 *
58 * Detailed description of class WorkingMemoryToArViz.
59 */
61 virtual public armarx::Component,
62 virtual public memoryx::WorkingMemoryToArVizInterface,
64 {
65 public:
66 /// @see armarx::ManagedIceObject::getDefaultName()
67 std::string getDefaultName() const override;
68
69
70 // WorkingMemoryToArVizInterface interface
71
72 void updateBlackWhitelist(const BlackWhitelistUpdate& update,
73 const Ice::Current& = Ice::emptyCurrent) override;
74
75 void attachObjectToRobotNode(const memoryx::AttachObjectToRobotNodeInput& input,
76 const Ice::Current& = Ice::emptyCurrent) override;
77 void detachObjectFromRobotNode(const memoryx::DetachObjectFromRobotNodeInput& input,
78 const Ice::Current& = Ice::emptyCurrent) override;
79
80
81 protected:
83
84 void onInitComponent() override;
85 void onConnectComponent() override;
86 void onDisconnectComponent() override;
87 void onExitComponent() override;
88
89
90 private:
91 struct Properties
92 {
93 float updateFrequency = 30;
94
95 struct Floor
96 {
97 bool show = true;
98 float height = -1;
99 };
100
101 Floor floor;
102
103 std::string loadObjectDatasetsStr = "";
104 };
105
106 Properties p;
107
108 memoryx::PriorKnowledgeInterfacePrx priorKnowledge;
109 memoryx::WorkingMemoryInterfacePrx workingMemory;
110
111 armarx::RobotStateComponentInterfacePrx robotStateComponent;
112
113 std::mutex drawerMutex;
114
116
118 };
119} // namespace armarx
Provides a ready-to-use ArViz client arviz as member variable.
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
Brief description of class WorkingMemoryToArViz.
void onInitComponent() override
Pure virtual hook for the subclass.
void attachObjectToRobotNode(const memoryx::AttachObjectToRobotNodeInput &input, const Ice::Current &=Ice::emptyCurrent) override
void onDisconnectComponent() override
Hook for subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
Pure virtual hook for the subclass.
void detachObjectFromRobotNode(const memoryx::DetachObjectFromRobotNodeInput &input, const Ice::Current &=Ice::emptyCurrent) override
void onExitComponent() override
Hook for subclass.
void updateBlackWhitelist(const BlackWhitelistUpdate &update, const Ice::Current &=Ice::emptyCurrent) override
std::string getDefaultName() const override
This class can be used to visualize object instances from working memory to ArViz.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx