OnLinePlanner Class Reference

#include <onLinePlanner.h>

Inheritance diagram for OnLinePlanner:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void action (ActionType a)
ActionType getAction ()
int getFCBufferSize () const
double getObjectDistance () const
int getSABufferSize () const
double getSolutionDistance () const
virtual PlannerType getType ()
 The type of this planner, for easier run-time check.
 OnLinePlanner (Hand *h)
void pausePlanner ()
 Pause the loops; planner can be re-started.
bool resetPlanner ()
 Used to restart the search from the beginning.
void showClone (bool s)
 Shows or hides the planning clone, not the solution clone.
void showSolutionClone (bool s)
 Shows or hides the solution clone, not the planning clone.
void startPlanner ()
 Start the loops.
void useRealBarrettHand (bool s)
 ~OnLinePlanner ()

Private Member Functions

void createSolutionClone ()
 Creates another clone that is used for showing the current solution.
double distanceOutsideApproach (const transf &solTran, const transf &handTran)
void graspLoop ()
void mainLoop ()
 OnLinePlanner ()
void resetParameters ()
 Also resets the simulated annealer.
double stateDistance (const GraspPlanningState *s1, const GraspPlanningState *s2)
 A measure of how different two states are.
void updateSolutionList ()

Private Attributes

std::list< GraspPlanningState * > mCandidateList
 When using a grasp tester, this keeps a list of candidates to be sent to the tester.
GraspPlanningStatemCurrentBest
 Best state found so far.
GraspTestermGraspTester
 This one runs in a separate thread and tests grasps (usually through autograsp).
OnLineGraspInterfacemInterface
 This class is used to interface with a real hand during grasping tasks.
bool mMarkSolutions
 If this flag is set, the planner will show a visual indicator of each solution grasp it finds.
double mObjectDistance
 How far from the object we think we are (along app dir.).
HandmRefHand
HandmSolutionClone
 This clone is used just to show the best solution currently available; mostly for debugging.
int mSolutionCount
double mSolutionDistance
 How far the current solution is from the hand.

Detailed Description

Definition at line 65 of file onLinePlanner.h.


Constructor & Destructor Documentation

OnLinePlanner::OnLinePlanner (  )  [inline, private]

Definition at line 96 of file onLinePlanner.h.

OnLinePlanner::OnLinePlanner ( Hand h  ) 

Definition at line 48 of file onLinePlanner.cpp.

OnLinePlanner::~OnLinePlanner (  ) 

Definition at line 81 of file onLinePlanner.cpp.


Member Function Documentation

void OnLinePlanner::action ( ActionType  a  ) 

Definition at line 119 of file onLinePlanner.cpp.

void OnLinePlanner::createSolutionClone (  )  [private]

Creates another clone that is used for showing the current solution.

Definition at line 101 of file onLinePlanner.cpp.

double OnLinePlanner::distanceOutsideApproach ( const transf solTran,
const transf handTran 
) [private]

A helper function that gives the change between two transforms, but disregards any change along the approach direction of the hand. I'm not really sure this is needed anymore, might be replaced in the future.

Definition at line 198 of file onLinePlanner.cpp.

ActionType OnLinePlanner::getAction (  ) 

Definition at line 131 of file onLinePlanner.cpp.

int OnLinePlanner::getFCBufferSize (  )  const

Definition at line 383 of file onLinePlanner.cpp.

double OnLinePlanner::getObjectDistance (  )  const [inline]

Definition at line 126 of file onLinePlanner.h.

int OnLinePlanner::getSABufferSize (  )  const [inline]

Definition at line 127 of file onLinePlanner.h.

double OnLinePlanner::getSolutionDistance (  )  const [inline]

Definition at line 125 of file onLinePlanner.h.

virtual PlannerType OnLinePlanner::getType (  )  [inline, virtual]

The type of this planner, for easier run-time check.

Reimplemented from SimAnnPlanner.

Definition at line 119 of file onLinePlanner.h.

void OnLinePlanner::graspLoop (  )  [private]

This part is called from the main loop and is responsible for the actual grasp planning that is taking place at this level.

Definition at line 337 of file onLinePlanner.cpp.

void OnLinePlanner::mainLoop (  )  [private, virtual]

The main loop here is divided into two parts. The mainLoop() itself manages the mRefHand, looks at input, manages the sub-thread that does F-C testing etc.

Reimplemented from SimAnnPlanner.

Definition at line 268 of file onLinePlanner.cpp.

void OnLinePlanner::pausePlanner (  )  [virtual]

Pause the loops; planner can be re-started.

Reimplemented from EGPlanner.

Definition at line 179 of file onLinePlanner.cpp.

void OnLinePlanner::resetParameters (  )  [private, virtual]

Also resets the simulated annealer.

Reimplemented from SimAnnPlanner.

Definition at line 94 of file onLinePlanner.cpp.

bool OnLinePlanner::resetPlanner (  )  [virtual]

Used to restart the search from the beginning.

The only function available externally to set the planner to the READY state. However, before that can actually happen, the planner must receive all needed input, which depends on the type of implementation.

It will clear any solutions saved so far and re-start the timer and the step count as well. It can not be used while the planner is running, you must pause the planner first. This function will also move the planner from INIT to READY as long as all the necessary conditions for initilized() have been met.

Reimplemented from EGPlanner.

Definition at line 154 of file onLinePlanner.cpp.

void OnLinePlanner::showClone ( bool  s  )  [virtual]

Shows or hides the planning clone, not the solution clone.

Reimplemented from EGPlanner.

Definition at line 148 of file onLinePlanner.cpp.

void OnLinePlanner::showSolutionClone ( bool  s  ) 

Shows or hides the solution clone, not the planning clone.

Definition at line 137 of file onLinePlanner.cpp.

void OnLinePlanner::startPlanner (  )  [virtual]

Start the loops.

Reimplemented from EGPlanner.

Definition at line 171 of file onLinePlanner.cpp.

double OnLinePlanner::stateDistance ( const GraspPlanningState s1,
const GraspPlanningState s2 
) [private, virtual]

A measure of how different two states are.

The online planner has a different idea on how to measure distance between states. It looks just at position (not posture) and ignores changes along the approach direction of the hand.

Reimplemented from EGPlanner.

Definition at line 188 of file onLinePlanner.cpp.

void OnLinePlanner::updateSolutionList (  )  [private]

Keeps the list of solutions sorted according to some metric

Definition at line 240 of file onLinePlanner.cpp.

void OnLinePlanner::useRealBarrettHand ( bool  s  ) 

Definition at line 125 of file onLinePlanner.cpp.


Member Data Documentation

When using a grasp tester, this keeps a list of candidates to be sent to the tester.

Definition at line 87 of file onLinePlanner.h.

Best state found so far.

Definition at line 83 of file onLinePlanner.h.

This one runs in a separate thread and tests grasps (usually through autograsp).

Definition at line 85 of file onLinePlanner.h.

This class is used to interface with a real hand during grasping tasks.

In theory, planning and execution are different things, so this class (who does the planning) should know nothing about the class that actually executes the grasp. For now however, this was easier to code.

Definition at line 92 of file onLinePlanner.h.

If this flag is set, the planner will show a visual indicator of each solution grasp it finds.

Definition at line 76 of file onLinePlanner.h.

How far from the object we think we are (along app dir.).

Definition at line 81 of file onLinePlanner.h.

The on-line planner needs to know about a reference hand that is controlled by the user and which gives us a reference point for the search. It is not ideal to store it like this, but so far this is the working solution.

Definition at line 71 of file onLinePlanner.h.

This clone is used just to show the best solution currently available; mostly for debugging.

Definition at line 74 of file onLinePlanner.h.

Definition at line 94 of file onLinePlanner.h.

How far the current solution is from the hand.

If solution distance is negative, we don't have a current solution

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