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 
30 namespace armarx
31 {
32  /**
33  * \class HandUnitSimulationPropertyDefinitions
34  * \brief Defines all necessary properties for armarx::HandUnitSimulation
35  */
38  {
39  public:
42  {
43  defineRequiredProperty<std::string>("KinematicUnitName", "Name of the kinematic unit that should be used");
44  }
45  };
46 
47 
48  /**
49  * \class HandUnitSimulation
50  * \ingroup RobotAPI-SensorActorUnits-simulation
51  * \brief Simulates a robot hand.
52  *
53  * An instance of a HandUnitSimulation provides means to open, close, and shape hands.
54  * It uses the HandUnitListener Ice interface to report updates of its current state
55  */
57  virtual public HandUnit
58  {
59  public:
60  // inherited from Component
61  std::string getDefaultName() const override
62  {
63  return "HandUnitSimulation";
64  }
65 
66  void onInitHandUnit() override;
67  void onStartHandUnit() override;
68  void onExitHandUnit() override;
69 
70  /**
71  * Send command to the hand to form a specific shape position.
72  *
73  * \warning Not implemented yet!
74  */
75  void setShape(const std::string& shapeName, const Ice::Current& c = Ice::emptyCurrent) override;
76 
77  /**
78  * \warning Not implemented yet!
79  */
80  void setJointAngles(const NameValueMap& jointAngles, const Ice::Current& c = Ice::emptyCurrent) override;
81 
82  /**
83  * \see armarx::PropertyUser::createPropertyDefinitions()
84  */
86 
87  protected:
88  KinematicUnitInterfacePrx kinematicUnitPrx;
89  };
90 }
91 
armarx::HandUnit
Base unit for high-level access to robot hands.
Definition: HandUnit.h:71
armarx::HandUnitSimulation::onInitHandUnit
void onInitHandUnit() override
Definition: HandUnitSimulation.cpp:37
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::navigation::platform_controller::platform_global_trajectory::NameValueMap
std::map< std::string, float > NameValueMap
Definition: PlatformGlobalTrajectoryController.h:93
armarx::HandUnitSimulationPropertyDefinitions::HandUnitSimulationPropertyDefinitions
HandUnitSimulationPropertyDefinitions(std::string prefix)
Definition: HandUnitSimulation.h:40
armarx::HandUnitSimulation::kinematicUnitPrx
KinematicUnitInterfacePrx kinematicUnitPrx
Definition: HandUnitSimulation.h:88
HandUnit.h
armarx::HandUnitSimulation::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: HandUnitSimulation.h:61
armarx::HandUnitPropertyDefinitions
Defines all necessary properties for armarx::HandUnit.
Definition: HandUnit.h:44
armarx::HandUnitSimulation::onStartHandUnit
void onStartHandUnit() override
Definition: HandUnitSimulation.cpp:43
armarx::HandUnitSimulationPropertyDefinitions
Defines all necessary properties for armarx::HandUnitSimulation.
Definition: HandUnitSimulation.h:36
armarx::channels::KinematicUnitObserver::jointAngles
const KinematicUnitDatafieldCreator jointAngles("jointAngles")
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::HandUnitSimulation
Simulates a robot hand.
Definition: HandUnitSimulation.h:56
armarx::HandUnitSimulation::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: HandUnitSimulation.cpp:56
armarx::HandUnitSimulation::setShape
void setShape(const std::string &shapeName, const Ice::Current &c=Ice::emptyCurrent) override
Send command to the hand to form a specific shape position.
Definition: HandUnitSimulation.cpp:61
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::HandUnitSimulation::setJointAngles
void setJointAngles(const NameValueMap &jointAngles, const Ice::Current &c=Ice::emptyCurrent) override
Definition: HandUnitSimulation.cpp:111
armarx::HandUnitSimulation::onExitHandUnit
void onExitHandUnit() override
Definition: HandUnitSimulation.cpp:52