Hand Class Reference

A hand is a special type of robot that can have a grasp associated with it. More...

#include <robot.h>

Inheritance diagram for Hand:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool approachToContact (double moveDist, bool oneStep=true)
 Moves the hand in the pre-specified approach direction until contact is made.
virtual bool autoGrasp (bool renderIt, double speedFactor=1.0, bool stopAtContact=false)
 Closes all fingers in a direction pre-specified (usually in config file).
virtual void cloneFrom (Hand *original)
 Clones this hand from another.
virtual bool findInitialContact (double moveDist)
 Moves the hand back until it is out of collision, then forward until a contact is made.
KinematicChaingetFinger (int i) const
GraspgetGrasp () const
int getNumFingers () const
LinkgetPalm () const
 Hand (World *w, const char *name)
 Constructs the instance of the Grasp, then calls the Robot constructor.
virtual bool quickOpen (double speedFactor=0.1)
 Opens the fingers in the opposite direction of autoGrasp.
virtual ~Hand ()
 Also deletes the instance of the Grasp.

Protected Attributes

Graspgrasp
 A pointer to the grasp associated with this hand.

Detailed Description

A hand is a special type of robot that can have a grasp associated with it.

A hand is a special type of a more generic robot. Generally it consists of a palm as the base link and one or more fingers, which are kinematic chains. One instance of a grasp is associated with each hand, and it is usually analyzed each time contacts between the hand and the object to be grasped change. The hand class also provides an autograsp method which closes the fingers at fixed rates until further motion is prevented by contacts.

This class is more the results of legacy architecture than any conceptual differences. Arguably, any robot is also a "hand", especially since we allow any robot to have multiple kinematic chains. It is possible that we will get rid of the Hand class altogether at some point.

Definition at line 669 of file robot.h.


Constructor & Destructor Documentation

Hand::Hand ( World w,
const char *  name 
)

Constructs the instance of the Grasp, then calls the Robot constructor.

Simply creates a new grasp object

Definition at line 2202 of file robot.cpp.

Hand::~Hand (  )  [virtual]

Also deletes the instance of the Grasp.

Deletes the associate grasp object

Definition at line 2208 of file robot.cpp.


Member Function Documentation

bool Hand::approachToContact ( double  moveDist,
bool  oneStep = true 
) [virtual]

Moves the hand in the pre-specified approach direction until contact is made.

Moves the palm (robot) in the direction specified by approachDirection. It stops if an object has been touched, or the maximum distance of moveDist has been covered. Returns true if object has been hit. It expects an initial state that is collision-free.

Definition at line 2328 of file robot.cpp.

bool Hand::autoGrasp ( bool  renderIt,
double  speedFactor = 1.0,
bool  stopAtContact = false 
) [virtual]

Closes all fingers in a direction pre-specified (usually in config file).

Closes each DOF at a rate equal to speedFactor * its default velocity. The closing continues until a joint limit is reached or a contact prevents further motion. The larger the speedFactor, the larger the individual steps will be and increases the likelyhood that a collision may be missed. The renderIt flag controls whether the intermediate steps will be rendered.

If stopAtContact is set and the execution is in static mode, movement will stop as soon as any contact is made. Otherwise, movement will continue untill all joints have been stopped and no movement is possible.

If you want the opposite motion, just pass a negative speedFactor.

Definition at line 2240 of file robot.cpp.

void Hand::cloneFrom ( Hand original  )  [virtual]

Clones this hand from another.

Calls the Robot's clone fctn, but also sets this hand's grasp to point to the same object as the original's

Reimplemented in M7, M7Tool, Pr2Gripper, and Robonaut.

Definition at line 2218 of file robot.cpp.

bool Hand::findInitialContact ( double  moveDist  )  [virtual]

Moves the hand back until it is out of collision, then forward until a contact is made.

Moves the hand back along its approach direction until it is collision free, then forward until it finds the exact moment of contact. It moves forward at most moveDist. It can accept an initial state that is in collision, as it will move back until collision is resolved.

Definition at line 2352 of file robot.cpp.

KinematicChain* Hand::getFinger ( int  i  )  const [inline]

Returns a pointer to the i-th kinematic chain.

Definition at line 690 of file robot.h.

Grasp* Hand::getGrasp (  )  const [inline]

Returns a pointer to the associated grasp object.

Definition at line 696 of file robot.h.

int Hand::getNumFingers (  )  const [inline]

Returns the number of fingers in the hand. Fingers are just another name for kinematic chains, so this is just a convenience function

Definition at line 687 of file robot.h.

Link* Hand::getPalm (  )  const [inline]

Returns a pointer to the base link of the hand.

Definition at line 693 of file robot.h.

bool Hand::quickOpen ( double  speedFactor = 0.1  )  [virtual]

Opens the fingers in the opposite direction of autoGrasp.

Definition at line 2281 of file robot.cpp.


Member Data Documentation

Grasp* Hand::grasp [protected]

A pointer to the grasp associated with this hand.

Definition at line 674 of file robot.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