KITHandUnit.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::KITHandUnit
17  * @author Stefan Reither ( stefan dot reither at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
26 #include <ArmarXCore/interface/observers/ObserverInterface.h>
27 
29 
31 
32 #include <KITHandCommunicationDriver.h>
33 
34 namespace armarx
35 {
36  /**
37  * @class KITHandUnitPropertyDefinitions
38  * @brief
39  */
42  {
43  public:
45  };
46 
47 
48 
49  /**
50  * @defgroup Component-KITHandUnit KITHandUnit
51  * @ingroup RobotAPI-Components
52  * A description of the component KITHandUnit.
53  *
54  * @class KITHandUnit
55  * @ingroup Component-KITHandUnit
56  * @brief Brief description of class KITHandUnit.
57  *
58  * Detailed description of class KITHandUnit.
59  */
60  class KITHandUnit :
61  virtual public RemoteGuiComponentPluginUser,
62  virtual public armarx::HandUnit
63  {
64  public:
65  /// @see armarx::ManagedIceObject::getDefaultName()
66  virtual std::string getDefaultName() const override;
67 
68  void onInitHandUnit() override;
69  void onStartHandUnit() override;
70  void onExitHandUnit() override;
71  void setShape(const std::string& shapeName, const Ice::Current& = Ice::emptyCurrent) override;
72  void setJointAngles(const NameValueMap& targetJointAngles, const Ice::Current& = Ice::emptyCurrent) override;
73  NameValueMap getCurrentJointValues(const Ice::Current& = Ice::emptyCurrent) override;
74 
75  void addShape(const std::string& name, const std::map<std::string, float>& shape);
76  void addShapeName(const std::string& name);
77 
78  protected:
79 
80  /// @see PropertyUser::createPropertyDefinitions()
82 
84 
87 
88  private:
89  KITHand::KITHandCommunicationDriverPtr _driver;
90 
91  std::map<std::string, std::map<std::string, float>> _shapes;
92 
93  };
94 }
armarx::KITHandUnit::addShape
void addShape(const std::string &name, const std::map< std::string, float > &shape)
Definition: KITHandUnit.cpp:198
armarx::HandUnit
Base unit for high-level access to robot hands.
Definition: HandUnit.h:71
armarx::KITHandUnit::processGui
void processGui(RemoteGui::TabProxy &prx)
Definition: KITHandUnit.cpp:248
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::KITHandUnit
Brief description of class KITHandUnit.
Definition: KITHandUnit.h:60
armarx::KITHandUnit::connectionStateChangedCallback
void connectionStateChangedCallback(const KITHand::State state)
Definition: KITHandUnit.cpp:218
armarx::navigation::platform_controller::platform_global_trajectory::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformGlobalTrajectoryController.h:93
armarx::KITHandUnitPropertyDefinitions::KITHandUnitPropertyDefinitions
KITHandUnitPropertyDefinitions(std::string prefix)
Definition: KITHandUnit.cpp:33
armarx::KITHandUnitPropertyDefinitions
Definition: KITHandUnit.h:40
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::KITHandUnit::setJointAngles
void setJointAngles(const NameValueMap &targetJointAngles, const Ice::Current &=Ice::emptyCurrent) override
Definition: KITHandUnit.cpp:158
HandUnit.h
KITProsthesis::ProsthesisState::State
State
Definition: KITProstheticHandInterface.ice:32
armarx::KITHandUnit::getCurrentJointValues
NameValueMap getCurrentJointValues(const Ice::Current &=Ice::emptyCurrent) override
Definition: KITHandUnit.cpp:190
armarx::KITHandUnit::getDefaultName
virtual std::string getDefaultName() const override
Definition: KITHandUnit.cpp:46
armarx::HandUnitPropertyDefinitions
Defines all necessary properties for armarx::HandUnit.
Definition: HandUnit.h:44
armarx::RemoteGuiComponentPluginUser
Definition: RemoteGuiComponentPlugin.h:240
armarx::KITHandUnit::setShape
void setShape(const std::string &shapeName, const Ice::Current &=Ice::emptyCurrent) override
Definition: KITHandUnit.cpp:133
armarx::KITHandUnit::onStartHandUnit
void onStartHandUnit() override
Definition: KITHandUnit.cpp:69
Component.h
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:66
armarx::KITHandUnit::onExitHandUnit
void onExitHandUnit() override
Definition: KITHandUnit.cpp:126
armarx::KITHandUnit::buildGui
RemoteGui::WidgetPtr buildGui()
Definition: KITHandUnit.cpp:226
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::KITHandUnit::onInitHandUnit
void onInitHandUnit() override
Definition: KITHandUnit.cpp:51
RemoteGuiComponentPlugin.h
armarx::KITHandUnit::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: KITHandUnit.cpp:212
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::KITHandUnit::addShapeName
void addShapeName(const std::string &name)
Definition: KITHandUnit.cpp:204