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 
25 #include <RobotAPI/interface/units/TCPControlUnit.h>
26 
27 #include <mutex>
28 
29 namespace armarx
30 {
31  /**
32  * \class TCPControlUnitObserverPropertyDefinitions
33  * \brief
34  */
37  {
38  public:
41  {
42  defineOptionalProperty<std::string>("TCPControlUnitName", "TCPControlUnit", "Name of the TCPControlUnit");
43  }
44  };
45 
46  /**
47  * \class TCPControlUnitObserver
48  * \ingroup RobotAPI-SensorActorUnits-observers
49  * \brief Observer monitoring TCP-related sensor values.
50  *
51  * The TCPControlUnitObserver allows the installation of conditions on all channel reported by the TCPControlUnit.
52  * These include TCP pose and velocity.
53  *
54  * Available condition checks are: *updated*, *equals*, *approx*, *larger*, *smaller* and *magnitudelarger*.
55  */
57  virtual public Observer,
58  virtual public TCPControlUnitObserverInterface
59  {
60  public:
62 
63  // framework hooks
64  std::string getDefaultName() const override
65  {
66  return "TCPControlUnitObserver";
67  }
68  void onInitObserver() override;
69  void onConnectObserver() override;
70 
71  /**
72  * \see PropertyUser::createPropertyDefinitions()
73  */
75 
76  public:
77  // TCPControlUnitListener interface
78  void reportTCPPose(const FramedPoseBaseMap& poseMap, const Ice::Current& c = Ice::emptyCurrent) override;
79  void reportTCPVelocities(const FramedDirectionMap& tcpTranslationVelocities, const FramedDirectionMap& tcpOrientationVelocities, const Ice::Current& c = Ice::emptyCurrent) override;
80 
81  std::mutex dataMutex;
82  };
83 
84 }
85 
armarx::TCPControlUnitObserverPropertyDefinitions
Definition: TCPControlUnitObserver.h:35
armarx::TCPControlUnitObserverPropertyDefinitions::TCPControlUnitObserverPropertyDefinitions
TCPControlUnitObserverPropertyDefinitions(std::string prefix)
Definition: TCPControlUnitObserver.h:39
armarx::TCPControlUnitObserver::onConnectObserver
void onConnectObserver() override
Framework hook.
Definition: TCPControlUnitObserver.cpp:62
armarx::Observer
Baseclass for all ArmarX Observers.
Definition: Observer.h:80
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::TCPControlUnitObserver::dataMutex
std::mutex dataMutex
Definition: TCPControlUnitObserver.h:81
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::TCPControlUnitObserver::TCPControlUnitObserver
TCPControlUnitObserver()
Definition: TCPControlUnitObserver.cpp:41
Observer.h
armarx::TCPControlUnitObserver::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: TCPControlUnitObserver.cpp:69
armarx::FramedPoseBaseMap
::std::map< ::std::string, ::armarx::FramedPoseBasePtr > FramedPoseBaseMap
Definition: RobotStateObserver.h:55
armarx::TCPControlUnitObserver::reportTCPVelocities
void reportTCPVelocities(const FramedDirectionMap &tcpTranslationVelocities, const FramedDirectionMap &tcpOrientationVelocities, const Ice::Current &c=Ice::emptyCurrent) override
Definition: TCPControlUnitObserver.cpp:127
armarx::TCPControlUnitObserver::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: TCPControlUnitObserver.h:64
armarx::TCPControlUnitObserver::reportTCPPose
void reportTCPPose(const FramedPoseBaseMap &poseMap, const Ice::Current &c=Ice::emptyCurrent) override
Definition: TCPControlUnitObserver.cpp:75
armarx::TCPControlUnitObserver
Observer monitoring TCP-related sensor values.
Definition: TCPControlUnitObserver.h:56
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::TCPControlUnitObserver::onInitObserver
void onInitObserver() override
Framework hook.
Definition: TCPControlUnitObserver.cpp:45
armarx::ObserverPropertyDefinitions
Definition: Observer.h:50
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28