GraspCaptureDlg Class Reference

Allows the user to record grasps and save them. More...

#include <graspCaptureDlg.h>

Inheritance diagram for GraspCaptureDlg:
Inheritance graph
[legend]

List of all members.

Public Slots

void updateQuality ()

Public Member Functions

 GraspCaptureDlg (World *w, QWidget *parent=0)
 ~GraspCaptureDlg ()

Private Slots

void captureButtonClicked ()
void clearListButtonClicked ()
void exitButtonClicked ()
void saveToDBaseButtonClicked ()
void saveToFileButtonClicked ()

Private Member Functions

bool checkHandSelection ()
 Checks which hand is currently selected and updates the quality measures accordingly.
void init (World *w)
 Called by the constructor.
void updateNumGrasps ()
 Updates the label that shows the number of grasps captured.

Private Attributes

HandmCurrentHand
 The hand that the current quality metrics point to.
std::list< GraspPlanningState * > mGrasps
 Stores the grasps captured so far.
QualityIndicatormIndicator
 The little window that shows the grasp quality.
QualEpsilonmQualEpsilon
 The epsilon quality measure used for grasps.
QualVolumemQualVolume
 The volume quality measure used for grasps.
WorldmWorld
 The GraspIt world that this dialog is connected to.

Detailed Description

Allows the user to record grasps and save them.

This dialog allows the user to record grasps that have been created in the main GraspIt! window and then save them. For now, grasps are recorded as HandObjectState. Grasps can be saved to files (no dialog for loading them back and showing them exists yet though). If the CGDB is enabled, grasps can also be saved to the CGDB, with a tag that will distinguish them from grasps created in different ways. They can then be played back with the usual CGDB browser.

The CGDB save option will be enabled only if a sucessful connection to the CGDB has already been opened (use the Connect and Browse menu for that). If not, only the option to save grasps to a file, in some arbitrary ascii format, is available.

This is still very crude, and some of the parameters of the grasps that are stored in the CGDB are hard-coded in rather than input by the user through the dialog. However, it can serve as a starting point if you need to write better code for saving grasps to the database.

The class manages its own quality measures so that we make sure we have consistency between runs, and also to make sure we have the exact same data that we store in the CGDB for other grasps.

Definition at line 88 of file graspCaptureDlg.h.


Constructor & Destructor Documentation

GraspCaptureDlg::GraspCaptureDlg ( World w,
QWidget *  parent = 0 
) [inline]

Definition at line 124 of file graspCaptureDlg.h.

GraspCaptureDlg::~GraspCaptureDlg (  ) 

Definition at line 71 of file graspCaptureDlg.cpp.


Member Function Documentation

void GraspCaptureDlg::captureButtonClicked (  )  [private, slot]

Definition at line 98 of file graspCaptureDlg.cpp.

bool GraspCaptureDlg::checkHandSelection (  )  [private]

Checks which hand is currently selected and updates the quality measures accordingly.

If no hand, or no object are selected, returns false. If a hand is selected and an object is set as the target of its grasp, it makes sure the quality metrics refer to the correct hand and returns true.

Definition at line 81 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::clearListButtonClicked (  )  [private, slot]

Definition at line 238 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::exitButtonClicked (  )  [inline, private, slot]

Definition at line 122 of file graspCaptureDlg.h.

void GraspCaptureDlg::init ( World w  )  [private]

Called by the constructor.

Definition at line 51 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::saveToDBaseButtonClicked (  )  [private, slot]

Saves the current list of grasps in the CGDB, if an interface exists. However, when we save in the CGDB, we need more information than we currently store in the HandObjectState.

Definition at line 163 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::saveToFileButtonClicked (  )  [private, slot]

Definition at line 134 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::updateNumGrasps (  )  [private]

Updates the label that shows the number of grasps captured.

Definition at line 230 of file graspCaptureDlg.cpp.

void GraspCaptureDlg::updateQuality (  )  [slot]

Definition at line 248 of file graspCaptureDlg.cpp.


Member Data Documentation

The hand that the current quality metrics point to.

Definition at line 95 of file graspCaptureDlg.h.

Stores the grasps captured so far.

Definition at line 99 of file graspCaptureDlg.h.

The little window that shows the grasp quality.

Definition at line 97 of file graspCaptureDlg.h.

The epsilon quality measure used for grasps.

Definition at line 102 of file graspCaptureDlg.h.

The volume quality measure used for grasps.

Definition at line 104 of file graspCaptureDlg.h.

The GraspIt world that this dialog is connected to.

Definition at line 93 of file graspCaptureDlg.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:21 2012