NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
walkcontrol.h
1 //Small rqt plugin to control walking
2 //Author: Sebastian Schüller
3 
4 #ifndef WALKCONTROL_H
5 #define WALKCONTROL_H
6 
7 #include <rqt_gui_cpp/plugin.h>
8 #include <ros/publisher.h>
9 #include <ros/subscriber.h>
10 
11 #include <ui_walkcontrol.h>
12 
13 #include <gait_msgs/GaitCommand.h>
14 #include <gait_msgs/GaitPerformance.h>
15 
16 namespace walkcontrol
17 {
18 
19 class WalkControl : public rqt_gui_cpp::Plugin
20 {
21 Q_OBJECT
22 public:
23  WalkControl();
24  virtual ~WalkControl();
25 
26  virtual void initPlugin(qt_gui_cpp::PluginContext& context);
27  virtual void shutdownPlugin();
28 
29 Q_SIGNALS:
30  void perf_changed(const gait_msgs::GaitPerformanceConstPtr& data);
31 
32 private Q_SLOTS:
33  void walk();
34  void reset();
35  void handleWalk();
36  void handleHalt();
37  void setXTarget();
38  void setYTarget();
39  void setOmegaTarget();
40  void handlePerf(const gait_msgs::GaitPerformanceConstPtr& data);
41 
42 private:
43  bool m_walking;
44 
45  ros::Publisher m_pub_cmd;
46  gait_msgs::GaitCommand m_cmd;
47 
48  ros::Subscriber m_sub_perf;
49  gait_msgs::GaitPerformance m_perf;
50 
51  Ui::walkcontrol m_ui;
52 
53 };
54 
55 }
56 #endif