choreo_widget.h
Go to the documentation of this file.
1 #ifndef CHOREO_GUI_CHOREO_WIDGET_H
2 #define CHOREO_GUI_CHOREO_WIDGET_H
3 
4 #include <QWidget>
5 
6 #include <ros/ros.h>
8 
9 #include <choreo_gui/gui_state.h>
12 
14 
15 #include "choreo_msgs/SimulateMotionPlanAction.h"
16 #include "choreo_msgs/SimulateMotionPlanActionGoal.h"
17 
18 namespace Ui
19 {
20 class ChoreoWidget;
21 }
22 
23 namespace choreo_gui
24 {
34 class ChoreoWidget : public QWidget
35 {
36  Q_OBJECT
37  public:
38  ChoreoWidget(QWidget* parent = 0);
39 
40  virtual ~ChoreoWidget();
41 
42  // Interface for the states to interact with
43  void setText(const std::string& txt);
44  void appendText(const std::string& txt);
45 
46  void setButtonsEnabled(bool enabled);
47  void setParamsButtonEnabled(bool enabled);
48 
49  void setLabelText(const std::string& txt);
50  void sendGoal(const choreo_msgs::SimulateMotionPlanGoal& goal);
51  void sendGoalAndWait(const choreo_msgs::SimulateMotionPlanGoal& goal);
52 
53  ros::NodeHandle& nodeHandle() { return nh_; }
54  ParamsSubmenu& params() { return *params_; }
55  SelectionWidget& selection_widget() { return *selection_widget_; }
56 
57  protected:
58  void loadParameters();
59 
60  protected Q_SLOTS:
61  // Button Handlers
62  void onNextButton();
63  void onBackButton();
64  void onResetButton();
65  void onParamsButton();
66 
67  void onEnableButtons();
68  void onDisableButtons();
69 
70  void onParamsSave();
71  void onParamsAccept();
72 
73  // State Change
74  void changeState(GuiState* new_state);
75 
76  void showOutputSaveDirParams();
77 
78  void onUseSavedResult(bool);
79 
80  // Pick n' place functionality
81  void onPicknPlace();
82 
83  protected:
84  // UI
85  Ui::ChoreoWidget* ui_;
88 
89  // ROS specific stuff
91 
92  // Current state
94 
95  // Params Save
97 
99 };
100 }
101 
102 #endif // CHOREO_GUI_CHOREO_WIDGET_H
ros::ServiceClient choreo_parameters_client_
Definition: choreo_widget.h:96
The ChoreoWidget class works in states:
Definition: choreo_widget.h:34
SelectionWidget * selection_widget_
Definition: choreo_widget.h:87
ParamsSubmenu & params()
Definition: choreo_widget.h:54
ParamsSubmenu * params_
Definition: choreo_widget.h:86
SelectionWidget & selection_widget()
Definition: choreo_widget.h:55
Ui::ChoreoWidget * ui_
Definition: choreo_widget.h:85
ros::NodeHandle & nodeHandle()
Definition: choreo_widget.h:53
actionlib::SimpleActionClient< choreo_msgs::SimulateMotionPlanAction > simulate_motion_plan_action_client_
Definition: choreo_widget.h:98


choreo_gui
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:58:56