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 
46  class ik_demo :
47  virtual public armarx::Component
48  // , virtual public armar6::skills::components::armar6_ik_demo::ComponentInterface
49  // , virtual public armarx::DebugObserverComponentPluginUser
50  // , virtual public armarx::LightweightRemoteGuiComponentPluginUser
51  , virtual public armarx::ArVizComponentPluginUser
52  {
53  public:
54 
55  /// @see armarx::ManagedIceObject::getDefaultName()
56  std::string getDefaultName() const override;
57 
58  /// Get the component's default name.
59  static std::string GetDefaultName();
60 
61  ik_demo();
62 
63 
64  protected:
65 
66  /// @see PropertyUser::createPropertyDefinitions()
68 
69  /// @see armarx::ManagedIceObject::onInitComponent()
70  void onInitComponent() override;
71 
72  /// @see armarx::ManagedIceObject::onConnectComponent()
73  void onConnectComponent() override;
74 
75  /// @see armarx::ManagedIceObject::onDisconnectComponent()
76  void onDisconnectComponent() override;
77 
78  /// @see armarx::ManagedIceObject::onExitComponent()
79  void onExitComponent() override;
80 
81 
82  /* (Requires armarx::LightweightRemoteGuiComponentPluginUser.)
83  /// This function should be called once in onConnect() or when you
84  /// need to re-create the Remote GUI tab.
85  void createRemoteGuiTab();
86 
87  /// After calling `RemoteGui_startRunningTask`, this function is
88  /// called periodically in a separate thread. If you update variables,
89  /// make sure to synchronize access to them.
90  void RemoteGui_update() override;
91  */
92 
93 
94  private:
95 
96  void run();
97 
98  // Private methods go here.
99 
100  // Forward declare `Properties` if you used it before its defined.
101  // struct Properties;
102 
103  /* (Requires the armarx::ArVizComponentPluginUser.)
104  /// Draw some boxes in ArViz.
105  void drawBoxes(const Properties& p, viz::Client& arviz);
106  */
107 
108 
109  private:
110 
111  static const std::string defaultName;
112 
113  std::unique_ptr<IkDemo> impl;
115 
116 
117  /// Properties shown in the Scenario GUI.
118  struct Properties
119  {
120  };
121  Properties properties;
122 
123  /* (Requires the armarx::LightweightRemoteGuiComponentPluginUser.)
124  /// Tab shown in the Remote GUI.
125  struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
126  {
127  armarx::RemoteGui::Client::LineEdit boxLayerName;
128  armarx::RemoteGui::Client::IntSpinBox numBoxes;
129 
130  armarx::RemoteGui::Client::Button drawBoxes;
131  };
132  RemoteGuiTab tab;
133  */
134 
135  };
136 
137 } // namespace armar6::skills::components::armar6_ik_demo
ArVizComponentPlugin.h
armar6::skills::components::armar6_ik_demo::ik_demo::onConnectComponent
void onConnectComponent() override
Definition: ik_demo.cpp:92
armar6::skills::components::armar6_ik_demo::ik_demo::onDisconnectComponent
void onDisconnectComponent() override
Definition: ik_demo.cpp:121
armar6::skills::components::armar6_ik_demo::ik_demo
Definition: ik_demo.h:46
armar6::skills::components::armar6_ik_demo::ik_demo::onInitComponent
void onInitComponent() override
Definition: ik_demo.cpp:81
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:36
TaskUtil.h
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armar6::skills::components::armar6_ik_demo::ik_demo::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ik_demo.cpp:54
IceUtil::Handle< class PropertyDefinitionContainer >
armar6::skills::components::armar6_ik_demo::ik_demo::onExitComponent
void onExitComponent() override
Definition: ik_demo.cpp:130
armar6::skills::components::armar6_ik_demo::ik_demo::ik_demo
ik_demo()
Definition: ik_demo.cpp:48
armar6::skills::components::armar6_ik_demo::ik_demo::GetDefaultName
static std::string GetDefaultName()
Get the component's default name.
Definition: ik_demo.cpp:157
armar6::skills::components::armar6_ik_demo::ik_demo::getDefaultName
std::string getDefaultName() const override
Definition: ik_demo.cpp:150
armar6::skills::components::armar6_ik_demo
Definition: ComponentInterface.ice:27