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
34namespace armarx
35{
36 /**
37 * @class KITHandUnitPropertyDefinitions
38 * @brief
39 */
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
79 void connectionStateChangedCallback(const KITHand::State state);
80
81 RemoteGui::WidgetPtr buildGui();
83
84 private:
85 KITHand::KITHandCommunicationDriverPtr _driver;
86
87 std::map<std::string, std::map<std::string, float>> _shapes;
88 };
89} // namespace armarx
Defines all necessary properties for armarx::HandUnit.
Definition HandUnit.h:43
Base unit for high-level access to robot hands.
Definition HandUnit.h:71
KITHandUnitPropertyDefinitions(std::string prefix)
Brief description of class KITHandUnit.
Definition KITHandUnit.h:58
void addShapeName(const std::string &name)
void onInitHandUnit() override
void setShape(const std::string &shapeName, const Ice::Current &=Ice::emptyCurrent) override
void onExitHandUnit() override
void connectionStateChangedCallback(const KITHand::State state)
RemoteGui::WidgetPtr buildGui()
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void addShape(const std::string &name, const std::map< std::string, float > &shape)
void onStartHandUnit() override
void setJointAngles(const NameValueMap &targetJointAngles, const Ice::Current &=Ice::emptyCurrent) override
void processGui(RemoteGui::TabProxy &prx)
NameValueMap getCurrentJointValues(const Ice::Current &=Ice::emptyCurrent) override
virtual std::string getDefaultName() const override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.