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  */
41  {
42  public:
44  };
45 
46  /**
47  * @defgroup Component-KITHandUnit KITHandUnit
48  * @ingroup RobotAPI-Components
49  * A description of the component KITHandUnit.
50  *
51  * @class KITHandUnit
52  * @ingroup Component-KITHandUnit
53  * @brief Brief description of class KITHandUnit.
54  *
55  * Detailed description of class KITHandUnit.
56  */
57  class KITHandUnit : virtual public RemoteGuiComponentPluginUser, virtual public armarx::HandUnit
58  {
59  public:
60  /// @see armarx::ManagedIceObject::getDefaultName()
61  virtual std::string getDefaultName() const override;
62 
63  void onInitHandUnit() override;
64  void onStartHandUnit() override;
65  void onExitHandUnit() override;
66  void setShape(const std::string& shapeName,
67  const Ice::Current& = Ice::emptyCurrent) override;
68  void setJointAngles(const NameValueMap& targetJointAngles,
69  const Ice::Current& = Ice::emptyCurrent) override;
70  NameValueMap getCurrentJointValues(const Ice::Current& = Ice::emptyCurrent) override;
71 
72  void addShape(const std::string& name, const std::map<std::string, float>& shape);
73  void addShapeName(const std::string& name);
74 
75  protected:
76  /// @see PropertyUser::createPropertyDefinitions()
78 
80 
83 
84  private:
85  KITHand::KITHandCommunicationDriverPtr _driver;
86 
87  std::map<std::string, std::map<std::string, float>> _shapes;
88  };
89 } // namespace armarx
armarx::KITHandUnit::addShape
void addShape(const std::string &name, const std::map< std::string, float > &shape)
Definition: KITHandUnit.cpp:224
armarx::HandUnit
Base unit for high-level access to robot hands.
Definition: HandUnit.h:70
armarx::KITHandUnit::processGui
void processGui(RemoteGui::TabProxy &prx)
Definition: KITHandUnit.cpp:277
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::KITHandUnit
Brief description of class KITHandUnit.
Definition: KITHandUnit.h:57
armarx::KITHandUnit::connectionStateChangedCallback
void connectionStateChangedCallback(const KITHand::State state)
Definition: KITHandUnit.cpp:246
armarx::KITHandUnitPropertyDefinitions::KITHandUnitPropertyDefinitions
KITHandUnitPropertyDefinitions(std::string prefix)
Definition: KITHandUnit.cpp:35
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:180
HandUnit.h
KITProsthesis::ProsthesisState::State
State
Definition: KITProstheticHandInterface.ice:32
armarx::KITHandUnit::getCurrentJointValues
NameValueMap getCurrentJointValues(const Ice::Current &=Ice::emptyCurrent) override
Definition: KITHandUnit.cpp:214
armarx::KITHandUnit::getDefaultName
virtual std::string getDefaultName() const override
Definition: KITHandUnit.cpp:58
armarx::HandUnitPropertyDefinitions
Defines all necessary properties for armarx::HandUnit.
Definition: HandUnit.h:42
armarx::RemoteGuiComponentPluginUser
Definition: RemoteGuiComponentPlugin.h:221
armarx::KITHandUnit::setShape
void setShape(const std::string &shapeName, const Ice::Current &=Ice::emptyCurrent) override
Definition: KITHandUnit.cpp:154
armarx::KITHandUnit::onStartHandUnit
void onStartHandUnit() override
Definition: KITHandUnit.cpp:84
Component.h
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:67
armarx::KITHandUnit::onExitHandUnit
void onExitHandUnit() override
Definition: KITHandUnit.cpp:146
armarx::control::njoint_controller::platform::platform_follower_controller::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformFollowerController.h:88
armarx::KITHandUnit::buildGui
RemoteGui::WidgetPtr buildGui()
Definition: KITHandUnit.cpp:255
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::KITHandUnit::onInitHandUnit
void onInitHandUnit() override
Definition: KITHandUnit.cpp:64
RemoteGuiComponentPlugin.h
armarx::KITHandUnit::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: KITHandUnit.cpp:239
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::KITHandUnit::addShapeName
void addShapeName(const std::string &name)
Definition: KITHandUnit.cpp:231