flipper_control.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011, Dirk Thomas, TU Darmstadt
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer in the documentation and/or other materials provided
14  * with the distribution.
15  * * Neither the name of the TU Darmstadt nor the names of its
16  * contributors may be used to endorse or promote products derived
17  * from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef rqt_flipper_control__FlipperControl_H
34 #define rqt_flipper_control__FlipperControl_H
35 
36 #include <ros/ros.h>
37 #include <rqt_gui_cpp/plugin.h>
38 #include <std_msgs/Float64.h>
39 
40 #include <ui_flipper_control.h>
41 
42 #include <QWidget>
43 
45 
47  : public rqt_gui_cpp::Plugin
48 {
49 
50  Q_OBJECT
51 
52 public:
53 
55 
56  virtual void initPlugin(qt_gui_cpp::PluginContext& context);
57 
58  virtual void shutdownPlugin();
59 
60  virtual void saveSettings(qt_gui_cpp::Settings& plugin_settings, qt_gui_cpp::Settings& instance_settings) const;
61 
62  virtual void restoreSettings(const qt_gui_cpp::Settings& plugin_settings, const qt_gui_cpp::Settings& instance_settings);
63 
64 protected:
65  void frontFlipperCallback(const std_msgs::Float64::ConstPtr& msg);
66  void rearFlipperCallback(const std_msgs::Float64::ConstPtr& msg);
67 private:
68  void setFlipperFrontGoal(const int goal);
69  void setFlipperRearGoal(const int goal);
70  void setFlipperFrontPose(const int pose);
71  void setFlipperRearPose(const int pose);
72  void updateModel();
73 protected slots:
74  virtual void sliderFrontChanged(int value);
75  virtual void sliderRearChanged(int value);
76 
77 private:
78  Ui::FlipperControlWidget ui_;
79  QWidget* widget_;
83 };
84 
85 }
86 
87 #endif // rqt_flipper_control__FlipperControl_H
Ui::FlipperControlWidget ui_
void frontFlipperCallback(const std_msgs::Float64::ConstPtr &msg)
virtual void initPlugin(qt_gui_cpp::PluginContext &context)
virtual void sliderFrontChanged(int value)
void rearFlipperCallback(const std_msgs::Float64::ConstPtr &msg)
virtual void sliderRearChanged(int value)
virtual void saveSettings(qt_gui_cpp::Settings &plugin_settings, qt_gui_cpp::Settings &instance_settings) const
virtual void restoreSettings(const qt_gui_cpp::Settings &plugin_settings, const qt_gui_cpp::Settings &instance_settings)
void setFlipperFrontGoal(const int goal)


hector_rqt_plugins
Author(s): Dirk Thomas, Thorsten Graber, Gregor Gebhardt
autogenerated on Mon Jun 10 2019 13:36:34