stdr_gui_sonar.h
Go to the documentation of this file.
00001 /******************************************************************************
00002    STDR Simulator - Simple Two DImensional Robot Simulator
00003    Copyright (C) 2013 STDR Simulator
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 3 of the License, or
00007    (at your option) any later version.
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011    GNU General Public License for more details.
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software Foundation,
00014    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015    
00016    Authors : 
00017    * Manos Tsardoulias, etsardou@gmail.com
00018    * Aris Thallas, aris.thallas@gmail.com
00019    * Chris Zalidis, zalidis@gmail.com 
00020 ******************************************************************************/
00021 
00022 
00023 #ifndef STDR_GUI_SONAR_CONTAINER
00024 #define STDR_GUI_SONAR_CONTAINER
00025 
00026 #include "stdr_gui/stdr_tools.h"
00027 #include "stdr_msgs/SonarSensorMsg.h"
00028 #include "sensor_msgs/Range.h"
00029 
00034 namespace stdr_gui
00035 {
00036 
00041   class CGuiSonar
00042   {
00043     //------------------------------------------------------------------------//
00044     private:
00046       bool lock_;
00048       std::string topic_;
00050       std::string tf_frame_;
00052       stdr_msgs::SonarSensorMsg msg_;
00054       ros::Subscriber subscriber_;
00056       sensor_msgs::Range range_;
00058       char visualization_status_;
00059       
00060     //------------------------------------------------------------------------//
00061     public:
00062     
00069       CGuiSonar(stdr_msgs::SonarSensorMsg msg,std::string baseTopic);
00070       
00075       ~CGuiSonar(void);
00076       
00082       void callback(const sensor_msgs::Range& msg); 
00083       
00091       void paint(QImage *m,float ocgd,tf::TransformListener *listener);
00092       
00100       void visualizerPaint(QImage *m,float ocgd,float maxRange);
00101       
00106       float getMaxRange(void);
00107       
00112       std::string getFrameId(void);
00113       
00118       char getVisualizationStatus(void);
00119       
00124       void toggleVisualizationStatus(void);
00125       
00131       void setVisualizationStatus(char vs);
00132   };  
00133 }
00134 
00135 #endif


stdr_gui
Author(s): Manos Tsardoulias
autogenerated on Wed Sep 2 2015 03:36:44