Esempio n. 1
0
int main (int argc, char **argv)
{
  int index = Simulation::contains(argv,argc,"-guide");
  if(index >0 && argc>index){
    teacher=atof(argv[index]);
    useSym = 1;
  }
  index = Simulation::contains(argv,argc,"-k");
  if(index >0 && argc>index){
    k=atoi(argv[index]);
  }
  index = Simulation::contains(argv,argc,"-change");
  if(index >0 && argc>index){
    change=atoi(argv[index]);
  }
  index = Simulation::contains(argv,argc,"-bars");
  if(index >0 && argc>index){
    bars=atoi(argv[index]);
  }
  index = Simulation::contains(argv,argc,"-stairs");
  if(index >0 && argc>index){
    stairs=atoi(argv[index]);
  }
  track = Simulation::contains(argv,argc,"-notrack") == 0;

  ThisSim sim;
  sim.setGroundTexture("Images/red_velour_wb.rgb");
  sim.setCaption("lpzrobots Simulator               Martius et al, 2009");
  return sim.run(argc, argv) ? 0 :  1;
}
Esempio n. 2
0
int main (int argc, char **argv)
{
  ThisSim sim;
  sim.setCaption("Spherical Robot (lpzrobots Simulator)   Martius,Der 2007");
  // run simulation
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 3
0
int main (int argc, char **argv)
{

  ThisSim sim;
  sim.setGroundTexture("Images/red_velour_wb.rgb");
  sim.setCaption("lpzrobots Simulator               Martius et al, 2009");
  return sim.run(argc, argv) ? 0 :  1;
}
Esempio n. 4
0
int main (int argc, char **argv)
{
	ThisSim sim;

	return sim.run(argc, argv) ? 0 : 1;



}
Esempio n. 5
0
int main (int argc, char **argv)
{
    // New simulation
    ThisSim sim;
    // set Title of simulation
    sim.setTitle("BASIC SIM by Simon");
    // Simulation begins
    return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 6
0
int main (int argc, char **argv)
{
  if(argc <= 1){
    printUsage(argv[0]);
    return -1;
  }
  channels = std::max(1,atoi(argv[1]));
  ThisSim sim;
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 7
0
int main (int argc, char **argv)
{ 
  if(Simulation::contains(argv,argc,"-eliptic")>0)
    env=ElipticBasin;
  if(Simulation::contains(argv,argc,"-single")>0)
    env=SingleBasin;
  if(Simulation::contains(argv,argc,"-three")>0)
    env=ThreeBump;
  track = (Simulation::contains(argv,argc,"-track")>0);
  
  ThisSim sim;  
  return sim.run(argc, argv) ? 0 : 1;

}
Esempio n. 8
0
int main (int argc, char **argv)
{
  if (Simulation::contains(argv, argc, "-barriers")) {
    barriers=true;
  }
  if (Simulation::contains(argv, argc, "-hippo")) {
    hippo=true;
  }
  if (Simulation::contains(argv, argc, "-air")) {
    air=true;
  }


  ThisSim sim;
  return sim.run(argc, argv) ? 0 : 1;

}
Esempio n. 9
0
int main (int argc, char **argv)
{
    int index = Simulation::contains(argv,argc,"-guide");
    if(index >0 && argc>index) {
        teacher=atof(argv[index]);
    }
    index = Simulation::contains(argv,argc,"-bars");
    if(index >0 && argc>index) {
        bars=atoi(argv[index]);
    }
    track = Simulation::contains(argv,argc,"-track") != 0;
    tracksegm = Simulation::contains(argv,argc,"-tracksegm") != 0;

    ThisSim sim;
    sim.setGroundTexture("Images/green_velour_wb.rgb");
    sim.setCaption("lpzrobots Simulator Homeokinesis -  One-Layer Controller");
    return sim.run(argc, argv) ? 0 :  1;
}
Esempio n. 10
0
/* 			$ ./start terrain_type
	e.g. 	$ ./start 4 
*/
int main(int argc, char **argv)
{
  ThisSim sim;
  sim.setGroundTexture("Images/greenground.rgb");
  if (argc > 1) {
  	terrain_type_g = atoi(argv[1]);
  }
  if (argc > 2) {
  	tn_std_prcnt = atof(argv[2]);
  	terrain_noise = true;
  	cout << "terrain_noise on" << endl;
  }
  if (argc > 3) {
  	sim_noise = atof(argv[3]);
  }
  
  return sim.run(argc, argv) ? 0 : 1;
}
TEST(NejihebiExampleTest, movement) {
  // increase stack size (Only necessary for Nejihebi robot)
  const rlim_t kStackSize = 32 * 1024 * 1024;   // min stack size = 16 MB
  struct rlimit rl;
  getrlimit(RLIMIT_STACK, &rl);
  if (rl.rlim_cur < kStackSize) {
      rl.rlim_cur = kStackSize;
      setrlimit(RLIMIT_STACK, &rl);
  }
  // end of increasing stack size
  ThisSim sim;
  sim.setStepLimit(50);
  char *args[] = {"-nographics"};
  sim.run(1, args);
  lpzrobots::Pos final_pos = sim.getFinalPosition();
  ASSERT_NEAR(-3.817293, final_pos.x(), 1e-4);
  ASSERT_NEAR(-0.230475, final_pos.y(), 1e-4);
  ASSERT_NEAR( 0.844358, final_pos.z(), 1e-4);
}
Esempio n. 12
0
int main (int argc, char **argv)
{
  ThisSim sim;
  track = sim.contains(argv, argc, "-track"); // check whether cmd-line contains -track
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 13
0
int main (int argc, char **argv)
{
  ThisSim sim;
  // run simulation
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 14
0
int main(int argc, char **argv)
    {
  ThisSim sim;
  sim.setGroundTexture("Images/greenground.rgb");
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 15
0
int main (int argc, char **argv)
{  
  ThisSim sim;
  track = sim.contains(argv,argc,"-track") != 0;
  return sim.run(argc, argv) ? 0 : 1;
}
Esempio n. 16
0
int main (int argc, char **argv)
{ 
  track = (Simulation::contains(argv,argc,"-track")>0);
  ThisSim sim;
  return sim.run(argc, argv) ? 0 : 1;
}