SelfLocalizationDynamicSimulation.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
19  * @author Nikolaus Vahrenkamp
20  * @date 2014
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 #include <mutex>
28 
31 
32 // Simulator
33 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
34 
36 
37 namespace armarx
38 {
39  /**
40  * SelfLocalizationDynamicSimulation uses the armarx simulator to retrieve thre current psoe of the robot and reports it to the agent layer.
41  */
43  virtual public SelfLocalization
44 
45  {
46  public:
47 
49 
50  /**
51  * @see PropertyUser::createPropertyDefinitions()
52  */
54 
55  void onConnectComponent() override;
56  void onDisconnectComponent() override;
57 
58  Eigen::Affine3f worldToMapTransform() const override
59  {
61  }
62 
63  /**
64  * @see Component::getDefaultName()
65  *
66  */
67  std::string getDefaultName() const override
68  {
69  return "SelfLocalizationDynamicSimulation";
70  }
71 
72  protected:
73 
75 
76  private:
77 
78  void periodicExec();
79 
80  void reportRobotPose();
81 
82  SimulatorInterfacePrx simulatorProxy;
83 
84  std::mutex dataMutex;
85 
86  struct Properties
87  {
88  int cycleTime = 30;
89  std::string robotName;
90  } p;
91 
92  };
93 
94 } // namespace armarx
95 
armarx::SelfLocalizationDynamicSimulation::execTask
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
Definition: SelfLocalizationDynamicSimulation.h:74
armarx::SelfLocalizationDynamicSimulation::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SelfLocalizationDynamicSimulation.cpp:36
armarx::SelfLocalization
The SelfLocalization class.
Definition: SelfLocalization.h:84
PeriodicTask.h
armarx::SelfLocalizationDynamicSimulation
SelfLocalizationDynamicSimulation uses the armarx simulator to retrieve thre current psoe of the robo...
Definition: SelfLocalizationDynamicSimulation.h:42
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::SelfLocalizationDynamicSimulation::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: SelfLocalizationDynamicSimulation.cpp:73
SelfLocalization.h
Component.h
armarx::SelfLocalizationDynamicSimulation::SelfLocalizationDynamicSimulation
SelfLocalizationDynamicSimulation()=default
armarx::SelfLocalizationDynamicSimulation::worldToMapTransform
Eigen::Affine3f worldToMapTransform() const override
static transformation from world to map
Definition: SelfLocalizationDynamicSimulation.h:58
armarx::SelfLocalizationDynamicSimulation::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: SelfLocalizationDynamicSimulation.cpp:48
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::SelfLocalizationDynamicSimulation::getDefaultName
std::string getDefaultName() const override
Definition: SelfLocalizationDynamicSimulation.h:67
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28