OrientedTactileSensorUnitObserver.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 RobotAPI::units
19  * @author David Schiebener <schiebener at kit dot edu>
20  * @date 2014
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 #include <mutex>
28 
30 
31 #include <RobotAPI/interface/units/OrientedTactileSensorUnit.h>
32 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
34 
35 namespace armarx
36 {
37  /**
38  * \class OrientedTactileSensorUnitObserverPropertyDefinitions
39  * \brief
40  */
42  {
43  public:
46  {
47  defineOptionalProperty<std::string>(
48  "SensorTopicName", "OrientedTactileSensorValues", "Name of the Sensor Topic.");
49  defineOptionalProperty<std::string>(
50  "DebugDrawerTopic", "DebugDrawerUpdates", "Name of the DebugDrawerTopic");
51  }
52  };
53 
54  /**
55  * \class OrientedTactileSensorUnitObserver
56  * \ingroup RobotAPI-SensorActorUnits-observers
57  * \brief Observer monitoring @IMU sensor values
58  *
59  * The OrientedTactileSensorUnitObserver monitors @IMU sensor values published by OrientedTactileSensorUnit-implementations and offers condition checks on these values.
60  */
62  virtual public Observer,
63  virtual public OrientedTactileSensorUnitObserverInterface
64  {
65  public:
67  {
68  }
69 
70  std::string
71  getDefaultName() const override
72  {
73  return "OrientedTactileSensorUnitObserver";
74  }
75 
76  void onInitObserver() override;
77  void onConnectObserver() override;
78  void onExitObserver() override;
79 
80  void reportSensorValues(int id,
81  float pressure,
82  float qw,
83  float qx,
84  float qy,
85  float qz,
86  float pressureRate,
87  float rotationRate,
88  float accelerationRate,
89  float accelx,
90  float accely,
91  float accelz,
92  const TimestampBasePtr& timestamp,
93  const Ice::Current&) override;
94 
95  /**
96  * @see PropertyUser::createPropertyDefinitions()
97  */
99 
100 
101  private:
102  std::mutex dataMutex;
103  DebugDrawerInterfacePrx debugDrawerPrx;
104  };
105 } // namespace armarx
armarx::OrientedTactileSensorUnitObserverPropertyDefinitions
Definition: OrientedTactileSensorUnitObserver.h:41
armarx::OrientedTactileSensorUnitObserver::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: OrientedTactileSensorUnitObserver.cpp:125
armarx::Observer
Baseclass for all ArmarX Observers.
Definition: Observer.h:84
Pose.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
Observer.h
armarx::OrientedTactileSensorUnitObserver::onConnectObserver
void onConnectObserver() override
Framework hook.
Definition: OrientedTactileSensorUnitObserver.cpp:44
armarx::OrientedTactileSensorUnitObserver
Observer monitoring @IMU sensor values.
Definition: OrientedTactileSensorUnitObserver.h:61
armarx::OrientedTactileSensorUnitObserver::OrientedTactileSensorUnitObserver
OrientedTactileSensorUnitObserver()
Definition: OrientedTactileSensorUnitObserver.h:66
armarx::OrientedTactileSensorUnitObserver::onExitObserver
void onExitObserver() override
Framework hook.
Definition: OrientedTactileSensorUnitObserver.cpp:51
IceUtil::Handle
Definition: forward_declarations.h:30
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::OrientedTactileSensorUnitObserverPropertyDefinitions::OrientedTactileSensorUnitObserverPropertyDefinitions
OrientedTactileSensorUnitObserverPropertyDefinitions(std::string prefix)
Definition: OrientedTactileSensorUnitObserver.h:44
armarx::OrientedTactileSensorUnitObserver::onInitObserver
void onInitObserver() override
Framework hook.
Definition: OrientedTactileSensorUnitObserver.cpp:37
armarx::OrientedTactileSensorUnitObserver::reportSensorValues
void reportSensorValues(int id, float pressure, float qw, float qx, float qy, float qz, float pressureRate, float rotationRate, float accelerationRate, float accelx, float accely, float accelz, const TimestampBasePtr &timestamp, const Ice::Current &) override
Definition: OrientedTactileSensorUnitObserver.cpp:58
armarx::OrientedTactileSensorUnitObserver::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: OrientedTactileSensorUnitObserver.h:71
armarx::ObserverPropertyDefinitions
Definition: Observer.h:49
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27