RSMControls.h
Go to the documentation of this file.
1 #ifndef RSMCONTROLS_H_
2 #define RSMCONTROLS_H_
3 
4 #include <ros/ros.h>
5 #include <rqt_gui_cpp/plugin.h>
6 #include <QtWidgets/QWidget>
7 #include <QtWidgets/QPushButton>
8 #include <QStringList>
9 #include <QDebug>
10 #include <QObject>
11 #include "ui_rsm_controls.h"
12 #include <std_srvs/SetBool.h>
13 #include <std_srvs/Trigger.h>
14 #include <std_msgs/String.h>
15 #include <rsm_msgs/OperationMode.h>
16 #include <rsm_msgs/SetWaypointFollowingMode.h>
17 #include <rsm_msgs/AddWaypoint.h>
18 #include <rsm_msgs/GetWaypointRoutines.h>
19 #include <rsm_msgs/GetRobotPose.h>
20 #include <rsm_msgs/SetOperationMode.h>
21 #include <std_srvs/SetBool.h>
22 #include <std_msgs/Bool.h>
24 
25 namespace rsm {
26 
32  Q_OBJECT
33 
34 public:
36  virtual ~RSMControlPanel();
37  virtual void initPlugin(qt_gui_cpp::PluginContext& context);
38  virtual void shutdownPlugin();
39  virtual void saveSettings(qt_gui_cpp::Settings& plugin_settings,
40  qt_gui_cpp::Settings& instance_settings) const;
41  virtual void restoreSettings(const qt_gui_cpp::Settings& plugin_settings,
42  const qt_gui_cpp::Settings& instance_settings);
43 
44 protected slots:
45  void startStopExploration();
47  void resetWaypoints();
48  void addWaypoint();
49  void setReverseMode();
50  void emergencyStop();
51  void stopOperation();
52  void setAutonomyOperation();
53  void setTeleoperation();
54  void stop2dNavGoal();
55 
56 private:
57  QWidget* _widget_main;
58  Ui::rsm_controls* _gui;
59 
61 
78 
106  std::vector<std::string> _waypoint_routines;
111 
112  void callSetOperationMode();
113  void stateInfoCallback(const std_msgs::String::ConstPtr& state_info);
114  void reverseModeCallback(const std_msgs::Bool::ConstPtr& reverse_mode);
116  const rsm_msgs::OperationMode::ConstPtr& operation_mode);
117  void initCommunications();
118  void connectSlots();
119  void initRoutineComboBox();
120  void getStateInfo();
122  void setExplorationMode();
123  void updateOperationModeGUI();
124 
125 };
126 
127 } /* namespace rsm */
128 
129 #endif /* RSMCONTROLS_H_ */
ros::ServiceClient _set_waypoint_following_mode_client
Definition: RSMControls.h:65
ros::ServiceClient _state_info_client
Definition: RSMControls.h:72
QWidget * _widget_main
Definition: RSMControls.h:57
ros::ServiceClient _start_stop_waypoint_following_client
Definition: RSMControls.h:63
ros::ServiceClient _waypoint_reset_client
Definition: RSMControls.h:64
ros::ServiceClient _set_reverse_mode_client
Definition: RSMControls.h:68
void reverseModeCallback(const std_msgs::Bool::ConstPtr &reverse_mode)
ros::ServiceClient _add_waypoint_client
Definition: RSMControls.h:66
void startStopWaypointFollowing()
virtual void restoreSettings(const qt_gui_cpp::Settings &plugin_settings, const qt_gui_cpp::Settings &instance_settings)
virtual void saveSettings(qt_gui_cpp::Settings &plugin_settings, qt_gui_cpp::Settings &instance_settings) const
ros::Subscriber _state_info_subscriber
Definition: RSMControls.h:74
bool _exploration_running
Is the exploration currently running.
Definition: RSMControls.h:86
ros::ServiceClient _set_operation_mode_client
Definition: RSMControls.h:70
ros::Subscriber _reverse_mode_subscriber
Definition: RSMControls.h:75
void stateInfoCallback(const std_msgs::String::ConstPtr &state_info)
ros::ServiceClient _set_exploration_mode_client
Definition: RSMControls.h:71
ros::ServiceClient _get_robot_pose_client
Definition: RSMControls.h:69
bool _operation_mode_button_pushed
Was an operation mode button just pushed.
Definition: RSMControls.h:82
virtual ~RSMControlPanel()
Definition: RSMControls.cpp:10
Ui::rsm_controls * _gui
Definition: RSMControls.h:58
ros::NodeHandle _nh
Definition: RSMControls.h:60
virtual void shutdownPlugin()
ros::Subscriber _operation_mode_subcriber
Definition: RSMControls.h:76
bool _waypoint_following_running
Is waypoint following currently running.
Definition: RSMControls.h:90
ros::ServiceClient _stop_2d_nav_goal_client
Definition: RSMControls.h:73
ros::Subscriber _exploration_mode_subscriber
Definition: RSMControls.h:77
void operationModeCallback(const rsm_msgs::OperationMode::ConstPtr &operation_mode)
std::vector< std::string > _waypoint_routines
Definition: RSMControls.h:106
ros::ServiceClient _start_stop_exploration_client
Definition: RSMControls.h:62
ros::ServiceClient _get_waypoint_routines_client
Definition: RSMControls.h:67
virtual void initPlugin(qt_gui_cpp::PluginContext &context)
Definition: RSMControls.cpp:13
Plugin for rqt which adds buttons to interface the rsm.
Definition: RSMControls.h:31


rsm_rqt_plugins
Author(s): Marco Steinbrink
autogenerated on Tue Mar 16 2021 02:44:37