00001 #include <math.h> 00002 #include <stdlib.h> 00003 00004 #include "rrt.h" 00005 #include "renderpf.h" 00006 #include "guiplanner.h" 00007 #include "setup.h" 00008 #include "defs.h" 00009 00010 #include <LEDA/REDEFINE_NAMES.h> 00011 00012 int main(int argc, char *argv[]) 00013 { 00014 string path; 00015 GuiPlanner *gui; 00016 Model *m = NULL; 00017 Geom *g = NULL; 00018 Problem *prob; 00019 00020 if (argc < 2) { 00021 cout << "Usage: planpf <problem path>\n"; 00022 exit(-1); 00023 } 00024 00025 path = string(argv[1])+"/"; 00026 00027 if (!is_directory(path)) { 00028 cout << "Error: Directory does not exist\n"; 00029 exit(-1); 00030 } 00031 00032 SetupProblem(m,g,path); 00033 00034 prob = new Problem(g,m,path); 00035 00036 gui = new GuiPlanner(new RenderPerformer(new Scene(prob, path), path), 00037 new RRTConCon(prob)); 00038 00039 gui->Start(); 00040 00041 return 0; 00042 } 00043 00044 00045 #include <LEDA/UNDEFINE_NAMES.h>