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 
31 
32 
33 
34 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
37 
38 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
39 
40 #include <Eigen/Core>
41 #include <Eigen/Geometry>
42 
43 namespace armarx
44 {
45  /**
46  * @class IMUSimulationPropertyDefinitions
47  * @brief
48  */
51  {
52  public:
54  };
55 
56 
57  /**
58  * @defgroup Component-IMUSimulation IMUSimulation
59  * @ingroup ArmarXSimulation-Components
60  * A description of the component IMUSimulation.
61  *
62  * @class IMUSimulation
63  * @ingroup Component-IMUSimulation
64  * @brief Brief description of class IMUSimulation.
65  *
66  * Detailed description of class IMUSimulation.
67  */
68  class IMUSimulation :
69  virtual public InertialMeasurementUnit
70  {
71  public:
72 
73  /// @see armarx::ManagedIceObject::getDefaultName()
74  std::string getDefaultName() const override;
75 
76  protected:
77 
78  /// @see PropertyUser::createPropertyDefinitions()
80 
81  void onInitIMU() override;
82 
83  void onStartIMU() override;
84 
85  void onExitIMU() override;
86 
87 
88  private:
89 
90 
91  void frameAcquisitionTaskLoop();
92 
93 
94  private:
95 
97 
98  Eigen::Vector3f position;
99  Eigen::Quaternionf orientation;
100 
101 
102  std::string nodeName;
103  double timestamp;
104  Eigen::Vector3f linearVelocity;
105 
106 
107  SimulatorInterfacePrx simulator;
108  RobotStateComponentInterfacePrx robotStateComponent;
109  };
110 }
111 
armarx::IMUSimulation::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: IMUSimulation.cpp:134
armarx::IMUSimulationPropertyDefinitions::IMUSimulationPropertyDefinitions
IMUSimulationPropertyDefinitions(std::string prefix)
Definition: IMUSimulation.cpp:32
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
PeriodicTask.h
armarx::IMUSimulationPropertyDefinitions
Definition: IMUSimulation.h:49
InertialMeasurementUnit.h
TimestampVariant.h
armarx::IMUSimulation::onStartIMU
void onStartIMU() override
Definition: IMUSimulation.cpp:53
Component.h
armarx::Quaternion< float, 0 >
IceUtil::Handle< class PropertyDefinitionContainer >
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::IMUSimulation::onExitIMU
void onExitIMU() override
Definition: IMUSimulation.cpp:65
armarx::InertialMeasurementUnit
Base unit for IMU sensors.
Definition: InertialMeasurementUnit.h:55
armarx::IMUSimulation::onInitIMU
void onInitIMU() override
Definition: IMUSimulation.cpp:41
armarx::IMUSimulation::getDefaultName
std::string getDefaultName() const override
Definition: IMUSimulation.cpp:128
armarx::InertialMeasurementUnitPropertyDefinitions
Definition: InertialMeasurementUnit.h:39
armarx::IMUSimulation
Brief description of class IMUSimulation.
Definition: IMUSimulation.h:68
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
RobotStateComponent.h