ForceTorqueUnit.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 2011
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 <string>
29 
33 
35 #include <RobotAPI/interface/units/ForceTorqueUnit.h>
36 
37 namespace armarx
38 {
39  /**
40  * \class ForceTorqueUnitPropertyDefinitions
41  * \brief
42  */
44  {
45  public:
48  {
49  defineRequiredProperty<std::string>(
50  "AgentName", "Name of the agent for which the sensor values are provided");
51  defineOptionalProperty<std::string>(
52  "ForceTorqueTopicName",
53  "ForceTorqueValues",
54  "Name of the topic on which the sensor values are provided");
55 
56 
57  // No required properties
58  }
59  };
60 
61  /**
62  * \defgroup Component-ForceTorqueUnit ForceTorqueUnit
63  * \ingroup RobotAPI-SensorActorUnits
64  * \brief Base unit for force/torque sensors.
65  *
66  * The ForceTorqueUnit class is the base unit for force/torque sensors.
67  * It implements the ForceTorqueUnit-interface and is responsible for distributing F/T sensor-values in ArmarX.
68  * RobotAPI contains the ForceTorqueUnitSimulation class that does a very basic simulation of F/T-sensors.
69  * Other (hardware related) implementations of this unit can be found in the respective ArmarX projects.
70  */
71 
72  /**
73  * @ingroup Component-ForceTorqueUnit
74  * @brief The ForceTorqueUnit class
75  */
76  class ForceTorqueUnit : virtual public ForceTorqueUnitInterface, virtual public SensorActorUnit
77  {
78  public:
79  std::string
80  getDefaultName() const override
81  {
82  return "ForceTorqueUnit";
83  }
84 
85  void onInitComponent() override;
86  void onConnectComponent() override;
87  void onExitComponent() override;
88 
89  virtual void onInitForceTorqueUnit() = 0;
90  virtual void onStartForceTorqueUnit() = 0;
91  virtual void onExitForceTorqueUnit() = 0;
92 
94 
95  protected:
96  ForceTorqueUnitListenerPrx listenerPrx;
97  std::string listenerName;
98  };
99 } // namespace armarx
armarx::ForceTorqueUnit::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ForceTorqueUnit.cpp:52
armarx::ForceTorqueUnitPropertyDefinitions
Definition: ForceTorqueUnit.h:43
armarx::ForceTorqueUnit::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ForceTorqueUnit.cpp:38
Properties.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::ForceTorqueUnit
The ForceTorqueUnit class.
Definition: ForceTorqueUnit.h:76
armarx::ForceTorqueUnit::onExitForceTorqueUnit
virtual void onExitForceTorqueUnit()=0
SensorActorUnit.h
armarx::ForceTorqueUnit::onStartForceTorqueUnit
virtual void onStartForceTorqueUnit()=0
armarx::ForceTorqueUnit::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: ForceTorqueUnit.h:80
armarx::ForceTorqueUnit::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ForceTorqueUnit.cpp:30
armarx::ForceTorqueUnitPropertyDefinitions::ForceTorqueUnitPropertyDefinitions
ForceTorqueUnitPropertyDefinitions(std::string prefix)
Definition: ForceTorqueUnit.h:46
Component.h
armarx::ForceTorqueUnit::listenerPrx
ForceTorqueUnitListenerPrx listenerPrx
Definition: ForceTorqueUnit.h:96
armarx::ForceTorqueUnit::listenerName
std::string listenerName
Definition: ForceTorqueUnit.h:97
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
armarx::ForceTorqueUnit::onInitForceTorqueUnit
virtual void onInitForceTorqueUnit()=0
IceUtil::Handle
Definition: forward_declarations.h:30
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:43
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::ForceTorqueUnit::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: ForceTorqueUnit.cpp:46
ImportExportComponent.h