IMUSimulation.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2013-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 ArmarXSimulation::ArmarXObjects::IMUSimulation
19  * @author Markus Grotz ( markus dot grotz at kit dot edu )
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 <Eigen/Core>
29 #include <Eigen/Geometry>
30 
34 
37 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
38 
39 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
40 
41 namespace armarx
42 {
43  /**
44  * @class IMUSimulationPropertyDefinitions
45  * @brief
46  */
48  {
49  public:
51  };
52 
53  /**
54  * @defgroup Component-IMUSimulation IMUSimulation
55  * @ingroup ArmarXSimulation-Components
56  * A description of the component IMUSimulation.
57  *
58  * @class IMUSimulation
59  * @ingroup Component-IMUSimulation
60  * @brief Brief description of class IMUSimulation.
61  *
62  * Detailed description of class IMUSimulation.
63  */
64  class IMUSimulation : virtual public InertialMeasurementUnit
65  {
66  public:
67  /// @see armarx::ManagedIceObject::getDefaultName()
68  std::string getDefaultName() const override;
69 
70  protected:
71  /// @see PropertyUser::createPropertyDefinitions()
73 
74  void onInitIMU() override;
75 
76  void onStartIMU() override;
77 
78  void onExitIMU() override;
79 
80 
81  private:
82  void frameAcquisitionTaskLoop();
83 
84 
85  private:
87 
88  Eigen::Vector3f position;
89  Eigen::Quaternionf orientation;
90 
91 
92  std::string nodeName;
93  double timestamp;
94  Eigen::Vector3f linearVelocity;
95 
96 
97  SimulatorInterfacePrx simulator;
98  RobotStateComponentInterfacePrx robotStateComponent;
99  };
100 } // namespace armarx
armarx::IMUSimulation::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: IMUSimulation.cpp:148
armarx::IMUSimulationPropertyDefinitions::IMUSimulationPropertyDefinitions
IMUSimulationPropertyDefinitions(std::string prefix)
Definition: IMUSimulation.cpp:30
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
PeriodicTask.h
armarx::IMUSimulationPropertyDefinitions
Definition: IMUSimulation.h:47
InertialMeasurementUnit.h
TimestampVariant.h
armarx::IMUSimulation::onStartIMU
void onStartIMU() override
Definition: IMUSimulation.cpp:55
Component.h
armarx::Quaternion< float, 0 >
IceUtil::Handle< class PropertyDefinitionContainer >
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::IMUSimulation::onExitIMU
void onExitIMU() override
Definition: IMUSimulation.cpp:69
armarx::InertialMeasurementUnit
Base unit for IMU sensors.
Definition: InertialMeasurementUnit.h:56
armarx::IMUSimulation::onInitIMU
void onInitIMU() override
Definition: IMUSimulation.cpp:42
armarx::IMUSimulation::getDefaultName
std::string getDefaultName() const override
Definition: IMUSimulation.cpp:142
armarx::InertialMeasurementUnitPropertyDefinitions
Definition: InertialMeasurementUnit.h:40
armarx::IMUSimulation
Brief description of class IMUSimulation.
Definition: IMUSimulation.h:64
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
RobotStateComponent.h