//---------------------------------------------------------------------- // The Motion Strategy Library (MSL) //---------------------------------------------------------------------- // // Copyright (c) 1998-2001 Iowa State University and Steve LaValle. // All Rights Reserved. // // Permission to use, copy, and distribute this software and its // documentation is hereby granted free of charge, provided that // (1) it is not a component of a commercial product, and // (2) this notice appears in all copies of the software and // related documentation. // // Iowa State University and the author make no representations // about the suitability or fitness of this software for any purpose. // It is provided "as is" without express or implied warranty. //---------------------------------------------------------------------- // // Front end for Visibility PRM by Kevin Crotty and Andrew Olson // in fulfillment of 2001 Com S 476 final project requirements // //---------------------------------------------------------------------- #include #include // This includes the core header files of the Motion Strategy Library #include #include // This includes the visibility PRM #include "visprm.h" // The next include should appear before the actual code in a file using LEDA. // It locally uses short names like vector, list, etc., but does not cause // name conflicts globally, assuming the last line UNDEFINE's the names. #include int main(int argc, char *argv[]) { string path; GuiPlanner *gui; Model *m = NULL; Geom *g = NULL; Problem *prob; if (argc < 2) { cout << "Try this: slide ../data/cross\n"; exit(-1); } path = string(argv[1])+"/"; if (!is_directory(path)) { cout << "Error: Directory does not exist\n"; exit(-1); } SetupProblem(m,g,path); prob = new Problem(g,m,path); // Initialize everything: Gui, Scene, Render, and RRT // All of them will use the same file path gui = new GuiPlanner(new RenderGL(new Scene(prob, path), path), new VisPRM(prob)); // Activate the GUI gui->Start(); return 0; } // Undefine the short leda names (e.g., vector now becomes leda_vector) #include