kvh_geo_fog_3d_status_panel.hpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (Apache 2.0)
3  *
4  * Copyright (c) 2019, The MITRE Corporation.
5  * All rights reserved.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * https://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * Sections of this project contains content developed by The MITRE Corporation.
20  * If this code is used in a deployment or embedded within another project,
21  * it is requested that you send an email to opensource@mitre.org in order to
22  * let us know where this software is being used.
23  *********************************************************************/
24 
33 #pragma once
34 
35 #include <ros/ros.h>
36 #include <rviz/panel.h>
37 #include <QHBoxLayout>
38 #include <unordered_map>
39 #include "diagnostic_msgs/DiagnosticArray.h"
40 
41 #include "kvh_status_painter.hpp"
42 
43 namespace kvh
44 {
50  class StatusPanel : public rviz::Panel
51  {
52  Q_OBJECT
53 
54  public:
55  StatusPanel(QWidget* parent = 0);
56  QHBoxLayout* StatusIndicatorFactory(bool, std::string, std::string);
57  void DiagnosticsCallback(const diagnostic_msgs::DiagnosticArray::ConstPtr&);
58  protected:
60  std::unordered_map<std::string, StatusPainter*> painter_map_;
62 
63  };
64 
65 }
KVH Geo Fog 3D RVIZ plugin painter object.
void DiagnosticsCallback(const diagnostic_msgs::DiagnosticArray::ConstPtr &)
Function to receive diagnostics information and calculate statuses.
ros::Subscriber diag_sub_
ROS subscriber for diagnostics information.
RVIZ panel for displaying KVH sensor status.
ros::NodeHandle nh_
Our ROS nodehandle object.
QHBoxLayout * StatusIndicatorFactory(bool, std::string, std::string)
Create mappings from our diagnostics strings to painters.
StatusPanel(QWidget *parent=0)
Constructor for our RVIZ panel.
std::unordered_map< std::string, StatusPainter * > painter_map_
Holds our key/value set of diagnostics message strings to painter objects.


kvh_geo_fog_3d_rviz
Author(s): Zach LaCelle
autogenerated on Fri Jan 24 2020 03:18:20