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
37namespace 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 {
59 return Eigen::Isometry3f::Identity();
60 }
61
62 /**
63 * @see Component::getDefaultName()
64 *
65 */
66 static std::string GetDefaultName();
67 std::string
68 getDefaultName() const override
69 {
70 return GetDefaultName();
71 }
72
73 protected:
75
76 private:
77 void periodicExec();
78
79 void reportRobotPose();
80
81 SimulatorInterfacePrx simulatorProxy;
82
83 std::mutex dataMutex;
84
85 struct Properties
86 {
87 int cycleTime = 30;
88 std::string robotName;
89 } p;
90 };
91
92} // namespace armarx
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
PeriodicTask< SelfLocalizationDynamicSimulation >::pointer_type execTask
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Eigen::Isometry3f worldToMapTransform() const override
static transformation from world to map
std::string getDefaultName() const override
Retrieve default name of component.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.