ik_demo.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 skills::ArmarXObjects::armar6_ik_demo
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2022
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
26#include <memory>
27
30
31// #include <ArmarXCore/libraries/ArmarXCoreComponentPlugins/DebugObserverComponentPlugin.h>
32
33// #include <ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h>
34
36
37// #include <armar6/skills/components/armar6_ik_demo/ComponentInterface.h>
38
39
41{
42
43 class IkDemo;
44
45 class ik_demo :
46 virtual public armarx::Component
47 // , virtual public armar6::skills::components::armar6_ik_demo::ComponentInterface
48 // , virtual public armarx::DebugObserverComponentPluginUser
49 // , virtual public armarx::LightweightRemoteGuiComponentPluginUser
50 ,
52 {
53 public:
54 /// @see armarx::ManagedIceObject::getDefaultName()
55 std::string getDefaultName() const override;
56
57 /// Get the component's default name.
58 static std::string GetDefaultName();
59
60 ik_demo();
61
62
63 protected:
64 /// @see PropertyUser::createPropertyDefinitions()
66
67 /// @see armarx::ManagedIceObject::onInitComponent()
68 void onInitComponent() override;
69
70 /// @see armarx::ManagedIceObject::onConnectComponent()
71 void onConnectComponent() override;
72
73 /// @see armarx::ManagedIceObject::onDisconnectComponent()
74 void onDisconnectComponent() override;
75
76 /// @see armarx::ManagedIceObject::onExitComponent()
77 void onExitComponent() override;
78
79
80 /* (Requires armarx::LightweightRemoteGuiComponentPluginUser.)
81 /// This function should be called once in onConnect() or when you
82 /// need to re-create the Remote GUI tab.
83 void createRemoteGuiTab();
84
85 /// After calling `RemoteGui_startRunningTask`, this function is
86 /// called periodically in a separate thread. If you update variables,
87 /// make sure to synchronize access to them.
88 void RemoteGui_update() override;
89 */
90
91
92 private:
93 void run();
94
95 // Private methods go here.
96
97 // Forward declare `Properties` if you used it before its defined.
98 // struct Properties;
99
100 /* (Requires the armarx::ArVizComponentPluginUser.)
101 /// Draw some boxes in ArViz.
102 void drawBoxes(const Properties& p, viz::Client& arviz);
103 */
104
105
106 private:
107 static const std::string defaultName;
108
109 std::unique_ptr<IkDemo> impl;
111
112 /// Properties shown in the Scenario GUI.
113 struct Properties
114 {
115 };
116
117 Properties properties;
118
119 /* (Requires the armarx::LightweightRemoteGuiComponentPluginUser.)
120 /// Tab shown in the Remote GUI.
121 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
122 {
123 armarx::RemoteGui::Client::LineEdit boxLayerName;
124 armarx::RemoteGui::Client::IntSpinBox numBoxes;
125
126 armarx::RemoteGui::Client::Button drawBoxes;
127 };
128 RemoteGuiTab tab;
129 */
130 };
131
132} // namespace armar6::skills::components::armar6_ik_demo
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition ik_demo.cpp:50
static std::string GetDefaultName()
Get the component's default name.
Definition ik_demo.cpp:148
Provides a ready-to-use ArViz client arviz as member variable.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.