int main(int argc, char **argv) { PseudoRandomSeed(); if(argc < 3) { printf("missing arguments\n"); printf(" MotionPlanner <scene.txt> <time>\n"); printf("where\n"); printf(" <scene.txt> is one of the provided scene files\n"); printf(" <time> is the maximum running time (in seconds) for the motion planner\n"); return 0; } Simulator sim(argv[1]); MotionPlanner mp(&sim); Graphics graphics(&mp); graphics.SetMotionPlannerMaxTime(atof(argv[2])); graphics.HandleEventOnHelp(); graphics.MainLoop(); return 0; }
int main(int argc, char **argv) { PseudoRandomSeed(); dInitODE(); //create simulator and set robot position at (0, -8) Simulator sim(0, -8); //create motion planner MotionPlanner mp(&sim); //create graphics Graphics graphics(&mp); //create obstacles and terrain CreateWorld1(&sim); //if argument specified, set as maximum motion planning time if(argc > 1) graphics.SetMotionPlannerMaxTime(atof(argv[1])); //print help messages graphics.HandleEventOnHelp(); //enter event loop graphics.MainLoop(); return 0; }
int main(int argc, char **argv) { PseudoRandomSeed(); if(argc < 2) { printf("missing arguments\n"); printf(" Planner <file>\n"); return 0; } Graphics graphics(argv[1]); graphics.MainLoop(); return 0; }