LocalizationRemoteGui.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Fabian Reister ( fabian dot reister at kit dot edu )
17 * @date 2021
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <mutex>
25
26#include <Eigen/Geometry>
27
29
31#include <ArmarXGui/interface/RemoteGuiInterface.h>
34
36{
37
39 {
40 public:
41 virtual void onLocalizationCorrection(const Eigen::Isometry3f& correction) = 0;
43
44 virtual ~LocalizationRemoteGuiCallee() = default;
45 };
46
48 {
49 public:
50 LocalizationRemoteGui(const RemoteGuiInterfacePrx& remoteGui,
52
54
55 void shutdown();
56
57 void enable();
58 void disable();
59
60 void reset();
61
62 private:
63 std::mutex mtx;
64
65 std::mutex handleEventsMtx;
66 RemoteGuiInterfacePrx remoteGui;
67
69
71
73
74 void createRemoteGuiTab();
75
76 // thread function
77 void run();
78
79 void handleEvents(RemoteGui::TabProxy& tab);
80
81 const std::string REMOTE_GUI_TAB_MAME = "Cartographer";
82
83 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
84 {
86
87 struct
88 {
90
94 } localizationCorrection;
95
96 struct
97 {
99
101 } controlGroup;
102 };
103
104 Eigen::Vector3f localizationCorrection = Eigen::Vector3f::Zero();
105
106 RemoteGuiTab guiTab;
107 };
108
109} // namespace armarx::localization_and_mapping::components::cartographer_localization_and_mapping
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
LocalizationRemoteGui(const RemoteGuiInterfacePrx &remoteGui, LocalizationRemoteGuiCallee &callee)
This file offers overloads of toIce() and fromIce() functions for STL container types.