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 onWorldToMapTransformUpdate(const Eigen::Isometry3f& world_T_map) = 0;
42
43 virtual ~LocalizationRemoteGuiCallee() = default;
44 };
45
47 {
48 public:
49 LocalizationRemoteGui(const RemoteGuiInterfacePrx& remoteGui,
51 const Eigen::Isometry3f& initialWorldToMap);
52
54
55 void shutdown();
56
57 void enable();
58 void disable();
59
60 private:
61 std::mutex mtx;
62 std::mutex handleEventsMtx;
63
64 RemoteGuiInterfacePrx remoteGui;
68
69 const Eigen::Isometry3f initialWorldToMap;
70 Eigen::Vector3f lastSentValues; // x [mm], y [mm], yaw [rad]
71
72 void createRemoteGuiTab();
73 void run();
74 void handleEvents(RemoteGui::TabProxy& tab);
75
76 const std::string REMOTE_GUI_TAB_NAME = "Cartographer";
77
78 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
79 {
81
82 struct
83 {
85
91 } worldToMap;
92 };
93
94 RemoteGuiTab guiTab;
95 };
96
97} // 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, const Eigen::Isometry3f &initialWorldToMap)
This file offers overloads of toIce() and fromIce() functions for STL container types.