-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from AustinDeric/update/simple-gui-automation
Simple gui automation
- Loading branch information
Showing
10 changed files
with
103 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
godel_simple_gui/include/godel_simple_gui/states/select_all_surface_state.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef SELECT_ALL_SURFACE_STATE_H | ||
#define SELECT_ALL_SURFACE_STATE_H | ||
|
||
#include "godel_simple_gui/gui_state.h" | ||
|
||
namespace godel_simple_gui | ||
{ | ||
|
||
class SelectAllSurfaceState : public GuiState | ||
{ | ||
public: | ||
// Entry and exit classes | ||
virtual void onStart(BlendingWidget& gui); | ||
virtual void onExit(BlendingWidget& gui); | ||
|
||
// Handlers for the fixed buttons | ||
virtual void onNext(BlendingWidget& gui); | ||
virtual void onBack(BlendingWidget& gui); | ||
virtual void onReset(BlendingWidget& gui); | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <ros/console.h> | ||
#include "godel_msgs/SelectSurface.h" | ||
#include "godel_simple_gui/blending_widget.h" | ||
#include "godel_simple_gui/states/select_all_surface_state.h" | ||
#include "godel_simple_gui/states/scan_teach_state.h" | ||
#include "godel_simple_gui/states/planning_state.h" | ||
|
||
void godel_simple_gui::SelectAllSurfaceState::onStart(BlendingWidget& gui) | ||
{ | ||
const std::string SELECT_SURFACE_SERVICE = "select_surface"; | ||
ros::ServiceClient client = gui.nodeHandle().serviceClient<godel_msgs::SelectSurface>( | ||
SELECT_SURFACE_SERVICE); | ||
godel_msgs::SelectSurface msg; | ||
msg.request.action = msg.request.SELECT_ALL; | ||
client.call(msg.request, msg.response); | ||
gui.setText("Press Next to select all surfaces.\nPress Back to select individual surfaces."); | ||
} | ||
|
||
void godel_simple_gui::SelectAllSurfaceState::onExit(BlendingWidget& gui) {} | ||
|
||
void godel_simple_gui::SelectAllSurfaceState::onNext(BlendingWidget& gui) | ||
{ | ||
Q_EMIT newStateAvailable(new PlanningState()); | ||
} | ||
|
||
void godel_simple_gui::SelectAllSurfaceState::onBack(BlendingWidget& gui) | ||
{ | ||
Q_EMIT newStateAvailable(new ScanTeachState()); | ||
} | ||
|
||
void godel_simple_gui::SelectAllSurfaceState::onReset(BlendingWidget& gui) | ||
{ | ||
Q_EMIT newStateAvailable(new ScanTeachState()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters