HandUnitSimulation.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::units
19 * @author Peter Kaiser (peter dot kaiser at kit dot edu)
20 * @date 2017
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27
28#include "HandUnit.h"
29
30namespace armarx
31{
32 /**
33 * \class HandUnitSimulationPropertyDefinitions
34 * \brief Defines all necessary properties for armarx::HandUnitSimulation
35 */
37 {
38 public:
41 {
42 defineRequiredProperty<std::string>("KinematicUnitName",
43 "Name of the kinematic unit that should be used");
44 }
45 };
46
47 /**
48 * \class HandUnitSimulation
49 * \ingroup RobotAPI-SensorActorUnits-simulation
50 * \brief Simulates a robot hand.
51 *
52 * An instance of a HandUnitSimulation provides means to open, close, and shape hands.
53 * It uses the HandUnitListener Ice interface to report updates of its current state
54 */
55 class HandUnitSimulation : virtual public HandUnit
56 {
57 public:
58 // inherited from Component
59 std::string
60 getDefaultName() const override
61 {
62 return "HandUnitSimulation";
63 }
64
65 void onInitHandUnit() override;
66 void onStartHandUnit() override;
67 void onExitHandUnit() override;
68
69 /**
70 * Send command to the hand to form a specific shape position.
71 *
72 * \warning Not implemented yet!
73 */
74 void setShape(const std::string& shapeName,
75 const Ice::Current& c = Ice::emptyCurrent) override;
76
77 /**
78 * \warning Not implemented yet!
79 */
80 void setJointAngles(const NameValueMap& jointAngles,
81 const Ice::Current& c = Ice::emptyCurrent) override;
82
83 /**
84 * \see armarx::PropertyUser::createPropertyDefinitions()
85 */
87
88 protected:
89 KinematicUnitInterfacePrx kinematicUnitPrx;
90 };
91} // namespace armarx
constexpr T c
HandUnitPropertyDefinitions(std::string prefix)
Definition HandUnit.h:45
Simulates a robot hand.
void setJointAngles(const NameValueMap &jointAngles, const Ice::Current &c=Ice::emptyCurrent) override
void setShape(const std::string &shapeName, const Ice::Current &c=Ice::emptyCurrent) override
Send command to the hand to form a specific shape position.
KinematicUnitInterfacePrx kinematicUnitPrx
PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
Retrieve default name of component.
Base unit for high-level access to robot hands.
Definition HandUnit.h:71
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.