stdr_tools.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_TOOLS
23 #define STDR_TOOLS
24 
25 #include <ros/package.h>
26 #include "ros/ros.h"
27 #include <tf/transform_listener.h>
28 
29 #include <QtUiTools/QUiLoader>
30 
31 #include <QtCore/QDir>
32 #include <QtCore/QFile>
33 #include <QtCore/QObject>
34 #include <QtCore/QString>
35 #include <QtCore/QThread>
36 #include <QtCore/QTimer>
37 #include <QtCore/QTime>
38 
39 #include <QtGui/QMenu>
40 #include <QtGui/QApplication>
41 #include <QtGui/QCheckBox>
42 #include <QtGui/QComboBox>
43 #include <QtGui/QDoubleSpinBox>
44 #include <QtGui/QImage>
45 #include <QtGui/QFileDialog>
46 #include <QtGui/QLabel>
47 #include <QtGui/QLineEdit>
48 #include <QtGui/QListWidget>
49 #include <QtGui/QPainter>
50 #include <QtGui/QPixmap>
51 #include <QtGui/QProgressBar>
52 #include <QtGui/QPushButton>
53 #include <QtGui/QRadioButton>
54 #include <QtGui/QScrollBar>
55 #include <QtGui/QStatusBar>
56 #include <QtGui/QTextEdit>
57 #include <QtGui/QTreeWidget>
58 #include <QtGui/QVBoxLayout>
59 #include <QtGui/QWidget>
60 #include <QtGui/QWindowsStyle>
61 #include <QtGui/QInputDialog>
62 #include <QtGui/QMouseEvent>
63 #include <QtGui/QMessageBox>
64 #include <QtGui/QTimeEdit>
65 #include <QtGui/QInputDialog>
66 #include <QtGui/QFont>
67 
68 #include <stdr_msgs/RobotIndexedVectorMsg.h>
69 #include <stdr_msgs/RobotIndexedMsg.h>
70 #include <stdr_msgs/RobotMsg.h>
71 #include <stdr_msgs/Noise.h>
72 
73 #include <stdr_msgs/RfidTagVector.h>
74 #include <stdr_msgs/AddRfidTag.h>
75 #include <stdr_msgs/DeleteRfidTag.h>
76 
77 #include <stdr_msgs/CO2SourceVector.h>
78 #include <stdr_msgs/AddCO2Source.h>
79 #include <stdr_msgs/DeleteCO2Source.h>
80 
81 #include <stdr_msgs/ThermalSourceVector.h>
82 #include <stdr_msgs/AddThermalSource.h>
83 #include <stdr_msgs/DeleteThermalSource.h>
84 
85 #include <stdr_msgs/SoundSourceVector.h>
86 #include <stdr_msgs/AddSoundSource.h>
87 #include <stdr_msgs/DeleteSoundSource.h>
88 
89 #include <geometry_msgs/Pose2D.h>
90 #include <geometry_msgs/Point.h>
91 #include <geometry_msgs/Twist.h>
92 
93 #include <sensor_msgs/LaserScan.h>
94 
95 #include "stdr_server/map_loader.h"
96 #include <stdr_msgs/LoadExternalMap.h>
97 
99 
100 #define STDR_PI 3.14159265359
101 
106 namespace stdr_gui_tools
107 {
113  std::string getRosPackagePath(std::string package);
114 
120  QString getLiteralTime(int ms);
121 
127  float angleRadToDegrees(float angle);
128 
134  float angleDegreesToRad(float angle);
135 
141  void printSonarMsg(stdr_msgs::SonarSensorMsg &msg);
142 
148  void printLaserMsg(stdr_msgs::LaserSensorMsg &msg);
149 
155  void printPose2D(geometry_msgs::Pose2D &msg);
156 
162  stdr_msgs::RobotMsg fixRobotAnglesToRad(stdr_msgs::RobotMsg rmsg);
163 
169  stdr_msgs::RobotMsg fixRobotAnglesToDegrees(stdr_msgs::RobotMsg rmsg);
170 
176  stdr_msgs::LaserSensorMsg fixLaserAnglesToRad(stdr_msgs::LaserSensorMsg rmsg);
177 
183  stdr_msgs::LaserSensorMsg fixLaserAnglesToDegrees(
184  stdr_msgs::LaserSensorMsg rmsg);
185 
191  stdr_msgs::SonarSensorMsg fixSonarAnglesToRad(stdr_msgs::SonarSensorMsg rmsg);
192 
198  stdr_msgs::SonarSensorMsg fixSonarAnglesToDegrees(
199  stdr_msgs::SonarSensorMsg rmsg);
200 
206  stdr_msgs::RfidSensorMsg fixRfidAnglesToRad(stdr_msgs::RfidSensorMsg rmsg);
207 
213  stdr_msgs::RfidSensorMsg fixRfidAnglesToDegrees(
214  stdr_msgs::RfidSensorMsg rmsg);
215 
219  stdr_msgs::CO2SensorMsg fixCO2AnglesToRad(stdr_msgs::CO2SensorMsg rmsg);
220 
224  stdr_msgs::CO2SensorMsg fixCO2AnglesToDegrees(
225  stdr_msgs::CO2SensorMsg rmsg);
226 
230  stdr_msgs::ThermalSensorMsg fixThermalAnglesToRad(stdr_msgs::ThermalSensorMsg rmsg);
231 
235  stdr_msgs::ThermalSensorMsg fixThermalAnglesToDegrees(
236  stdr_msgs::ThermalSensorMsg rmsg);
237 
241  stdr_msgs::SoundSensorMsg fixSoundAnglesToRad(stdr_msgs::SoundSensorMsg rmsg);
242 
246  stdr_msgs::SoundSensorMsg fixSoundAnglesToDegrees(
247  stdr_msgs::SoundSensorMsg rmsg);
248 }
249 
250 #endif
std::string getRosPackagePath(std::string package)
Returns the global path of the ROS package provided.
Definition: stdr_tools.cpp:31
stdr_msgs::CO2SensorMsg fixCO2AnglesToRad(stdr_msgs::CO2SensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:336
string package
QString getLiteralTime(int ms)
Transforms the milliseconds in literal representation.
Definition: stdr_tools.cpp:61
stdr_msgs::RobotMsg fixRobotAnglesToDegrees(stdr_msgs::RobotMsg rmsg)
Takes a stdr_msgs::RobotMsg and converts its angles to degrees.
Definition: stdr_tools.cpp:206
stdr_msgs::RfidSensorMsg fixRfidAnglesToDegrees(stdr_msgs::RfidSensorMsg rmsg)
Takes a stdr_msgs::RfidSensorMsg and converts its angles to degrees.
Definition: stdr_tools.cpp:325
stdr_msgs::SoundSensorMsg fixSoundAnglesToDegrees(stdr_msgs::SoundSensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:388
stdr_msgs::ThermalSensorMsg fixThermalAnglesToRad(stdr_msgs::ThermalSensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:357
stdr_msgs::LaserSensorMsg fixLaserAnglesToDegrees(stdr_msgs::LaserSensorMsg rmsg)
Takes a stdr_msgs::LaserSensorMsg and converts its angles to degrees.
Definition: stdr_tools.cpp:275
stdr_msgs::RfidSensorMsg fixRfidAnglesToRad(stdr_msgs::RfidSensorMsg rmsg)
Takes a stdr_msgs::RfidSensorMsg and converts its angles to rads.
Definition: stdr_tools.cpp:313
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
stdr_msgs::LaserSensorMsg fixLaserAnglesToRad(stdr_msgs::LaserSensorMsg rmsg)
Takes a stdr_msgs::LaserSensorMsg and converts its angles to rads.
Definition: stdr_tools.cpp:262
void printSonarMsg(stdr_msgs::SonarSensorMsg &msg)
Prints a sonar msg.
Definition: stdr_tools.cpp:92
stdr_msgs::SonarSensorMsg fixSonarAnglesToDegrees(stdr_msgs::SonarSensorMsg rmsg)
Takes a stdr_msgs::SonarSensorMsg and converts its angles to degrees.
Definition: stdr_tools.cpp:300
float angleDegreesToRad(float angle)
Converts an angle from degrees to rads.
Definition: stdr_tools.cpp:51
The namespace for STDR GUI tools.
stdr_msgs::RobotMsg fixRobotAnglesToRad(stdr_msgs::RobotMsg rmsg)
Takes a stdr_msgs::RobotMsg and converts its angles to rads.
Definition: stdr_tools.cpp:150
stdr_msgs::SonarSensorMsg fixSonarAnglesToRad(stdr_msgs::SonarSensorMsg rmsg)
Takes a stdr_msgs::SonarSensorMsg and converts its angles to rads.
Definition: stdr_tools.cpp:288
stdr_msgs::CO2SensorMsg fixCO2AnglesToDegrees(stdr_msgs::CO2SensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:346
float angleRadToDegrees(float angle)
Converts an angle from rads to degrees.
Definition: stdr_tools.cpp:41
void printLaserMsg(stdr_msgs::LaserSensorMsg &msg)
Prints a laser msg.
Definition: stdr_tools.cpp:114
stdr_msgs::ThermalSensorMsg fixThermalAnglesToDegrees(stdr_msgs::ThermalSensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:367
stdr_msgs::SoundSensorMsg fixSoundAnglesToRad(stdr_msgs::SoundSensorMsg rmsg)
Angle conversion.
Definition: stdr_tools.cpp:378
void printPose2D(geometry_msgs::Pose2D &msg)
Prints a ROS pose2d msg.
Definition: stdr_tools.cpp:137


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