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
34 
35 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
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 
44  {
45  public:
47 
48  /**
49  * @see PropertyUser::createPropertyDefinitions()
50  */
52 
53  void onConnectComponent() override;
54  void onDisconnectComponent() override;
55 
56  Eigen::Isometry3f
57  worldToMapTransform() const override
58  {
60  }
61 
62  /**
63  * @see Component::getDefaultName()
64  *
65  */
66  std::string
67  getDefaultName() const override
68  {
69  return "SelfLocalizationDynamicSimulation";
70  }
71 
72  protected:
74 
75  private:
76  void periodicExec();
77 
78  void reportRobotPose();
79 
80  SimulatorInterfacePrx simulatorProxy;
81 
82  std::mutex dataMutex;
83 
84  struct Properties
85  {
86  int cycleTime = 30;
87  std::string robotName;
88  } p;
89  };
90 
91 } // namespace armarx
armarx::SelfLocalizationDynamicSimulation::execTask
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
Definition: SelfLocalizationDynamicSimulation.h:73
armarx::SelfLocalizationDynamicSimulation::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: SelfLocalizationDynamicSimulation.cpp:39
armarx::SelfLocalization
The SelfLocalization class.
Definition: SelfLocalization.h:84
PeriodicTask.h
armarx::SelfLocalizationDynamicSimulation::worldToMapTransform
Eigen::Isometry3f worldToMapTransform() const override
static transformation from world to map
Definition: SelfLocalizationDynamicSimulation.h:57
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:570
armarx::SelfLocalizationDynamicSimulation::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: SelfLocalizationDynamicSimulation.cpp:78
SelfLocalization.h
Component.h
armarx::SelfLocalizationDynamicSimulation::SelfLocalizationDynamicSimulation
SelfLocalizationDynamicSimulation()=default
armarx::SelfLocalizationDynamicSimulation::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: SelfLocalizationDynamicSimulation.cpp:52
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:27