InertialMeasurementUnit.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::ArmarXObjects::InertialMeasurementUnit
19  * @author Markus Grotz ( markus-grotz at web dot de )
20  * @date 2015
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 
29 
30 #include <RobotAPI/interface/units/InertialMeasurementUnit.h>
31 
32 #include "SensorActorUnit.h"
33 
34 namespace armarx
35 {
36  /**
37  * \class InertialMeasurementUnitPropertyDefinitions
38  * \brief
39  */
41  {
42  public:
45  {
46  defineOptionalProperty<std::string>(
47  "IMUTopicName", "IMUValues", "Name of the IMU Topic.");
48  }
49  };
50 
51  /**
52  * \class InertialMeasurementUnit
53  * \ingroup RobotAPI-SensorActorUnits
54  * \brief Base unit for %IMU sensors.
55  */
57  virtual public armarx::InertialMeasurementUnitInterface,
58  virtual public armarx::SensorActorUnit
59  {
60  public:
61  /**
62  * \see armarx::ManagedIceObject::getDefaultName()
63  */
64  std::string
65  getDefaultName() const override
66  {
67  return "InertialMeasurementUnit";
68  }
69 
70 
71  protected:
72  /**
73  * \see armarx::ManagedIceObject::onInitComponent()
74  */
75  void onInitComponent() override;
76 
77  /**
78  * \see armarx::ManagedIceObject::onConnectComponent()
79  */
80  void onConnectComponent() override;
81 
82  /**
83  * \see armarx::ManagedIceObject::onDisconnectComponent()
84  */
85  void onDisconnectComponent() override;
86 
87  /**
88  * \see armarx::ManagedIceObject::onExitComponent()
89  */
90  void onExitComponent() override;
91 
92 
93  /**
94  * \see PropertyUser::createPropertyDefinitions()
95  */
97 
98 
99  virtual void onInitIMU() = 0;
100  virtual void onStartIMU() = 0;
101  virtual void onExitIMU() = 0;
102 
103  InertialMeasurementUnitListenerPrx IMUTopicPrx;
104  };
105 } // namespace armarx
armarx::InertialMeasurementUnit::onExitIMU
virtual void onExitIMU()=0
armarx::InertialMeasurementUnit::IMUTopicPrx
InertialMeasurementUnitListenerPrx IMUTopicPrx
Definition: InertialMeasurementUnit.h:103
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::InertialMeasurementUnit::onInitIMU
virtual void onInitIMU()=0
armarx::InertialMeasurementUnit::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: InertialMeasurementUnit.cpp:56
SensorActorUnit.h
armarx::InertialMeasurementUnit::onConnectComponent
void onConnectComponent() override
Definition: InertialMeasurementUnit.cpp:37
armarx::InertialMeasurementUnit::getDefaultName
std::string getDefaultName() const override
Definition: InertialMeasurementUnit.h:65
armarx::InertialMeasurementUnitPropertyDefinitions::InertialMeasurementUnitPropertyDefinitions
InertialMeasurementUnitPropertyDefinitions(std::string prefix)
Definition: InertialMeasurementUnit.h:43
Component.h
armarx::InertialMeasurementUnit::onDisconnectComponent
void onDisconnectComponent() override
Definition: InertialMeasurementUnit.cpp:45
armarx::InertialMeasurementUnit::onInitComponent
void onInitComponent() override
Definition: InertialMeasurementUnit.cpp:30
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
IceUtil::Handle
Definition: forward_declarations.h:30
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:43
armarx::InertialMeasurementUnit
Base unit for IMU sensors.
Definition: InertialMeasurementUnit.h:56
armarx::InertialMeasurementUnit::onExitComponent
void onExitComponent() override
Definition: InertialMeasurementUnit.cpp:50
armarx::InertialMeasurementUnit::onStartIMU
virtual void onStartIMU()=0
armarx::InertialMeasurementUnitPropertyDefinitions
Definition: InertialMeasurementUnit.h:40
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27