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