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