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_
mapviz_plugins::GpsPlugin::PrintWarning
void PrintWarning(const std::string &message)
Definition: gps_plugin.cpp:165
point_drawing_plugin.h
mapviz_plugins::GpsPlugin::Shutdown
void Shutdown()
Definition: gps_plugin.h:59
mapviz_plugins::GpsPlugin::PrintError
void PrintError(const std::string &message)
Definition: gps_plugin.cpp:155
mapviz_plugins::PointDrawingPlugin
Definition: point_drawing_plugin.h:51
ros.h
mapviz_plugins::GpsPlugin::ui_
Ui::gps_config ui_
Definition: gps_plugin.h:80
mapviz_plugins::GpsPlugin::SaveConfig
void SaveConfig(YAML::Emitter &emitter, const std::string &path)
Definition: gps_plugin.cpp:281
mapviz_plugins::GpsPlugin::LoadConfig
void LoadConfig(const YAML::Node &node, const std::string &path)
Definition: gps_plugin.cpp:193
mapviz_plugins::GpsPlugin::topic_
std::string topic_
Definition: gps_plugin.h:83
mapviz_plugins::GpsPlugin
Definition: gps_plugin.h:50
local_xy_util.h
mapviz_plugins::GpsPlugin::config_widget_
QWidget * config_widget_
Definition: gps_plugin.h:81
mapviz_plugins::GpsPlugin::~GpsPlugin
virtual ~GpsPlugin()
Definition: gps_plugin.cpp:86
mapviz_plugins::GpsPlugin::Draw
void Draw(double x, double y, double scale)
Definition: gps_plugin.cpp:185
mapviz_plugins::GpsPlugin::has_message_
bool has_message_
Definition: gps_plugin.h:86
mapviz_plugins::GpsPlugin::PrintInfo
void PrintInfo(const std::string &message)
Definition: gps_plugin.cpp:160
transform_datatypes.h
mapviz_plugins::GpsPlugin::GetConfigWidget
QWidget * GetConfigWidget(QWidget *parent)
Definition: gps_plugin.cpp:170
mapviz_plugins::GpsPlugin::gps_sub_
ros::Subscriber gps_sub_
Definition: gps_plugin.h:85
mapviz_plugins::GpsPlugin::GpsPlugin
GpsPlugin()
Definition: gps_plugin.cpp:46
mapviz_plugins::GpsPlugin::SelectTopic
void SelectTopic()
Definition: gps_plugin.cpp:90
mapviz_plugins::GpsPlugin::GPSFixCallback
void GPSFixCallback(const gps_common::GPSFixConstPtr &gps)
Definition: gps_plugin.cpp:124
mapviz_plugins
Definition: attitude_indicator_plugin.h:61
mapviz_plugins::GpsPlugin::TopicEdited
void TopicEdited()
Definition: gps_plugin.cpp:102
map_canvas.h
ros::Subscriber
mapviz_plugins::GpsPlugin::Initialize
bool Initialize(QGLWidget *canvas)
Definition: gps_plugin.cpp:177
mapviz_plugin.h


mapviz_plugins
Author(s): Marc Alban
autogenerated on Sun Sep 8 2024 02:27:14