00001 #include <math.h> 00002 #include <stdlib.h> 00003 00004 // This includes all of the header files of the Motion Strategy Library 00005 #include <MSL/MSL.h> 00006 00007 // This includes the new model called Model3DRigidHelical 00008 #include "modelnew.h" 00009 00010 // The next include should appear before the actual code in a file using LEDA. 00011 // It locally uses short names like vector, list, etc., but does not cause 00012 // name conflicts globally, assuming the last line UNDEFINE's the names. 00013 #include <LEDA/REDEFINE_NAMES.h> 00014 00015 int main(int argc, char *argv[]) 00016 { 00017 string path; 00018 GuiPlanner *gui; 00019 Model *m = NULL; 00020 Geom *g = NULL; 00021 Problem *prob; 00022 00023 if (argc < 2) { 00024 cout << "Try this: test helical\n"; 00025 exit(-1); 00026 } 00027 00028 path = string(argv[1])+"/"; 00029 00030 if (!is_directory(path)) { 00031 cout << "Error: Directory does not exist\n"; 00032 exit(-1); 00033 } 00034 00035 m = new Model3DRigidHelical(path); // Define the differential model 00036 g = new GeomPQP3DRigid(path); // Use PQP and 3D triangle representations 00037 prob = new Problem(g,m,path); // This is the input to a planner 00038 00039 // Initialize everything: Gui, Scene, Render, and RRT 00040 // All of them will use the same file path 00041 gui = new GuiPlanner(new RenderPerformer(new Scene(prob, path), path), 00042 new RRTConCon(prob)); 00043 00044 // Activate the GUI 00045 gui->Start(); 00046 00047 return 0; 00048 } 00049 00050 00051 // Undefine the short leda names (e.g., vector now becomes leda_vector) 00052 00053 #include <LEDA/UNDEFINE_NAMES.h>