Changeset 158 in flair-src for trunk/demos/SimpleFleet/simulator


Ignore:
Timestamp:
03/05/17 10:50:56 (5 years ago)
Author:
Sanahuja Guillaume
Message:

corrected simu/device id for sensors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/SimpleFleet/simulator/src/main.cpp

    r33 r158  
    8484int main(int argc, char* argv[])
    8585{
    86     Simulator *simu;
     86  Simulator *simu;
    8787
    88     parseOptions(argc,argv);
     88  parseOptions(argc,argv);
    8989
    90     simu= new Simulator("simulator",opti_time,90);
    91     simu->SetupConnection(address,port);
    92     simu->SetupUserInterface(xml_file);
     90  simu= new Simulator("simulator",opti_time,90);
     91  simu->SetupConnection(address,port);
     92  simu->SetupUserInterface(xml_file);
     93  #ifdef GL
     94  Parser *gui=new Parser(1024,768,1024,768,media_path,scene_file);
     95  #endif
     96  for(int i=0; i<2;i++) {
     97    stringstream uavName;
     98    uavName << name.c_str() << "_" << i;
     99    Model *drone=new X8(uavName.str(),i);
    93100#ifdef GL
    94     Parser *gui=new Parser(simu,640,480,640,480,media_path,scene_file);
     101    SimuUsGL *us_gl=new SimuUsGL(drone,"us",i,0);
    95102#endif
    96     for(int i=0; i<2;i++)
    97         {
    98                 stringstream s;
    99                 s << name.c_str() << "_" << i;
    100         Model *drone=new X8(simu,s.str(),i);
    101 #ifdef GL
    102         SimuUsGL *us_gl=new SimuUsGL(drone,"us",i);
    103 #endif
    104         SimuImu *imu=new SimuImu(drone,"imu",i);
    105         }
     103    SimuImu *imu=new SimuImu(drone,"imu",i,0);
     104  }
    106105
    107     simu->RunSimu();
     106  simu->RunSimu();
    108107
    109     delete simu;
     108  delete simu;
    110109
    111110        return 0;
Note: See TracChangeset for help on using the changeset viewer.