LaserScannerUnitObserver.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 Fabian Paus ( fabian dot paus at kit dot edu )
20  * @date 2017
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 #include <RobotAPI/interface/units/LaserScannerUnit.h>
29 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
31 
32 #include <mutex>
33 
34 namespace armarx
35 {
36  /**
37  * \class LaserScannerUnitObserverPropertyDefinitions
38  * \brief
39  */
42  {
43  public:
46  {
47  defineOptionalProperty<std::string>("LaserScannerTopicName", "LaserScans", "Name of the laser scan topic.");
48  }
49  };
50 
51 
52  /**
53  * \class LaserScannerUnitObserver
54  * \ingroup RobotAPI-SensorActorUnits-observers
55  * \brief Observer monitoring laser scanner values
56  *
57  * The LaserScannerUnitObserver monitors laser scanner values published by LaserScannerUnit-implementations.
58  */
60  virtual public Observer,
61  virtual public LaserScannerUnitObserverInterface
62  {
63  public:
65 
66  std::string getDefaultName() const override
67  {
68  return "LaserScannerUnitObserver";
69  }
70  void onInitObserver() override;
71  void onConnectObserver() override;
72  void onExitObserver() override;
73  /**
74  * @see PropertyUser::createPropertyDefinitions()
75  */
77 
78  void reportSensorValues(const std::string& device, const std::string& name, const LaserScan& scan,
79  const TimestampBasePtr& timestamp, const Ice::Current& c) override;
80 
81  private:
82  std::mutex dataMutex;
83 
84  };
85 }
86 
armarx::LaserScannerUnitObserver::reportSensorValues
void reportSensorValues(const std::string &device, const std::string &name, const LaserScan &scan, const TimestampBasePtr &timestamp, const Ice::Current &c) override
Definition: LaserScannerUnitObserver.cpp:65
armarx::Observer
Baseclass for all ArmarX Observers.
Definition: Observer.h:80
armarx::LaserScannerUnitObserverPropertyDefinitions::LaserScannerUnitObserverPropertyDefinitions
LaserScannerUnitObserverPropertyDefinitions(std::string prefix)
Definition: LaserScannerUnitObserver.h:44
armarx::LaserScannerUnitObserver::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: LaserScannerUnitObserver.h:66
Pose.h
armarx::LaserScannerUnitObserver
Observer monitoring laser scanner values.
Definition: LaserScannerUnitObserver.h:59
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::LaserScannerUnitObserver::onConnectObserver
void onConnectObserver() override
Framework hook.
Definition: LaserScannerUnitObserver.cpp:50
armarx::LaserScannerUnitObserverPropertyDefinitions
Definition: LaserScannerUnitObserver.h:40
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
Observer.h
armarx::LaserScannerUnitObserver::onExitObserver
void onExitObserver() override
Framework hook.
Definition: LaserScannerUnitObserver.cpp:55
armarx::LaserScannerUnitObserver::LaserScannerUnitObserver
LaserScannerUnitObserver()
Definition: LaserScannerUnitObserver.h:64
armarx::LaserScannerUnitObserver::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: LaserScannerUnitObserver.cpp:60
armarx::LaserScannerUnitObserver::onInitObserver
void onInitObserver() override
Framework hook.
Definition: LaserScannerUnitObserver.cpp:38
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::ObserverPropertyDefinitions
Definition: Observer.h:50
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28