slam_toolbox_rviz_plugin.h
Go to the documentation of this file.
1 /*
2  * slam_toolbox
3  * Copyright (c) 2018, Simbe Robotics, Inc.
4  *
5  * THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
6  * COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
7  * COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
8  * AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
9  *
10  * BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
11  * BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS
12  * CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
13  * CONDITIONS.
14  *
15  */
16 
17 /* Author: Steven Macenski */
18 
19 #ifndef SLAM_TOOLBOX_PANEL_H
20 #define SLAM_TOOLBOX_PANEL_H
21 
22 // ROS
23 #include <ros/ros.h>
24 #include <rviz/panel.h>
25 // STL
26 #include <stdlib.h>
27 #include <stdio.h>
28 // QT
29 #include <QPushButton>
30 #include <QCheckBox>
31 #include <QLineEdit>
32 #include <QComboBox>
33 #include <QVBoxLayout>
34 #include <QHBoxLayout>
35 #include <QtGui>
36 #include <QLabel>
37 #include <QFrame>
38 #include <QRadioButton>
39 
40 #include <thread>
41 
42 // msgs
43 #include <geometry_msgs/PoseWithCovarianceStamped.h>
44 #include "slam_toolbox_msgs/AddSubmap.h"
45 #include "slam_toolbox_msgs/Clear.h"
46 #include "slam_toolbox_msgs/ClearQueue.h"
47 #include "slam_toolbox_msgs/DeserializePoseGraph.h"
48 #include "slam_toolbox_msgs/LoopClosure.h"
49 #include "slam_toolbox_msgs/MergeMaps.h"
50 #include "slam_toolbox_msgs/Pause.h"
51 #include "slam_toolbox_msgs/SaveMap.h"
52 #include "slam_toolbox_msgs/SerializePoseGraph.h"
53 #include "slam_toolbox_msgs/ToggleInteractive.h"
54 
55 class QLineEdit;
56 class QSpinBox;
57 class QComboBox;
58 
59 #include <rviz/panel.h>
60 
61 namespace slam_toolbox
62 {
63 
65 {
70 };
71 
73 {
74  Q_OBJECT
75 
76 public:
77  SlamToolboxPlugin(QWidget* parent = 0);
79 
80 public Q_SLOTS:
81 protected Q_SLOTS:
82  void ClearChanges();
83  void SaveChanges();
84  void SaveMap();
85  void ClearQueue();
86  void InteractiveCb(int state);
87  void PauseMeasurementsCb(int state);
88  void FirstNodeMatchCb();
89  void PoseEstMatchCb();
90  void CurEstMatchCb();
91  void LocalizeCb();
92  void LoadSubmap();
93  void GenerateMap();
94  void SerializeMap();
95  void DeserializeMap();
96 
98 
99 protected:
100  QVBoxLayout* _vbox;
101  QHBoxLayout* _hbox1;
102  QHBoxLayout* _hbox2;
103  QHBoxLayout* _hbox3;
104  QHBoxLayout* _hbox4;
105  QHBoxLayout* _hbox5;
106  QHBoxLayout* _hbox6;
107  QHBoxLayout* _hbox7;
108  QHBoxLayout* _hbox8;
109  QHBoxLayout* _hbox9;
110  QHBoxLayout* _hbox10;
111 
112  QPushButton* _button1;
113  QPushButton* _button2;
114  QPushButton* _button3;
115  QPushButton* _button4;
116  QPushButton* _button5;
117  QPushButton* _button6;
118  QPushButton* _button7;
119  QPushButton* _button8;
120 
121  QLineEdit* _line1;
122  QLineEdit* _line2;
123  QLineEdit* _line3;
124  QLineEdit* _line4;
125  QLineEdit* _line5;
126  QLineEdit* _line6;
127  QLineEdit* _line7;
128 
129  QCheckBox* _check1;
130  QCheckBox* _check2;
131 
132  QRadioButton* _radio1;
133  QRadioButton* _radio2;
134  QRadioButton* _radio3;
135  QRadioButton* _radio4;
136 
137  QLabel* _label1;
138  QLabel* _label2;
139  QLabel* _label4;
140  QLabel* _label5;
141  QLabel* _label6;
142  QLabel* _label7;
143  QLabel* _label8;
144 
145  QFrame* _line;
146 
149 
150  void InitialPoseCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& pose);
151 
152  std::thread* _thread;
153 
155 };
156 
157 } // end namespace
158 
159 #endif
panel.h
slam_toolbox::SlamToolboxPlugin::_button4
QPushButton * _button4
Definition: slam_toolbox_rviz_plugin.h:115
slam_toolbox::SlamToolboxPlugin::_label8
QLabel * _label8
Definition: slam_toolbox_rviz_plugin.h:143
slam_toolbox::SlamToolboxPlugin::_button8
QPushButton * _button8
Definition: slam_toolbox_rviz_plugin.h:119
slam_toolbox::SlamToolboxPlugin::_label4
QLabel * _label4
Definition: slam_toolbox_rviz_plugin.h:139
slam_toolbox::SlamToolboxPlugin::_hbox6
QHBoxLayout * _hbox6
Definition: slam_toolbox_rviz_plugin.h:106
slam_toolbox::SlamToolboxPlugin::_radio4
QRadioButton * _radio4
Definition: slam_toolbox_rviz_plugin.h:135
slam_toolbox::SlamToolboxPlugin::_line6
QLineEdit * _line6
Definition: slam_toolbox_rviz_plugin.h:126
slam_toolbox::SlamToolboxPlugin::ClearQueue
void ClearQueue()
Definition: slam_toolbox_rviz_plugin.cpp:379
rviz::Panel
slam_toolbox::PROCESS_NEAR_REGION_CMT
@ PROCESS_NEAR_REGION_CMT
Definition: slam_toolbox_rviz_plugin.h:68
slam_toolbox::SlamToolboxPlugin::_load_submap_for_merging
ros::ServiceClient _load_submap_for_merging
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::_line1
QLineEdit * _line1
Definition: slam_toolbox_rviz_plugin.h:121
slam_toolbox::SlamToolboxPlugin::_match_type
ContinueMappingType _match_type
Definition: slam_toolbox_rviz_plugin.h:154
slam_toolbox::SlamToolboxPlugin::_thread
std::thread * _thread
Definition: slam_toolbox_rviz_plugin.h:152
slam_toolbox::SlamToolboxPlugin::_hbox4
QHBoxLayout * _hbox4
Definition: slam_toolbox_rviz_plugin.h:104
slam_toolbox::SlamToolboxPlugin::_line2
QLineEdit * _line2
Definition: slam_toolbox_rviz_plugin.h:122
ros.h
slam_toolbox::SlamToolboxPlugin::SlamToolboxPlugin
SlamToolboxPlugin(QWidget *parent=0)
Definition: slam_toolbox_rviz_plugin.cpp:41
slam_toolbox::SlamToolboxPlugin::_clearChanges
ros::ServiceClient _clearChanges
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::_label1
QLabel * _label1
Definition: slam_toolbox_rviz_plugin.h:137
slam_toolbox::SlamToolboxPlugin::ClearChanges
void ClearChanges()
Definition: slam_toolbox_rviz_plugin.cpp:343
slam_toolbox::SlamToolboxPlugin::_radio1
QRadioButton * _radio1
Definition: slam_toolbox_rviz_plugin.h:132
slam_toolbox::SlamToolboxPlugin::_button2
QPushButton * _button2
Definition: slam_toolbox_rviz_plugin.h:113
slam_toolbox::SlamToolboxPlugin::FirstNodeMatchCb
void FirstNodeMatchCb()
Definition: slam_toolbox_rviz_plugin.cpp:412
slam_toolbox::LOCALIZE_CMT
@ LOCALIZE_CMT
Definition: slam_toolbox_rviz_plugin.h:69
slam_toolbox::SlamToolboxPlugin::_button6
QPushButton * _button6
Definition: slam_toolbox_rviz_plugin.h:117
slam_toolbox::SlamToolboxPlugin::_load_map
ros::ServiceClient _load_map
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::SaveMap
void SaveMap()
Definition: slam_toolbox_rviz_plugin.cpp:366
slam_toolbox::SlamToolboxPlugin::LocalizeCb
void LocalizeCb()
Definition: slam_toolbox_rviz_plugin.cpp:458
slam_toolbox::SlamToolboxPlugin::_line7
QLineEdit * _line7
Definition: slam_toolbox_rviz_plugin.h:127
slam_toolbox::SlamToolboxPlugin::_check1
QCheckBox * _check1
Definition: slam_toolbox_rviz_plugin.h:129
slam_toolbox::SlamToolboxPlugin::_saveMap
ros::ServiceClient _saveMap
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::updateCheckStateIfExternalChange
void updateCheckStateIfExternalChange()
Definition: slam_toolbox_rviz_plugin.cpp:474
slam_toolbox::SlamToolboxPlugin::DeserializeMap
void DeserializeMap()
Definition: slam_toolbox_rviz_plugin.cpp:267
slam_toolbox::SlamToolboxPlugin::CurEstMatchCb
void CurEstMatchCb()
Definition: slam_toolbox_rviz_plugin.cpp:442
slam_toolbox::SlamToolboxPlugin::SaveChanges
void SaveChanges()
Definition: slam_toolbox_rviz_plugin.cpp:354
slam_toolbox::SlamToolboxPlugin
Definition: slam_toolbox_rviz_plugin.h:72
slam_toolbox::SlamToolboxPlugin::_line3
QLineEdit * _line3
Definition: slam_toolbox_rviz_plugin.h:123
slam_toolbox::SlamToolboxPlugin::_label6
QLabel * _label6
Definition: slam_toolbox_rviz_plugin.h:141
slam_toolbox::SlamToolboxPlugin::_line
QFrame * _line
Definition: slam_toolbox_rviz_plugin.h:145
slam_toolbox::SlamToolboxPlugin::PoseEstMatchCb
void PoseEstMatchCb()
Definition: slam_toolbox_rviz_plugin.cpp:427
slam_toolbox::SlamToolboxPlugin::_hbox7
QHBoxLayout * _hbox7
Definition: slam_toolbox_rviz_plugin.h:107
ros::ServiceClient
slam_toolbox::SlamToolboxPlugin::_serialize
ros::ServiceClient _serialize
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::_hbox9
QHBoxLayout * _hbox9
Definition: slam_toolbox_rviz_plugin.h:109
slam_toolbox::SlamToolboxPlugin::_clearQueue
ros::ServiceClient _clearQueue
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::~SlamToolboxPlugin
~SlamToolboxPlugin()
Definition: slam_toolbox_rviz_plugin.cpp:225
slam_toolbox::SlamToolboxPlugin::_check2
QCheckBox * _check2
Definition: slam_toolbox_rviz_plugin.h:130
slam_toolbox::SlamToolboxPlugin::_button1
QPushButton * _button1
Definition: slam_toolbox_rviz_plugin.h:112
slam_toolbox::SlamToolboxPlugin::_saveChanges
ros::ServiceClient _saveChanges
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::PROCESS_FIRST_NODE_CMT
@ PROCESS_FIRST_NODE_CMT
Definition: slam_toolbox_rviz_plugin.h:67
slam_toolbox::SlamToolboxPlugin::_label7
QLabel * _label7
Definition: slam_toolbox_rviz_plugin.h:142
slam_toolbox::SlamToolboxPlugin::_label2
QLabel * _label2
Definition: slam_toolbox_rviz_plugin.h:138
slam_toolbox::SlamToolboxPlugin::_initialposeSub
ros::Subscriber _initialposeSub
Definition: slam_toolbox_rviz_plugin.h:148
slam_toolbox::SlamToolboxPlugin::_button3
QPushButton * _button3
Definition: slam_toolbox_rviz_plugin.h:114
slam_toolbox::SlamToolboxPlugin::LoadSubmap
void LoadSubmap()
Definition: slam_toolbox_rviz_plugin.cpp:321
slam_toolbox::SlamToolboxPlugin::_merge
ros::ServiceClient _merge
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::_vbox
QVBoxLayout * _vbox
Definition: slam_toolbox_rviz_plugin.h:100
slam_toolbox::SlamToolboxPlugin::_hbox5
QHBoxLayout * _hbox5
Definition: slam_toolbox_rviz_plugin.h:105
slam_toolbox::SlamToolboxPlugin::_hbox8
QHBoxLayout * _hbox8
Definition: slam_toolbox_rviz_plugin.h:108
slam_toolbox::PROCESS_CMT
@ PROCESS_CMT
Definition: slam_toolbox_rviz_plugin.h:66
slam_toolbox::SlamToolboxPlugin::InitialPoseCallback
void InitialPoseCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr &pose)
Definition: slam_toolbox_rviz_plugin.cpp:235
slam_toolbox::SlamToolboxPlugin::_hbox1
QHBoxLayout * _hbox1
Definition: slam_toolbox_rviz_plugin.h:101
slam_toolbox::SlamToolboxPlugin::_radio2
QRadioButton * _radio2
Definition: slam_toolbox_rviz_plugin.h:133
slam_toolbox::SlamToolboxPlugin::_label5
QLabel * _label5
Definition: slam_toolbox_rviz_plugin.h:140
slam_toolbox::SlamToolboxPlugin::_interactive
ros::ServiceClient _interactive
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::SerializeMap
void SerializeMap()
Definition: slam_toolbox_rviz_plugin.cpp:255
slam_toolbox::SlamToolboxPlugin::_radio3
QRadioButton * _radio3
Definition: slam_toolbox_rviz_plugin.h:134
slam_toolbox::SlamToolboxPlugin::_button7
QPushButton * _button7
Definition: slam_toolbox_rviz_plugin.h:118
slam_toolbox
Definition: slam_toolbox_rviz_plugin.cpp:37
slam_toolbox::SlamToolboxPlugin::_hbox3
QHBoxLayout * _hbox3
Definition: slam_toolbox_rviz_plugin.h:103
slam_toolbox::SlamToolboxPlugin::_line4
QLineEdit * _line4
Definition: slam_toolbox_rviz_plugin.h:124
slam_toolbox::SlamToolboxPlugin::PauseMeasurementsCb
void PauseMeasurementsCb(int state)
Definition: slam_toolbox_rviz_plugin.cpp:401
slam_toolbox::SlamToolboxPlugin::_hbox2
QHBoxLayout * _hbox2
Definition: slam_toolbox_rviz_plugin.h:102
slam_toolbox::SlamToolboxPlugin::GenerateMap
void GenerateMap()
Definition: slam_toolbox_rviz_plugin.cpp:332
slam_toolbox::SlamToolboxPlugin::_line5
QLineEdit * _line5
Definition: slam_toolbox_rviz_plugin.h:125
slam_toolbox::SlamToolboxPlugin::_pause_measurements
ros::ServiceClient _pause_measurements
Definition: slam_toolbox_rviz_plugin.h:147
slam_toolbox::SlamToolboxPlugin::_button5
QPushButton * _button5
Definition: slam_toolbox_rviz_plugin.h:116
slam_toolbox::SlamToolboxPlugin::_hbox10
QHBoxLayout * _hbox10
Definition: slam_toolbox_rviz_plugin.h:110
ros::Subscriber
slam_toolbox::SlamToolboxPlugin::InteractiveCb
void InteractiveCb(int state)
Definition: slam_toolbox_rviz_plugin.cpp:390
slam_toolbox::ContinueMappingType
ContinueMappingType
Definition: slam_toolbox_rviz_plugin.h:64


slam_toolbox_rviz
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:38:03