Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "graspit_dbase_tasks/dbTaskDispatcher.h"
00036
00037 #include "dbase_grasp_planner/grasp_planning_task.h"
00038 #include "dbase_grasp_planner/guided_grasp_planning_task.h"
00039 #include "dbase_grasp_planner/grasp_clustering_task.h"
00040 #include "dbase_grasp_planner/velo_grasp_planning_task.h"
00041
00042 class GraspPlanningTaskCreator : public graspit_dbase_tasks::DBTaskCreator
00043 {
00044 public:
00045 virtual graspit_dbase_tasks::DBTask* operator()(graspit_dbase_tasks::DBTaskDispatcher *disp,
00046 db_planner::DatabaseManager *mgr,
00047 db_planner::TaskRecord rec)
00048 {
00049 return new dbase_grasp_planner::GraspPlanningTask(disp, mgr, rec);
00050 }
00051 };
00052
00053 class GuidedGraspPlanningTaskCreator : public graspit_dbase_tasks::DBTaskCreator
00054 {
00055 public:
00056 virtual graspit_dbase_tasks::DBTask* operator()(graspit_dbase_tasks::DBTaskDispatcher *disp,
00057 db_planner::DatabaseManager *mgr,
00058 db_planner::TaskRecord rec)
00059 {
00060 return new dbase_grasp_planner::GuidedGraspPlanningTask(disp, mgr, rec);
00061 }
00062 };
00063
00064 class VeloGraspPlanningTaskCreator : public graspit_dbase_tasks::DBTaskCreator
00065 {
00066 public:
00067 virtual graspit_dbase_tasks::DBTask* operator()(graspit_dbase_tasks::DBTaskDispatcher *disp,
00068 db_planner::DatabaseManager *mgr,
00069 db_planner::TaskRecord rec)
00070 {
00071 return new dbase_grasp_planner::VeloGraspPlanningTask(disp, mgr, rec);
00072 }
00073 };
00074
00075 class GraspClusteringTaskCreator : public graspit_dbase_tasks::DBTaskCreator
00076 {
00077 public:
00078 virtual graspit_dbase_tasks::DBTask* operator()(graspit_dbase_tasks::DBTaskDispatcher *disp,
00079 db_planner::DatabaseManager *mgr,
00080 db_planner::TaskRecord rec)
00081 {
00082 return new dbase_grasp_planner::GraspClusteringTask(disp, mgr, rec);
00083 }
00084 };
00085
00090 extern "C" Plugin* createPlugin() {
00091 graspit_dbase_tasks::DBTaskDispatcher* dispatcher = new graspit_dbase_tasks::DBTaskDispatcher;
00092
00093 GraspPlanningTaskCreator *creator = new GraspPlanningTaskCreator;
00094 dispatcher->registerTaskCreator("GRASP_PLANNING", creator);
00095
00096 GuidedGraspPlanningTaskCreator *guided_creator = new GuidedGraspPlanningTaskCreator;
00097 dispatcher->registerTaskCreator("GUIDED_GRASP_PLANNING", guided_creator);
00098
00099 VeloGraspPlanningTaskCreator *velo_creator = new VeloGraspPlanningTaskCreator;
00100 dispatcher->registerTaskCreator("VELO_GRASP_PLANNING", velo_creator);
00101
00102 GraspClusteringTaskCreator *clustering_creator = new GraspClusteringTaskCreator;
00103 dispatcher->registerTaskCreator("GRASP_CLUSTERING", clustering_creator);
00104
00105 return dispatcher;
00106 }
00107
00108 extern "C" std::string getType() {
00109 return "dbase_grasp_planning";
00110 }
00111