ClusterLabelPanel.hpp
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Robot Operating System code by the University of Osnabrück
5  * Copyright (c) 2015, University of Osnabrück
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above
13  * copyright notice, this list of conditions and the following
14  * disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  *
21  * 3. Neither the name of the copyright holder nor the names of its
22  * contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
30  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
33  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
36  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  *
38  *
39  *
40  * ClusterLabelPanel.hpp
41  *
42  *
43  * authors:
44  *
45  * Kristin Schmidt <krschmidt@uni-osnabrueck.de>
46  * Jan Philipp Vogtherr <jvogtherr@uni-osnabrueck.de>
47  */
48 
49 #ifndef CLUSTER_LABEL_PANEL_HPP
50 #define CLUSTER_LABEL_PANEL_HPP
51 
52 #include <Types.hpp>
53 #include <ros/ros.h>
54 #include <QObject>
55 #include <rviz/panel.h>
56 #include <rviz/tool_manager.h>
57 #include <ClusterLabelTool.hpp>
58 #include <mesh_msgs/MeshFaceCluster.h>
59 
60 // Forward declarations
61 class QLineEdit;
62 class QPushButton;
63 
64 namespace rviz
65 {
66 class Tool;
67 }
68 
69 namespace rviz_map_plugin
70 {
76 {
77  Q_OBJECT
78 
79 public:
84  ClusterLabelPanel(QWidget* parent = 0);
85 
89  void onInitialize();
90 
95  virtual void load(const rviz::Config& config);
96 
101  virtual void save(rviz::Config config) const;
102 
103 public Q_SLOTS:
104 
109  void setClusterName(const QString& clusterName);
110 
114  void updateClusterName();
115 
119  void publish();
120 
124  void resetFaces();
125 
126 protected:
131 
133  QString m_clusterName;
134 
136  QPushButton* m_createClusterButton;
138  QPushButton* m_resetFacesButton;
139 
142 
145 };
146 
147 } // end namespace rviz_map_plugin
148 
149 #endif
panel.h
rviz_map_plugin::ClusterLabelTool
Tool for selecting faces.
Definition: ClusterLabelTool.hpp:125
rviz::Panel
rviz_map_plugin::ClusterLabelPanel::m_clusterNameEditor
QLineEdit * m_clusterNameEditor
Input for entering the cluster name.
Definition: ClusterLabelPanel.hpp:128
ros.h
rviz_map_plugin::ClusterLabelPanel::load
virtual void load(const rviz::Config &config)
Load a configuration @input config The configuration.
Definition: ClusterLabelPanel.cpp:141
rviz_map_plugin::ClusterLabelPanel::publish
void publish()
Publishes the current cluster.
Definition: ClusterLabelPanel.cpp:123
rviz_map_plugin::ClusterLabelPanel::updateClusterName
void updateClusterName()
Updates the current cluster name.
Definition: ClusterLabelPanel.cpp:118
rviz_map_plugin::ClusterLabelPanel::save
virtual void save(rviz::Config config) const
Save a configuration @input config The configuration.
Definition: ClusterLabelPanel.cpp:135
tool_manager.h
rviz
rviz_map_plugin::ClusterLabelPanel::ClusterLabelPanel
ClusterLabelPanel(QWidget *parent=0)
Constructor.
Definition: ClusterLabelPanel.cpp:63
rviz_map_plugin::ClusterLabelPanel::m_nodeHandle
ros::NodeHandle m_nodeHandle
Node handle.
Definition: ClusterLabelPanel.hpp:144
rviz_map_plugin::ClusterLabelPanel::m_clusterName
QString m_clusterName
Name of the cluster.
Definition: ClusterLabelPanel.hpp:133
rviz_map_plugin::ClusterLabelPanel::resetFaces
void resetFaces()
Resets the current face selection state.
Definition: ClusterLabelPanel.cpp:129
Types.hpp
ClusterLabelTool.hpp
rviz_map_plugin::ClusterLabelPanel::onInitialize
void onInitialize()
RViz callback on inizialize.
Definition: ClusterLabelPanel.cpp:87
rviz_map_plugin::ClusterLabelPanel::m_createClusterButton
QPushButton * m_createClusterButton
Button for creating and publishing the cluster.
Definition: ClusterLabelPanel.hpp:136
rviz_map_plugin::ClusterLabelPanel
Panel for interacting with the label tool.
Definition: ClusterLabelPanel.hpp:75
rviz_map_plugin
Definition: ClusterLabelDisplay.hpp:120
rviz_map_plugin::ClusterLabelPanel::setClusterName
void setClusterName(const QString &clusterName)
Set the name under which the current cluster will be saved.
Definition: ClusterLabelPanel.cpp:109
rviz_map_plugin::ClusterLabelPanel::m_tool
ClusterLabelTool * m_tool
Instance of the label tool from this package.
Definition: ClusterLabelPanel.hpp:141
rviz_map_plugin::ClusterLabelPanel::m_outputTopicEditor
QLineEdit * m_outputTopicEditor
Input for entering the output topic name.
Definition: ClusterLabelPanel.hpp:130
rviz_map_plugin::ClusterLabelPanel::m_resetFacesButton
QPushButton * m_resetFacesButton
Button for resetting the current faces in cluster.
Definition: ClusterLabelPanel.hpp:138
config
config
rviz::Config
ros::NodeHandle


rviz_map_plugin
Author(s): Sebastian Pütz , Kristin Schmidt , Jan Philipp Vogtherr , Malte kleine Piening
autogenerated on Sun Jan 21 2024 04:06:25