00001 //###################################################################### 00002 // 00003 // GraspIt! 00004 // Copyright (C) 2002-2009 Columbia University in the City of New York. 00005 // All rights reserved. 00006 // 00007 // GraspIt! is free software: you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation, either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // GraspIt! is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GraspIt!. If not, see <http://www.gnu.org/licenses/>. 00019 // 00020 // Author(s): Matei T. Ciocarlie 00021 // 00022 // $Id: loopPlanner.h,v 1.5 2009/12/01 18:45:28 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _loopplanner_h_ 00027 #define _loopplanner_h_ 00028 00029 #include <list> 00030 #include <QObject> 00031 00032 #include "simAnnPlanner.h" 00033 #include "search.h" 00034 00035 class Hand; 00036 class GraspPlanningState; 00037 00047 class LoopPlanner : public SimAnnPlanner 00048 { 00049 Q_OBJECT 00050 protected: 00052 std::list<GraspPlanningState*> mAvoidList; 00054 float mDistanceThreshold; 00056 virtual void resetParameters(); 00057 signals: 00059 void loopUpdate(); 00060 00061 public: 00062 LoopPlanner(Hand *h); 00063 ~LoopPlanner(); 00064 virtual PlannerType getType(){return PLANNER_LOOP;} 00065 00067 virtual const GraspPlanningState* getGrasp(int i); 00069 virtual int getListSize(){return mAvoidList.size();} 00071 virtual void clearSolutions(); 00072 00074 00075 void addToAvoidList(GraspPlanningState* state){mAvoidList.push_back(state);} 00076 }; 00077 #endif