EigenGraspDlg Class Reference

The eigengrasp dialog allows the user to see hand motion along eigengrasp dimensions. More...

#include <eigenGraspDlg.h>

Inheritance diagram for EigenGraspDlg:
Inheritance graph
[legend]

List of all members.

Public Slots

void closeHandButton_clicked ()
 Obsolete; has been removed.
void eigenGraspChanged ()
void exitButton_clicked ()
void fixBoxChanged ()
void goToOriginButton_clicked ()
void handConfigurationChanged ()
 Called when the user changes a dof value directly.
void identityButton_clicked ()
void loadButton_clicked ()
void rigidCheckBox_clicked ()
 Sets the "rigid" mode of the EigenGraspInterface; see that class for details.
void saveButton_clicked ()
void setOriginButton_clicked ()
 Sets the current dof posture to be the origin of the eg subspace.
void show ()

Public Member Functions

 EigenGraspDlg (QWidget *parent=0)
int setWorld (World *w)
 ~EigenGraspDlg ()

Private Member Functions

void adjustSliders ()
 Attempts to compute the mSliderConversion factor based on the legal range of motion of all eg's.
void destroy ()
void goToOrigin ()
 Sets the hand posture to the origin of the eg subspace.
void init ()
void resetSlave ()
 Kills and reconstructs the slave dialog, when the eigengrasp interface changes.
void setAmplitudes (double *amp)
 Sets the sliders to match the set of amplitudes given in amp.
void setSlaveLayout (int nGrasps)
 Populates the slave with the right number of sliders, controls, etc.

Private Attributes

QVBoxLayout * mainLayout
std::vector< QScrollBar * > mBarList
std::vector< QCheckBox * > mCheckList
EigenGraspInterfacemEigenGrasps
 The eigengrasp interface of the current hand.
HandmHand
 The hand that this dialog is controlling.
double * mLegalAmplitudes
int mNumberGrasps
 The number of eigengrasps in the interface, and thus the number of sliders in the dialog.
QDialog * mSlave
 Holds all the eg sliders and any controls that must exist for each eg.
double mSliderConversion
 Converts slider units to eigengrasp amplitudes.
std::vector< QLabel * > mValueList
WorldmWorld
 The world that the hand belongs to.
int SLIDER_STEPS
 The resolution of the sliders, set through Qt.

Detailed Description

The eigengrasp dialog allows the user to see hand motion along eigengrasp dimensions.

This is the ui for eigengrasp movement of a hand. The main functionality is that the user can inspect hand motion along any eigengrasp dimension. However, collisions are NOT checked, either with the hand itself or with external object.

The principal interface is a set of sliders, one for each eigengrasp dimension, that the user can manipulate. The user can also decide if the eigengrasp interface should be "rigid" or not, see the EigenGraspInterface class documentation for details.

The user can also manipulate individual dof's as usual in GraspIt and see the projection of the set pose in eg space. It is also possible to make the eg space rigid, in which case if an individual dof is moved, the dialog will project the resulting pose in eg space, then project the result back in dof space and use it to set robot posture. In this mode, even if the user manipulates individual dof's, the dialog will try to find the closest posture in eg space that matches the desired dof posture.

Whenever the posture of the robot is changed, this will also attempt to re-compute the min and max values along each eigengrasp and set slider limits accordingly. This unfortunately has never worked very well.

In this dialog it is also possible to load a different set of eigengrasps from a file, or to set the trivial (identity) eigengrasp set. Therefore, the sliders themselves are not shown in the main window, but rather in a "slave" dialog window which is killed and reconstructed each time the eigengrasp interface changes.

Definition at line 74 of file eigenGraspDlg.h.


Constructor & Destructor Documentation

EigenGraspDlg::EigenGraspDlg ( QWidget *  parent = 0  )  [inline]

Definition at line 115 of file eigenGraspDlg.h.

EigenGraspDlg::~EigenGraspDlg (  )  [inline]

Definition at line 119 of file eigenGraspDlg.h.


Member Function Documentation

void EigenGraspDlg::adjustSliders (  )  [private]

Attempts to compute the mSliderConversion factor based on the legal range of motion of all eg's.

Attempts to set the slider conversion factor based on the range of legal values of all eigengrasps in the eigengrasp interface. For various reasons this has never worked well, so right not it is hard-coded to some conversion value that works reasonably well.

Definition at line 269 of file eigenGraspDlg.cpp.

void EigenGraspDlg::closeHandButton_clicked (  )  [slot]

Obsolete; has been removed.

Definition at line 376 of file eigenGraspDlg.cpp.

void EigenGraspDlg::destroy (  )  [private]

Definition at line 46 of file eigenGraspDlg.cpp.

void EigenGraspDlg::eigenGraspChanged (  )  [slot]

The callback for slider values changed. Reads the values of the sliders, converts them to eigengrasp amplitudes. The values are checked against min and max values along each eg read from the eigengrasp interface, and clamped to be in the legal range. This has never worked completely well.

The dialod then uses the eigengrasp interface to project eg amplitudes into dof values. The interface will behave differently based on whether it is set to "rigid" or not. After that, the dof's are used to set robot pose, but no collisions are checked. Finally, the eigengrasp interface is asked to recompute its min and max values along each eigengrasp.

Definition at line 80 of file eigenGraspDlg.cpp.

void EigenGraspDlg::exitButton_clicked (  )  [slot]

Definition at line 257 of file eigenGraspDlg.cpp.

void EigenGraspDlg::fixBoxChanged (  )  [slot]

Called when the "fix" check box for a particular eigengrasp has been changed. Fixes or unfixes that particular eigengrasp. Right now, individual eigen grasp fix makes sense iff the interface is RIGID, so if a box has been checked, this will also set the entire eigengrasp interface to "rigid" mode.

Definition at line 132 of file eigenGraspDlg.cpp.

void EigenGraspDlg::goToOrigin (  )  [private]

Sets the hand posture to the origin of the eg subspace.

Definition at line 354 of file eigenGraspDlg.cpp.

void EigenGraspDlg::goToOriginButton_clicked (  )  [slot]

Definition at line 382 of file eigenGraspDlg.cpp.

void EigenGraspDlg::handConfigurationChanged (  )  [slot]

Called when the user changes a dof value directly.

When the posture of the hand is changed by the user by direct interaction with a dof, this will compute the eg projection of the resulting dof posture, and set the slider positions accordingly. That will also trigger the sliders changed callback, which will set hand posture again. The result of that will depend on whether the interface is rigid or not, see EigenGraspInterface for details.

Definition at line 316 of file eigenGraspDlg.cpp.

void EigenGraspDlg::identityButton_clicked (  )  [slot]

Definition at line 250 of file eigenGraspDlg.cpp.

void EigenGraspDlg::init (  )  [private]

Definition at line 38 of file eigenGraspDlg.cpp.

void EigenGraspDlg::loadButton_clicked (  )  [slot]

Definition at line 240 of file eigenGraspDlg.cpp.

void EigenGraspDlg::resetSlave (  )  [private]

Kills and reconstructs the slave dialog, when the eigengrasp interface changes.

Definition at line 152 of file eigenGraspDlg.cpp.

void EigenGraspDlg::rigidCheckBox_clicked (  )  [slot]

Sets the "rigid" mode of the EigenGraspInterface; see that class for details.

Definition at line 339 of file eigenGraspDlg.cpp.

void EigenGraspDlg::saveButton_clicked (  )  [slot]

Definition at line 229 of file eigenGraspDlg.cpp.

void EigenGraspDlg::setAmplitudes ( double *  amp  )  [private]

Sets the sliders to match the set of amplitudes given in amp.

Definition at line 299 of file eigenGraspDlg.cpp.

void EigenGraspDlg::setOriginButton_clicked (  )  [slot]

Sets the current dof posture to be the origin of the eg subspace.

Definition at line 329 of file eigenGraspDlg.cpp.

void EigenGraspDlg::setSlaveLayout ( int  nGrasps  )  [private]

Populates the slave with the right number of sliders, controls, etc.

Definition at line 176 of file eigenGraspDlg.cpp.

int EigenGraspDlg::setWorld ( World w  ) 

Definition at line 52 of file eigenGraspDlg.cpp.

void EigenGraspDlg::show (  )  [slot]

Definition at line 294 of file eigenGraspDlg.cpp.


Member Data Documentation

QVBoxLayout* EigenGraspDlg::mainLayout [private]

Definition at line 98 of file eigenGraspDlg.h.

std::vector<QScrollBar*> EigenGraspDlg::mBarList [private]

Definition at line 96 of file eigenGraspDlg.h.

std::vector<QCheckBox*> EigenGraspDlg::mCheckList [private]

Definition at line 97 of file eigenGraspDlg.h.

The eigengrasp interface of the current hand.

Definition at line 89 of file eigenGraspDlg.h.

The hand that this dialog is controlling.

Definition at line 87 of file eigenGraspDlg.h.

Definition at line 85 of file eigenGraspDlg.h.

The number of eigengrasps in the interface, and thus the number of sliders in the dialog.

Definition at line 83 of file eigenGraspDlg.h.

QDialog* EigenGraspDlg::mSlave [private]

Holds all the eg sliders and any controls that must exist for each eg.

Definition at line 94 of file eigenGraspDlg.h.

Converts slider units to eigengrasp amplitudes.

Definition at line 81 of file eigenGraspDlg.h.

std::vector<QLabel*> EigenGraspDlg::mValueList [private]

Definition at line 95 of file eigenGraspDlg.h.

The world that the hand belongs to.

Definition at line 91 of file eigenGraspDlg.h.

The resolution of the sliders, set through Qt.

Definition at line 79 of file eigenGraspDlg.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:20 2012