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: graspPlanningTask.h,v 1.1 2009/10/08 16:13:11 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _GRASPPLANNINGTASK_H_ 00027 #define _GRASPPLANNINGTASK_H_ 00028 00029 #include <QObject> 00030 00031 #include "taskDispatcher.h" 00032 00033 class Hand; 00034 class GraspableBody; 00035 class EGPlanner; 00036 class GraspPlanningState; 00037 00039 00053 class GraspPlanningTask : public QObject, public Task { 00054 Q_OBJECT 00055 private: 00057 Hand *mHand; 00059 GraspableBody *mObject; 00061 EGPlanner *mPlanner; 00063 int mLastSolution; 00065 db_planner::PlanningTaskRecord mPlanningTask; 00066 00068 bool saveGrasp(const GraspPlanningState *gps); 00069 00070 public: 00072 GraspPlanningTask(TaskDispatcher *disp, db_planner::DatabaseManager *mgr, 00073 db_planner::TaskRecord rec); 00075 ~GraspPlanningTask(); 00077 virtual void start(); 00078 public slots: 00080 void plannerLoopUpdate(); 00082 void plannerComplete(); 00083 }; 00084 00085 #endif