gps_plugin.h
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (C) 2013 All Right Reserved, Southwest Research Institute® (SwRI®)
4 //
5 // Contract No. 10-58058A
6 // Contractor Southwest Research Institute® (SwRI®)
7 // Address 6220 Culebra Road, San Antonio, Texas 78228-0510
8 // Contact Steve Dellenback <sdellenback@swri.org> (210) 522-3914
9 //
10 // This code was developed as part of an internal research project fully funded
11 // by Southwest Research Institute®.
12 //
13 // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
14 // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
15 // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
16 // PARTICULAR PURPOSE.
17 //
18 // *****************************************************************************
19 
20 #ifndef MAPVIZ_PLUGINS_GPS_PLUGIN_H_
21 #define MAPVIZ_PLUGINS_GPS_PLUGIN_H_
22 
23 // Include mapviz_plugin.h first to ensure GL deps are included in the right order
24 #include <mapviz/mapviz_plugin.h>
25 
26 #include <mapviz/map_canvas.h>
28 
29 // C++ standard libraries
30 #include <list>
31 #include <string>
32 #include <vector>
33 
34 // QT libraries
35 #include <QGLWidget>
36 #include <QObject>
37 #include <QWidget>
38 
39 // ROS libraries
40 #include <ros/ros.h>
41 #include <tf/transform_datatypes.h>
42 #include <gps_common/GPSFix.h>
44 
45 // QT autogenerated files
46 #include "ui_gps_config.h"
47 
48 namespace mapviz_plugins
49 {
51  {
52  Q_OBJECT
53 
54  public:
55  GpsPlugin();
56  virtual ~GpsPlugin();
57 
58  bool Initialize(QGLWidget* canvas);
59  void Shutdown()
60  {
61  }
62 
63  void Draw(double x, double y, double scale);
64 
65  void LoadConfig(const YAML::Node& node, const std::string& path);
66  void SaveConfig(YAML::Emitter& emitter, const std::string& path);
67 
68  QWidget* GetConfigWidget(QWidget* parent);
69 
70  protected:
71  void PrintError(const std::string& message);
72  void PrintInfo(const std::string& message);
73  void PrintWarning(const std::string& message);
74 
75  protected Q_SLOTS:
76  void SelectTopic();
77  void TopicEdited();
78 
79  private:
80  Ui::gps_config ui_;
81  QWidget* config_widget_;
82 
83  std::string topic_;
84 
87 
88  void GPSFixCallback(const gps_common::GPSFixConstPtr& gps);
89  };
90 }
91 
92 #endif // MAPVIZ_PLUGINS_GPS_PLUGIN_H_
QWidget * GetConfigWidget(QWidget *parent)
Definition: gps_plugin.cpp:168
void LoadConfig(const YAML::Node &node, const std::string &path)
Definition: gps_plugin.cpp:191
TFSIMD_FORCE_INLINE const tfScalar & y() const
bool Initialize(QGLWidget *canvas)
Definition: gps_plugin.cpp:175
void GPSFixCallback(const gps_common::GPSFixConstPtr &gps)
Definition: gps_plugin.cpp:122
Ui::gps_config ui_
Definition: gps_plugin.h:80
void Draw(double x, double y, double scale)
Definition: gps_plugin.cpp:183
void SaveConfig(YAML::Emitter &emitter, const std::string &path)
Definition: gps_plugin.cpp:272
TFSIMD_FORCE_INLINE const tfScalar & x() const
void PrintWarning(const std::string &message)
Definition: gps_plugin.cpp:163
ros::Subscriber gps_sub_
Definition: gps_plugin.h:85
void PrintInfo(const std::string &message)
Definition: gps_plugin.cpp:158
void PrintError(const std::string &message)
Definition: gps_plugin.cpp:153


mapviz_plugins
Author(s): Marc Alban
autogenerated on Fri Mar 19 2021 02:44:32