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
37namespace armarx
38{
39 /**
40 * \class ForceTorqueUnitPropertyDefinitions
41 * \brief
42 */
44 {
45 public:
48 {
50 "AgentName", "Name of the agent for which the sensor values are provided");
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
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
The ForceTorqueUnit class.
void onInitComponent() override
Pure virtual hook for the subclass.
virtual void onExitForceTorqueUnit()=0
void onConnectComponent() override
Pure virtual hook for the subclass.
PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onStartForceTorqueUnit()=0
virtual void onInitForceTorqueUnit()=0
void onExitComponent() override
Hook for subclass.
ForceTorqueUnitListenerPrx listenerPrx
std::string getDefaultName() const override
Retrieve default name of component.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
SensorActorUnit()
Constructs a SensorActorUnit.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.