HandObjectState Class Reference

#include <searchState.h>

Inheritance diagram for HandObjectState:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addAttribute (QString name, double value)
void changeHand (Hand *h, bool sticky=false)
void copyFrom (const HandObjectState *s)
double distance (const HandObjectState *s) const
bool execute (Hand *h=NULL) const
 Places the given hand in the given state; if no hand is given it places its own hand.
double getAttribute (QString name) const
const SearchVariablegetConstVariable (QString name) const
HandgetHand () const
SoSeparator * getIVRoot ()
 Updates and returns the geometry of the debugging marker, with the correct transform already in.
int getNumUsedVariables () const
int getNumVariables () const
GraspableBodygetObject () const
PositionStategetPosition ()
PostureStategetPosture ()
transf getTotalTran () const
 Gives the inner transform (stored in mPosition) multiplied by the reference transform.
SearchVariablegetVariable (QString name)
const SearchVariablegetVariable (int i) const
SearchVariablegetVariable (int i)
 HandObjectState (const HandObjectState *s)
 HandObjectState (Hand *h)
void hideVisualMarker ()
 Hides the visual marker.
void printState () const
 Prints the variables to stderr.
bool readFromFile (FILE *fp)
const PositionStatereadPosition () const
const PostureStatereadPosture () const
void removeAttribute (QString name)
void reset ()
 Resets both posture and position (currently sets all variables to 0).
void saveCurrentHandState ()
 This HandObjectState becomes a snapshot of the CURRENT world state when the function is called.
void setAttribute (QString name, double value)
void setIVMarkerColor (double r, double g, double b) const
void setObject (GraspableBody *b)
void setPositionType (StateType type, bool sticky=false)
 Changes the WAY we store the hand position, not necessarily the position itself.
void setPostureType (StateType type, bool sticky=false)
 Changes the WAY we store the hand posture, not necessarily the posture itself.
void setRefTran (transf t, bool sticky=false)
 Changes the reference transform.
void showVisualMarker ()
 Places a visual marker in the world to show where its position would be.
void writeToFile (FILE *fp) const
virtual ~HandObjectState ()

Private Member Functions

void init ()

Private Attributes

SoMaterial * IVMat
 Internal storage for the visual marker.
SoSeparator * IVRoot
 Can be added to the world scene graph root so we can visualize where this solution is.
SoTransform * IVTran
 Internal storage for the visual marker.
AttributeSetmAttributes
 A set of attributes with numerical values that are used to store information, but not to search on.
HandmHand
 The hand that this state refers to.
PositionStatemPosition
 The variables that define the hand position relative to mRefTran.
PostureStatemPosture
 The variables that define the hand posture.
transf mRefTran
 This is the reference transform that this state's transform is relative to.
GraspableBodymTargetObject
 The object that is the target of the grasp search.

Detailed Description

A HandObjectState is the combination of a PositionState and a PostureState. As such, it completely defines the hand and can be used to encapsulate the state during a search for a good grasp (grasp planning). It can also have an energy level (or quality function) associated (although it does not know how to compute it itself).

In general, can be thought of as a "State" as it encapsulates part of the state the world - the part that is relevant to grasping. It can contain the position of the hand relative to the object, the hand posture and other information. As such, can also be thought of as a "grasp" but that term already exists in GraspIt and refers to the Grasp class which does not contain state, but can compute grasp quality metrics.

Mainly, the HandObjectState contains two sets of variables: an instance of the PositionState class which is used to save the position of the hand, and an instance of the PostureState class used to save the posture of the hand.

The HandObjectState can be asked to render itself. It knows about what Hand it is used on.

It can also store a REFERENCE transform. This means that the inner transform, stored in mPosition, is only relevant relative to the reference transform. Imagine for example that we want the mPosition to just encode the trasnform relative to the target object - then we set mRefTran to the transform of the object. Or, mPosition can be relative to an input transform specified by the user, etc. Alternatively, mPosition can also store the hand transform in absolute values (world coordinates) in which case we just set mRefTran = transf::IDENTITY.

For debugging purposes, it can also create a visual marker that can be added to the world scene graph (just below the world IVRoot) which can show us where this State would want to place the hand.

Definition at line 246 of file searchState.h.


Constructor & Destructor Documentation

HandObjectState::HandObjectState ( Hand h  ) 

Definition at line 354 of file searchState.cpp.

HandObjectState::HandObjectState ( const HandObjectState s  )  [inline]

Definition at line 279 of file searchState.h.

HandObjectState::~HandObjectState (  )  [virtual]

Definition at line 376 of file searchState.cpp.


Member Function Documentation

void HandObjectState::addAttribute ( QString  name,
double  value 
) [inline]

Definition at line 330 of file searchState.h.

void HandObjectState::changeHand ( Hand h,
bool  sticky = false 
)

Definition at line 388 of file searchState.cpp.

void HandObjectState::copyFrom ( const HandObjectState s  )  [inline]

Definition at line 432 of file searchState.h.

double HandObjectState::distance ( const HandObjectState s  )  const

Definition at line 551 of file searchState.cpp.

bool HandObjectState::execute ( Hand h = NULL  )  const

Places the given hand in the given state; if no hand is given it places its own hand.

Definition at line 505 of file searchState.cpp.

double HandObjectState::getAttribute ( QString  name  )  const [inline]

Definition at line 329 of file searchState.h.

const SearchVariable * HandObjectState::getConstVariable ( QString  name  )  const

Definition at line 543 of file searchState.cpp.

Hand* HandObjectState::getHand (  )  const [inline]

Definition at line 289 of file searchState.h.

SoSeparator * HandObjectState::getIVRoot (  ) 

Updates and returns the geometry of the debugging marker, with the correct transform already in.

Definition at line 591 of file searchState.cpp.

int HandObjectState::getNumUsedVariables (  )  const [inline]

Definition at line 320 of file searchState.h.

int HandObjectState::getNumVariables (  )  const [inline]

Definition at line 319 of file searchState.h.

GraspableBody* HandObjectState::getObject (  )  const [inline]

Definition at line 291 of file searchState.h.

PositionState* HandObjectState::getPosition (  )  [inline]

Definition at line 308 of file searchState.h.

PostureState* HandObjectState::getPosture (  )  [inline]

Definition at line 306 of file searchState.h.

transf HandObjectState::getTotalTran (  )  const [inline]

Gives the inner transform (stored in mPosition) multiplied by the reference transform.

Definition at line 304 of file searchState.h.

SearchVariable * HandObjectState::getVariable ( QString  name  ) 

Definition at line 536 of file searchState.cpp.

const SearchVariable * HandObjectState::getVariable ( int  i  )  const

Definition at line 528 of file searchState.cpp.

SearchVariable * HandObjectState::getVariable ( int  i  ) 

Definition at line 519 of file searchState.cpp.

void HandObjectState::hideVisualMarker (  ) 

Hides the visual marker.

Definition at line 689 of file searchState.cpp.

void HandObjectState::init (  )  [private]

Definition at line 364 of file searchState.cpp.

void HandObjectState::printState (  )  const [inline]

Prints the variables to stderr.

Definition at line 315 of file searchState.h.

bool HandObjectState::readFromFile ( FILE *  fp  ) 

Definition at line 470 of file searchState.cpp.

const PositionState* HandObjectState::readPosition (  )  const [inline]

Definition at line 309 of file searchState.h.

const PostureState* HandObjectState::readPosture (  )  const [inline]

Definition at line 307 of file searchState.h.

void HandObjectState::removeAttribute ( QString  name  )  [inline]

Definition at line 331 of file searchState.h.

void HandObjectState::reset (  )  [inline]

Resets both posture and position (currently sets all variables to 0).

Definition at line 449 of file searchState.h.

void HandObjectState::saveCurrentHandState (  ) 

This HandObjectState becomes a snapshot of the CURRENT world state when the function is called.

Definition at line 395 of file searchState.cpp.

void HandObjectState::setAttribute ( QString  name,
double  value 
) [inline]

Definition at line 328 of file searchState.h.

void HandObjectState::setIVMarkerColor ( double  r,
double  g,
double  b 
) const

Definition at line 664 of file searchState.cpp.

void HandObjectState::setObject ( GraspableBody b  )  [inline]

Definition at line 290 of file searchState.h.

void HandObjectState::setPositionType ( StateType  type,
bool  sticky = false 
)

Changes the WAY we store the hand position, not necessarily the position itself.

If the sticky flag is true, it will attempt to maintatin the same state in the new parameterization. Otherwise the new parameterization will just be reset. The sticky flag does not work for any conversion between two parameterization types.

Definition at line 413 of file searchState.cpp.

void HandObjectState::setPostureType ( StateType  type,
bool  sticky = false 
)

Changes the WAY we store the hand posture, not necessarily the posture itself.

If the sticky flag is true, it will attempt to maintatin the same state in the new parameterization. Otherwise the new parameterization will just be reset. The sticky flag does not work for any conversion between two parameterization types.

Definition at line 435 of file searchState.cpp.

void HandObjectState::setRefTran ( transf  t,
bool  sticky = false 
)

Changes the reference transform.

If the sticky flag is true, it will attempt to change the values of the new PositionState to maintain the same overall transform that we had with the old parameterization.

Definition at line 458 of file searchState.cpp.

void HandObjectState::showVisualMarker (  ) 

Places a visual marker in the world to show where its position would be.

Definition at line 675 of file searchState.cpp.

void HandObjectState::writeToFile ( FILE *  fp  )  const

Definition at line 499 of file searchState.cpp.


Member Data Documentation

SoMaterial* HandObjectState::IVMat [private]

Internal storage for the visual marker.

Definition at line 275 of file searchState.h.

SoSeparator* HandObjectState::IVRoot [private]

Can be added to the world scene graph root so we can visualize where this solution is.

Definition at line 271 of file searchState.h.

SoTransform* HandObjectState::IVTran [private]

Internal storage for the visual marker.

Definition at line 273 of file searchState.h.

A set of attributes with numerical values that are used to store information, but not to search on.

The attributes stored here are strictly characteristics of the HandObjectState, they have no functional importance to saving or restoring the state. For example, here we would store the quality of the grasp.

Definition at line 259 of file searchState.h.

The hand that this state refers to.

Definition at line 262 of file searchState.h.

The variables that define the hand position relative to mRefTran.

Definition at line 253 of file searchState.h.

The variables that define the hand posture.

Definition at line 251 of file searchState.h.

This is the reference transform that this state's transform is relative to.

Definition at line 268 of file searchState.h.

The object that is the target of the grasp search.

Definition at line 265 of file searchState.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:22 2012