#include <listPlanner.h>
Public Member Functions | |
virtual PlannerType | getType () |
The type of this planner, for easier run-time check. | |
virtual bool | initialized () |
True as long as there is something to test in the input list. | |
ListPlanner (Hand *h) | |
void | prepareState (int index) |
A hack; shows the state and also does approachToContact as the SearchEnergy would. | |
void | setInput (std::list< GraspPlanningState * > input) |
void | showState (int index) |
Shows the unprocessed state at the given index in the input list. | |
void | showVisualMarkers (bool show) |
Shows or hides visual markers of all input states. | |
void | testState (int index) |
Tests a the pre-grasp at the given index in the current input list. | |
~ListPlanner () | |
Protected Member Functions | |
GraspPlanningState * | getState (int index) |
Pulls the state at the given index from the input list. | |
virtual void | mainLoop () |
The main planning function. | |
virtual void | resetParameters () |
Also resets the planning iterator. | |
Protected Attributes | |
std::list< GraspPlanningState * > | mInputList |
std::list< GraspPlanningState * > ::iterator | mPlanningIterator |
The current position in the input list; shows the next grasp to be tried. |
The List Planner simply processes a list of grasps, computes the quality for each of them and then sorts the results. The list of grasps can be either passed in or computed on the spot by inherited versions of this class.
Depending on the EnergyFunction used, the incoming list can be of grasps or pre-grasps.
The original Primitive Planner can be re-cast as one of these. I am hoping to do that at some point.
Definition at line 45 of file listPlanner.h.
ListPlanner::ListPlanner | ( | Hand * | h | ) |
Definition at line 39 of file listPlanner.cpp.
ListPlanner::~ListPlanner | ( | ) |
The destructor also eliminates the list of input grasps, therefore care must be excercised when passing grasps to this class.
Definition at line 50 of file listPlanner.cpp.
GraspPlanningState * ListPlanner::getState | ( | int | index | ) | [protected] |
Pulls the state at the given index from the input list.
Definition at line 83 of file listPlanner.cpp.
virtual PlannerType ListPlanner::getType | ( | ) | [inline, virtual] |
The type of this planner, for easier run-time check.
Implements EGPlanner.
Definition at line 66 of file listPlanner.h.
virtual bool ListPlanner::initialized | ( | ) | [inline, virtual] |
True as long as there is something to test in the input list.
Reimplemented from EGPlanner.
Definition at line 69 of file listPlanner.h.
void ListPlanner::mainLoop | ( | ) | [protected, virtual] |
The main planning function.
The main planning function. Simply takes the next input grasp from the list, tries it and then places is in the output depending on the quality.
Implements EGPlanner.
Definition at line 126 of file listPlanner.cpp.
void ListPlanner::prepareState | ( | int | index | ) |
A hack; shows the state and also does approachToContact as the SearchEnergy would.
Definition at line 116 of file listPlanner.cpp.
void ListPlanner::resetParameters | ( | ) | [protected, virtual] |
Also resets the planning iterator.
Reimplemented from EGPlanner.
Definition at line 59 of file listPlanner.cpp.
void ListPlanner::setInput | ( | std::list< GraspPlanningState * > | input | ) |
Sets the list of input grasps to test. This class will take ownership of the list and delete all the grasps inside in its own destructor
Definition at line 67 of file listPlanner.cpp.
void ListPlanner::showState | ( | int | index | ) |
Shows the unprocessed state at the given index in the input list.
Definition at line 108 of file listPlanner.cpp.
void ListPlanner::showVisualMarkers | ( | bool | show | ) |
Shows or hides visual markers of all input states.
Definition at line 174 of file listPlanner.cpp.
void ListPlanner::testState | ( | int | index | ) |
Tests a the pre-grasp at the given index in the current input list.
Definition at line 98 of file listPlanner.cpp.
std::list<GraspPlanningState*> ListPlanner::mInputList [protected] |
The list of grasps to be tried by this planner. All HandObjectStates are deleted upon destruction of the planner
Definition at line 50 of file listPlanner.h.
std::list<GraspPlanningState*>::iterator ListPlanner::mPlanningIterator [protected] |
The current position in the input list; shows the next grasp to be tried.
Definition at line 53 of file listPlanner.h.