TCPControlUnitObserver.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package ArmarX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2013
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22#pragma once
23
24#include <mutex>
25
27
28#include <RobotAPI/interface/units/TCPControlUnit.h>
29
30namespace armarx
31{
32 /**
33 * \class TCPControlUnitObserverPropertyDefinitions
34 * \brief
35 */
37 {
38 public:
41 {
43 "TCPControlUnitName", "TCPControlUnit", "Name of the TCPControlUnit");
44 }
45 };
46
47 /**
48 * \class TCPControlUnitObserver
49 * \ingroup RobotAPI-SensorActorUnits-observers
50 * \brief Observer monitoring TCP-related sensor values.
51 *
52 * The TCPControlUnitObserver allows the installation of conditions on all channel reported by the TCPControlUnit.
53 * These include TCP pose and velocity.
54 *
55 * Available condition checks are: *updated*, *equals*, *approx*, *larger*, *smaller* and *magnitudelarger*.
56 */
58 virtual public Observer,
59 virtual public TCPControlUnitObserverInterface
60 {
61 public:
63
64 // framework hooks
65 std::string
66 getDefaultName() const override
67 {
68 return "TCPControlUnitObserver";
69 }
70
71 void onInitObserver() override;
72 void onConnectObserver() override;
73
74 /**
75 * \see PropertyUser::createPropertyDefinitions()
76 */
78
79 public:
80 // TCPControlUnitListener interface
81 void reportTCPPose(const FramedPoseBaseMap& poseMap,
82 const Ice::Current& c = Ice::emptyCurrent) override;
83 void reportTCPVelocities(const FramedDirectionMap& tcpTranslationVelocities,
84 const FramedDirectionMap& tcpOrientationVelocities,
85 const Ice::Current& c = Ice::emptyCurrent) override;
86
87 std::mutex dataMutex;
88 };
89
90} // namespace armarx
constexpr T c
ObserverPropertyDefinitions(std::string prefix)
Definition Observer.h:52
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)
void onConnectObserver() override
Framework hook.
void reportTCPPose(const FramedPoseBaseMap &poseMap, const Ice::Current &c=Ice::emptyCurrent) override
PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitObserver() override
Framework hook.
void reportTCPVelocities(const FramedDirectionMap &tcpTranslationVelocities, const FramedDirectionMap &tcpOrientationVelocities, const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::std::map<::std::string, ::armarx::FramedPoseBasePtr > FramedPoseBaseMap