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 00022 // This includes the core header files of the Motion Strategy Library 00023 #include <MSL/MSL.h> 00024 #include <MSL/rendergl.h> 00025 00026 // This includes the new model called Model3DRigidHelical 00027 #include "rrtslide.h" 00028 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: slide ../data/cross\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 SetupProblem(m,g,path); 00051 prob = new Problem(g,m,path); 00052 00053 // Initialize everything: Gui, Scene, Render, and RRT 00054 // All of them will use the same file path 00055 gui = new GuiPlanner(new RenderGL(new Scene(prob, path), path), 00056 new RRTSlide(prob)); 00057 00058 // Activate the GUI 00059 gui->Start(); 00060 00061 return 0; 00062 } 00063