grasp_planner Class Reference

This class is used to automatically generate a set of candidate grasps given a set of shape primitives for an object. More...

#include <grasp_planner.h>

List of all members.

Public Member Functions

int get_parameterMode ()
void get_planningParameters (int &nr_of_360_deg_steps_in, int &nr_of_parallel_planes_in, int &nr_of_180_deg_grasps_in, int &nr_of_grasp_rotations_in)
 grasp_planner ()
std::list< plannedGrasp * > planIt (GraspableBody *, SoGroup *)
bool set_parameterMode (int)
bool set_planningParameters (int nr_of_360_deg_steps_in, int nr_of_parallel_planes_in, int nr_of_180_deg_grasps_in, int nr_of_grasp_rotations_in)
 ~grasp_planner ()

Private Member Functions

void computeConeGraspPreshapes (std::list< plannedGrasp * > &, SoPath *)
void computeCubeGraspPreshapes (std::list< plannedGrasp * > &, SoPath *)
void computeCylinderGraspPreshapes (std::list< plannedGrasp * > &, SoPath *)
void computeGraspPreshapes (std::list< plannedGrasp * > &, SoPath *)
void computeSphereGraspPreshapes (std::list< plannedGrasp * > &, SoPath *)
int determineNumberOfGrasps (SoPathList)
bool existsInList (plannedGrasp, std::list< plannedGrasp * >)
std::list< GraspDirection * > getConeGraspDirections (SoPath *sop)
std::list< GraspDirection * > getCubeGraspDirections (SoPath *sop)
std::list< GraspDirection * > getCylinderGraspDirections (SoPath *sop)
SoPath * getGlobalPath (SoNode *node)
std::list< plannedGrasp * > getPlannedGraspDirections (SoPath *)
std::list< GraspDirection * > getSphereGraspDirections (SoPath *sop)
void localToGlobalCoordinates (std::list< plannedGrasp * > &, SoPath *, const transf &)
SoPathList searchPrimitives (GraspableBody *)
bool set_planningParametersFromPrimitive (SoPath *)

Private Attributes

SoGroup * IVGeomPrimitives
 a pointer to an Inventor scene graph containing the shape primitives
IVmgrivmgr
 a pointer to the inventor manager
GraspableBodymy_body
 a pointer to the grasped object
SoQtExaminerViewermyViewer
 a pointer to the main window viewer
int nr_of_180_deg_grasps
 Number of hand rotations about the approach vector for boxes and side grasps of cylinders, either 1 or 2.
int nr_of_360_deg_steps
 When grasping a cylinder, cone, or sphere, this sets how many samples of 360 degrees are used. Should be an even number.
int nr_of_grasp_rotations
 Number of hand rotations about the approach vector for spheres and end grasps of cylinders.
int nr_of_parallel_planes_depth
 Number of parallel planes of grasping positions along the depth of a cube.
int nr_of_parallel_planes_height
 Number of parallel planes of grasping positions along the height of a cube.
int nr_of_parallel_planes_width
 Number of parallel planes of grasping positions along the width of a cube.
int parameterMode
 The parameter mode sets the way the parameters for the planning step are determined.

Detailed Description

This class is used to automatically generate a set of candidate grasps given a set of shape primitives for an object.

The grasps are chosen based on heuristics defined for each shape primitive (see grasp planning paper "Automatic grasp planning using shape primitives"). The number of grasps produced depends two factors: the dimensions of each primitive, and the values of the sampling parameters (also explained in the paper). The values of these sampling parameters can be selected manually by the user for maximum control, or automatic sampling can be used and the density of the samples depends on the value of parameterMode:

At the completion of the planning process, a list of candidate grasps is returned to the grasp manager.

Definition at line 188 of file grasp_planner.h.


Constructor & Destructor Documentation

grasp_planner::grasp_planner (  ) 

Sets the defaults for the planning parameters.

Definition at line 101 of file grasp_planner.cpp.

grasp_planner::~grasp_planner (  ) 

Stub destructor.

Definition at line 122 of file grasp_planner.cpp.


Member Function Documentation

void grasp_planner::computeConeGraspPreshapes ( std::list< plannedGrasp * > &  graspList,
SoPath *  sop 
) [private]

Given a path to a cone primitive, and a list of planned grasp directions, this will create one or more grasps for each grasp position using different thumb directions and either a cylindrical grasp preshape (for side and edge grasps) or a spherical grasp preshape (for top and bottom grasps). The number of grasps created for a given grasp direction depends on the sampling parameters and the dimensions of the primitive.

Definition at line 1480 of file grasp_planner.cpp.

void grasp_planner::computeCubeGraspPreshapes ( std::list< plannedGrasp * > &  graspList,
SoPath *  sop 
) [private]

Given a path to a cube primitive, and a list of planned grasp directions, this will create one or more grasps for each grasp position using different thumb directions and a cylindrical grasp preshape. The number of grasps created for a given grasp direction depends on the sampling parameters and the dimensions of the primitive.

Definition at line 1217 of file grasp_planner.cpp.

void grasp_planner::computeCylinderGraspPreshapes ( std::list< plannedGrasp * > &  graspList,
SoPath *  sop 
) [private]

Given a path to a cylinder primitive, and a list of planned grasp directions, this will create one or more grasps for each grasp position using different thumb directions and either a cylindrical grasp preshape (for side grasps) or a spherical grasp preshape (for end grasps). The number of grasps created for a given grasp direction depends on the sampling parameters and the dimensions of the primitive.

Definition at line 1318 of file grasp_planner.cpp.

void grasp_planner::computeGraspPreshapes ( std::list< plannedGrasp * > &  graspList,
SoPath *  sop 
) [private]

Given a path to a shape primitive, this determines the type of the primitive, and calls the appropriate routine to generate grasp preshapes for each grasp in the graspList. The graspList that is returned is a new list that may have multiple candidate grasps at each of the original grasp directions.

Definition at line 1174 of file grasp_planner.cpp.

void grasp_planner::computeSphereGraspPreshapes ( std::list< plannedGrasp * > &  graspList,
SoPath *  sop 
) [private]

Given a path to a sphere primitive, and a list of planned grasp directions, this will create one or more grasps for each grasp position using different thumb directions and a spherical grasp preshape. The number of grasps created for a given grasp direction depends on the sampling parameters and the dimensions of the primitive.

Definition at line 1417 of file grasp_planner.cpp.

int grasp_planner::determineNumberOfGrasps ( SoPathList  pl  )  [private]

This returns the number of candidate grasps that will be created for a given shape primitive. It uses the values of sampling parameters to determine the total number of grasps.

Definition at line 463 of file grasp_planner.cpp.

bool grasp_planner::existsInList ( plannedGrasp  pg,
std::list< plannedGrasp * >  pgList 
) [private]

Determines if the grasp pg exists in the grasp list pgList. This is slow and is not currently used.

It is also commented out due to linker problem, as the operator - is not actually defined.

Definition at line 509 of file grasp_planner.cpp.

int grasp_planner::get_parameterMode (  ) 

Returns the current value of the parameterMode.

Definition at line 1663 of file grasp_planner.cpp.

void grasp_planner::get_planningParameters ( int &  nr_of_360_deg_steps_in,
int &  nr_of_parallel_planes_in,
int &  nr_of_180_deg_grasps_in,
int &  nr_of_grasp_rotations_in 
)

Returns the current values of the planning parameters.

Definition at line 567 of file grasp_planner.cpp.

std::list< GraspDirection * > grasp_planner::getConeGraspDirections ( SoPath *  sop  )  [private]

Given a path to a cone primitive, this will create a list of grasp directions using the heuristics described in the planning paper. The number of grasp directions created depends on the value of the sampling parameters.

Definition at line 1059 of file grasp_planner.cpp.

std::list< GraspDirection * > grasp_planner::getCubeGraspDirections ( SoPath *  sop  )  [private]

Given a path to a cube primitive, this will create a list of grasp directions using the heuristics described in the planning paper. The number of grasp directions created depends on the value of the sampling parameters.

Definition at line 876 of file grasp_planner.cpp.

std::list< GraspDirection * > grasp_planner::getCylinderGraspDirections ( SoPath *  sop  )  [private]

Given a path to a cylinder primitive, this will create a list of grasp directions using the heuristics described in the planning paper. The number of grasp directions created depends on the value of the sampling parameters.

Definition at line 790 of file grasp_planner.cpp.

SoPath * grasp_planner::getGlobalPath ( SoNode *  node  )  [private]

This searches the root of the world scene graph for a specific node pointed to by node. If it is found, it returns the path from the world root to that node. Otherwise it returns NULL.

Definition at line 659 of file grasp_planner.cpp.

std::list< plannedGrasp * > grasp_planner::getPlannedGraspDirections ( SoPath *  sop  )  [private]

Given a path to a shape primitive, this determines the type of the primitive, and calls the appropriate routine to generate grasp directions for that primitive type. These directions are used to create a new list of candidate grasps that is returned at the end of this routine.

Definition at line 734 of file grasp_planner.cpp.

std::list< GraspDirection * > grasp_planner::getSphereGraspDirections ( SoPath *  sop  )  [private]

Given a path to a sphere primitive, this will create a list of grasp directions using the heuristics described in the planning paper. The number of grasp directions created depends on the value of the sampling parameters.

Definition at line 1008 of file grasp_planner.cpp.

void grasp_planner::localToGlobalCoordinates ( std::list< plannedGrasp * > &  graspList,
SoPath *  pathToPrim,
const transf objTran 
) [private]

Given a list of all the candidate grasps generated for a single shape primitive, a path to the shape from the primitives root node, and the overall transform for the entire grasped object with respect to the world, this will transform each of the grasps to the world coordinate system.

Definition at line 687 of file grasp_planner.cpp.

std::list< plannedGrasp * > grasp_planner::planIt ( GraspableBody gb,
SoGroup *  IVPrimitives 
)

This is the main method that is called from the grasp_manager. Given a pointer to a GraspableBody and a pointer to an Inventor scene graph containing the shape primitives for the body, it examines each primitive individually and calls the various methods in this class to create candidate grasps for each primitive. These are combined into a complete grasp list that is returned at the end of the routine.

Definition at line 139 of file grasp_planner.cpp.

SoPathList grasp_planner::searchPrimitives ( GraspableBody bg  )  [private]

This searches the primitives scene graph for instances of the 4 different types of shape primitives: cylinders, cubes, cones, and spheres. For each primitive it finds it saves the path from the root of the scene graph to that node in a path list. The final list of paths is returned at the end.

Definition at line 584 of file grasp_planner.cpp.

bool grasp_planner::set_parameterMode ( int  in  ) 

Sets the parameterMode to in. Returns TRUE if the set was successful.

Definition at line 1671 of file grasp_planner.cpp.

bool grasp_planner::set_planningParameters ( int  nr_of_360_deg_steps_in,
int  nr_of_parallel_planes_in,
int  nr_of_180_deg_grasps_in,
int  nr_of_grasp_rotations_in 
)

Sets the planning parameters from user supplied values.

Definition at line 539 of file grasp_planner.cpp.

bool grasp_planner::set_planningParametersFromPrimitive ( SoPath *  sop  )  [private]

This automatically sets the sampling parameters for a given shape primitive and a user supplied sampling density value (parameterMode ). If the parameterMode is 0 then the sampling parameters are provided by the user and this function returns immediately with FALSE value. Otherwise larger values will result in larger values of the sampling parameters. Larger primitive dimensions will also result in larger values. As long as the parameter mode greater than 0, TRUE is returned.

Definition at line 301 of file grasp_planner.cpp.


Member Data Documentation

SoGroup* grasp_planner::IVGeomPrimitives [private]

a pointer to an Inventor scene graph containing the shape primitives

Definition at line 202 of file grasp_planner.h.

a pointer to the inventor manager

Definition at line 199 of file grasp_planner.h.

a pointer to the grasped object

Definition at line 196 of file grasp_planner.h.

a pointer to the main window viewer

Definition at line 193 of file grasp_planner.h.

Number of hand rotations about the approach vector for boxes and side grasps of cylinders, either 1 or 2.

Definition at line 225 of file grasp_planner.h.

When grasping a cylinder, cone, or sphere, this sets how many samples of 360 degrees are used. Should be an even number.

Definition at line 213 of file grasp_planner.h.

Number of hand rotations about the approach vector for spheres and end grasps of cylinders.

Definition at line 228 of file grasp_planner.h.

Number of parallel planes of grasping positions along the depth of a cube.

Definition at line 222 of file grasp_planner.h.

Number of parallel planes of grasping positions along the height of a cube.

Definition at line 219 of file grasp_planner.h.

Number of parallel planes of grasping positions along the width of a cube.

Definition at line 216 of file grasp_planner.h.

The parameter mode sets the way the parameters for the planning step are determined.

Definition at line 205 of file grasp_planner.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