00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) 1998-2001 Iowa State University and Steve LaValle. 00006 // All Rights Reserved. 00007 // 00008 // Permission to use, copy, and distribute this software and its 00009 // documentation is hereby granted free of charge, provided that 00010 // (1) it is not a component of a commercial product, and 00011 // (2) this notice appears in all copies of the software and 00012 // related documentation. 00013 // 00014 // Iowa State University and the author make no representations 00015 // about the suitability or fitness of this software for any purpose. 00016 // It is provided "as is" without express or implied warranty. 00017 //---------------------------------------------------------------------- 00018 00019 #include <math.h> 00020 #include <stdlib.h> 00021 #include <string.h> 00022 00023 // This includes the core header files of the Motion Strategy Library 00024 #include <MSL/MSL.h> 00025 #include <MSL/rendergl.h> 00026 00027 // This includes the new model called Model3DRigidHelical 00028 #include "modelnew.h" 00029 00030 int main(int argc, char *argv[]) 00031 { 00032 string path; 00033 GuiPlanner *gui; 00034 Model *m = NULL; 00035 Geom *g = NULL; 00036 Problem *prob; 00037 00038 if (argc < 2) { 00039 cout << "Try this: helical data\n"; 00040 exit(-1); 00041 } 00042 00043 path = string(argv[1])+"/"; 00044 00045 if (!is_directory(path)) { 00046 cout << "Error: Directory does not exist\n"; 00047 exit(-1); 00048 } 00049 00050 m = new Model3DRigidHelical(path); // Define the differential model 00051 g = new GeomPQP3DRigid(path); // Use PQP and 3D triangle representations 00052 prob = new Problem(g,m,path); // This is the input to a planner 00053 00054 // Initialize everything: Gui, Scene, Render, and RRT 00055 // All of them will use the same file path 00056 gui = new GuiPlanner(new RenderGL(new Scene(prob, path), path), 00057 new RRTConCon(prob)); 00058 00059 // Activate the GUI 00060 gui->Start(); 00061 00062 return 0; 00063 } 00064