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 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
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
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.