Component.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 armarx::control::components::skill_providers::collision_avoidance
17 * @author Meixner ( andre dot meixner at kit dot edu )
18 * @date 2025
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
26
27// #include <mutex>
28
30
31// #include <ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h>
32
33#include <RobotAPI/interface/units/HandUnitInterface.h>
44
46#include <armarx/control/collision_avoidance/component/ComponentInterface.h>
47#include <armarx/control/collision_avoidance/skill_provider/ComponentInterface.h>
48
49//#include <VisionX/libraries/armem_human/client/HumanPoseReader.h>
50
52{
53
54 class Component :
55 virtual public ::armarx::Component,
60 // , virtual public armarx::LightweightRemoteGuiComponentPluginUser
61 ,
64 {
65 public:
66 Component();
67
68 /// @see armarx::ManagedIceObject::getDefaultName()
69 std::string getDefaultName() const override;
70
71 /// Get the component's default name.
72 static std::string GetDefaultName();
73
74
75 protected:
76 /// @see PropertyUser::createPropertyDefinitions()
78
79 /// @see armarx::ManagedIceObject::onInitComponent()
80 void onInitComponent() override;
81
82 /// @see armarx::ManagedIceObject::onConnectComponent()
83 void onConnectComponent() override;
84
85 /// @see armarx::ManagedIceObject::onDisconnectComponent()
86 void onDisconnectComponent() override;
87
88 /// @see armarx::ManagedIceObject::onExitComponent()
89 void onExitComponent() override;
90
91
92 /* (Requires armarx::LightweightRemoteGuiComponentPluginUser.)
93 /// This function should be called once in onConnect() or when you
94 /// need to re-create the Remote GUI tab.
95 void createRemoteGuiTab();
96
97 /// After calling `RemoteGui_startRunningTask`, this function is
98 /// called periodically in a separate thread. If you update variables,
99 /// make sure to synchronize access to them.
100 void RemoteGui_update() override;
101 */
102
103
104 private:
105 // Private methods go here.
106
107 // Forward declare `Properties` if you used it before its defined.
108 // struct Properties;
109
110 /* (Requires the armarx::ArVizComponentPluginUser.)
111 /// Draw some boxes in ArViz.
112 void drawBoxes(const Properties& p, viz::Client& arviz);
113 */
114
115
116 private:
117 static const std::string defaultName;
118
119
120 // Private member variables go here.
121
122 /*
123 /// Properties shown in the Scenario GUI.
124 struct Properties
125 {
126 std::string robotUnitName;
127 };
128 Properties properties;*/
129 /* Use a mutex if you access variables from different threads
130 * (e.g. ice functions and RemoteGui_update()).
131 std::mutex propertiesMutex;
132 */
133
134 armarx::control::components::collision_avoidance::ComponentInterfacePrx
135 collisionAvoidanceComponent;
136
137 /* (Requires the armarx::LightweightRemoteGuiComponentPluginUser.)
138 /// Tab shown in the Remote GUI.
139 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
140 {
141 armarx::RemoteGui::Client::LineEdit boxLayerName;
142 armarx::RemoteGui::Client::IntSpinBox numBoxes;
143
144 armarx::RemoteGui::Client::Button drawBoxes;
145 };
146 RemoteGuiTab tab;
147 */
148 };
149
150} // namespace armarx::control::components::collision_avoidance::skill_provider
Provides a ready-to-use ArViz client arviz as member variable.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
::armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition Component.cpp:51
static std::string GetDefaultName()
Get the component's default name.
client::plugins::PluginUser ClientPluginUser
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.