RViz plugin for model generation. More...
#include <ModelGenerationPanel.h>
Public Member Functions | |
virtual void | load (const rviz::Config &config) |
Load RViz configuration settings. | |
ModelGenerationPanel (QWidget *parent=NULL) | |
Create a new ModelGenerationPanel. | |
virtual void | save (rviz::Config config) const |
Save RViz configuration settings. | |
virtual | ~ModelGenerationPanel () |
Cleans up a ModelGenerationPanel. | |
Private Slots | |
void | deleteModel () |
Remove the currently selected individual grasp or object model. | |
void | deselectAll () |
Deselect all models/grasps. | |
void | executeGenerateModels () |
Call the generate models action server. | |
void | modelSelectionChanged () |
Display a selected model. | |
void | populateModelsList (const QString &text) |
Populates the model list. | |
void | refresh () |
Refresh with the latest object and model lists. | |
void | selectAll () |
Select all models/grasps. | |
Private Member Functions | |
void | doneCallback (const actionlib::SimpleClientGoalState &state, const rail_pick_and_place_msgs::GenerateModelsResultConstPtr &result) |
Callback for when the generate models action server finishes. | |
void | feedbackCallback (const rail_pick_and_place_msgs::GenerateModelsFeedbackConstPtr &feedback) |
Callback for when the generate models action sends feedback. | |
Private Attributes | |
QPushButton * | delete_button_ |
QPushButton * | deselect_all_button_ |
actionlib::SimpleActionClient < rail_pick_and_place_msgs::GenerateModelsAction > | generate_models_ac_ |
QPushButton * | generate_models_button_ |
graspdb::Client * | graspdb_ |
QLabel * | model_generation_status_ |
QSpinBox * | model_size_spin_box_ |
QListWidget * | models_list_ |
ros::NodeHandle | node_ |
QComboBox * | object_list_ |
QPushButton * | refresh_button_ |
actionlib::SimpleActionClient < rail_pick_and_place_msgs::RetrieveGraspDemonstrationAction > | retrieve_grasp_ac_ |
actionlib::SimpleActionClient < rail_pick_and_place_msgs::RetrieveGraspModelAction > | retrieve_grasp_model_ac_ |
QPushButton * | select_all_button_ |
RViz plugin for model generation.
The model generation panel allows for model generation requests to be made using a selection of grasps and models.
Definition at line 42 of file ModelGenerationPanel.h.
ModelGenerationPanel::ModelGenerationPanel | ( | QWidget * | parent = NULL | ) |
Create a new ModelGenerationPanel.
Creates a new ModelGenerationPanel and adds the correct widgets and action client connections.
parent | The parent widget for this panel (defaults to NULL). |
Definition at line 25 of file ModelGenerationPanel.cpp.
ModelGenerationPanel::~ModelGenerationPanel | ( | ) | [virtual] |
Cleans up a ModelGenerationPanel.
Cleans up any connections used by the ModelGenerationPanel.
Definition at line 123 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::deleteModel | ( | ) | [private, slot] |
Remove the currently selected individual grasp or object model.
Makes a call to the graspdb to delete the selected model or grasp (if any). A confirmation dialog is given.
Definition at line 229 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::deselectAll | ( | ) | [private, slot] |
Deselect all models/grasps.
Deselects all the current models/grasps in the list.
Definition at line 176 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::doneCallback | ( | const actionlib::SimpleClientGoalState & | state, |
const rail_pick_and_place_msgs::GenerateModelsResultConstPtr & | result | ||
) | [private] |
Callback for when the generate models action server finishes.
Sets the status message to the corresponding message.
state | The finished goal state. |
result | The result of the action client call. |
Definition at line 360 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::executeGenerateModels | ( | ) | [private, slot] |
Call the generate models action server.
Calls the generate models action server with the given settings and disable the button.
Definition at line 309 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::feedbackCallback | ( | const rail_pick_and_place_msgs::GenerateModelsFeedbackConstPtr & | feedback | ) | [private] |
Callback for when the generate models action sends feedback.
Sets the status message to the corresponding message.
feedback | The current feedback message. |
Definition at line 405 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::load | ( | const rviz::Config & | config | ) | [virtual] |
Load RViz configuration settings.
Load the max model size state if it is set.
config | The RViz configuration settings to load. |
Reimplemented from rviz::Panel.
Definition at line 419 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::modelSelectionChanged | ( | ) | [private, slot] |
Display a selected model.
Makes a call to display the selected model/grasp (if any) and updates the text on the delete button.
Definition at line 194 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::populateModelsList | ( | const QString & | text | ) | [private, slot] |
Populates the model list.
Populates the models list with the given object's grasps and models.
Definition at line 257 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::refresh | ( | ) | [private, slot] |
Refresh with the latest object and model lists.
Refreshes the interface with the latest object and model lists.
Definition at line 130 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::save | ( | rviz::Config | config | ) | const [virtual] |
Save RViz configuration settings.
Save the max model size state.
config | The RViz configuration settings to save. |
Reimplemented from rviz::Panel.
Definition at line 411 of file ModelGenerationPanel.cpp.
void ModelGenerationPanel::selectAll | ( | ) | [private, slot] |
Select all models/grasps.
Selects all the current models/grasps in the list.
Definition at line 158 of file ModelGenerationPanel.cpp.
QPushButton * rail::pick_and_place::ModelGenerationPanel::delete_button_ [private] |
Definition at line 125 of file ModelGenerationPanel.h.
QPushButton * rail::pick_and_place::ModelGenerationPanel::deselect_all_button_ [private] |
Definition at line 125 of file ModelGenerationPanel.h.
actionlib::SimpleActionClient<rail_pick_and_place_msgs::GenerateModelsAction> rail::pick_and_place::ModelGenerationPanel::generate_models_ac_ [private] |
The generate model action client.
Definition at line 110 of file ModelGenerationPanel.h.
QPushButton * rail::pick_and_place::ModelGenerationPanel::generate_models_button_ [private] |
Definition at line 125 of file ModelGenerationPanel.h.
The grasp database connection.
Definition at line 105 of file ModelGenerationPanel.h.
QLabel* rail::pick_and_place::ModelGenerationPanel::model_generation_status_ [private] |
The status of the generate models action server.
Definition at line 117 of file ModelGenerationPanel.h.
QSpinBox* rail::pick_and_place::ModelGenerationPanel::model_size_spin_box_ [private] |
The maximum model size spinner.
Definition at line 123 of file ModelGenerationPanel.h.
QListWidget* rail::pick_and_place::ModelGenerationPanel::models_list_ [private] |
The list of grasps and models.
Definition at line 121 of file ModelGenerationPanel.h.
The public ROS node handle.
Definition at line 108 of file ModelGenerationPanel.h.
QComboBox* rail::pick_and_place::ModelGenerationPanel::object_list_ [private] |
The current list of objects.
Definition at line 119 of file ModelGenerationPanel.h.
QPushButton* rail::pick_and_place::ModelGenerationPanel::refresh_button_ [private] |
The various buttons used in the interface.
Definition at line 125 of file ModelGenerationPanel.h.
actionlib::SimpleActionClient<rail_pick_and_place_msgs::RetrieveGraspDemonstrationAction> rail::pick_and_place::ModelGenerationPanel::retrieve_grasp_ac_ [private] |
The retrieve grasp demonstration action client.
Definition at line 112 of file ModelGenerationPanel.h.
actionlib::SimpleActionClient<rail_pick_and_place_msgs::RetrieveGraspModelAction> rail::pick_and_place::ModelGenerationPanel::retrieve_grasp_model_ac_ [private] |
The retrieve grasp model action client.
Definition at line 114 of file ModelGenerationPanel.h.
QPushButton * rail::pick_and_place::ModelGenerationPanel::select_all_button_ [private] |
Definition at line 125 of file ModelGenerationPanel.h.