stdr_sonar_visualization.h
Go to the documentation of this file.
1 /******************************************************************************
2  STDR Simulator - Simple Two DImensional Robot Simulator
3  Copyright (C) 2013 STDR Simulator
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but 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  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 
16  Authors :
17  * Manos Tsardoulias, etsardou@gmail.com
18  * Aris Thallas, aris.thallas@gmail.com
19  * Chris Zalidis, zalidis@gmail.com
20 ******************************************************************************/
21 
22 #ifndef STDR_SONAR_VISUALIZATION
23 #define STDR_SONAR_VISUALIZATION
24 
25 #include "stdr_gui/stdr_tools.h"
26 #include "ui_sonarVisualization.h"
27 #include "sensor_msgs/Range.h"
28 
33 namespace stdr_gui
34 {
40  public QWidget,
41  public Ui_sonarVisualization
42  {
43  //------------------------------------------------------------------------//
44  private:
46  bool active_;
48  float resolution_;
50  sensor_msgs::Range range_;
54  stdr_msgs::SonarSensorMsg msg_;
56  QString name_;
57  //------------------------------------------------------------------------//
58  public:
65  CSonarVisualisation(QString name,float resolution);
66 
72 
77  bool getActive(void);
78 
84  void setSonar(stdr_msgs::SonarSensorMsg msg);
85 
90  void destruct(void);
91 
97  void closeEvent(QCloseEvent *event);
98 
104  void callback(const sensor_msgs::Range& msg);
105 
110  void paint(void);
111  };
112 }
113 
114 #endif
Implements the functionalities of the sonar visualization widget. Inherits form QWidget and Ui_sonarV...
void closeEvent(QCloseEvent *event)
Called when the close event is triggered.
CSonarVisualisation(QString name, float resolution)
Default contructor.
~CSonarVisualisation(void)
Default destructor.
void callback(const sensor_msgs::Range &msg)
Called when new laser data are available.
void destruct(void)
Destroys the visualizer.
void paint(void)
Paints the visualizer.
sensor_msgs::Range range_
Subscriber for getting the sonar ranges.
stdr_msgs::SonarSensorMsg msg_
The laser frame id.
The main namespace for STDR GUI.
void setSonar(stdr_msgs::SonarSensorMsg msg)
Sets the sonar description message.
ros::Subscriber subscriber_
Description of the sonar sensor.
float resolution_
The latest sonar range.
bool getActive(void)
Returns true if the visualizer is active.
bool active_
< True if the visualizer is active


stdr_gui
Author(s): Manos Tsardoulias
autogenerated on Mon Jun 10 2019 15:15:17