Update of /cvsroot/playerstage/code/stage/libstage
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1907

Modified Files:
      Tag: opengl
        canvas.cc stest.cc 
Log Message:
stest better supports multiple robots

Index: stest.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/stest.cc,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -C2 -d -r1.1.2.15 -r1.1.2.16
*** stest.cc    19 Nov 2007 08:18:44 -0000      1.1.2.15
--- stest.cc    19 Nov 2007 08:30:34 -0000      1.1.2.16
***************
*** 13,19 ****
  
  #include "stage.hh"
- //#include "world.hh"
- //#include "worldgtk.hh"
- //#include "config.h" // results of autoconf's system configuration tests
  
  double minfrontdistance = 0.750;
--- 13,16 ----
***************
*** 31,36 ****
  } robot_t;
  
- const int POPSIZE = 100;
- 
  #define VSPEED 0.4 // meters per second
  #define WGAIN 1.0 // turn speed gain
--- 28,31 ----
***************
*** 44,51 ****
    if( argc < 3 )
      {
!       puts( "Usage: stest <worldfile> <robotname>" );
        exit(0);
      }
! 
  
    // initialize libstage
--- 39,47 ----
    if( argc < 3 )
      {
!       puts( "Usage: stest <worldfile> <number of robots>" );
        exit(0);
      }
!   
!   const int POPSIZE = atoi(argv[2] );
  
    // initialize libstage
***************
*** 90,99 ****
         robots[i].position->Subscribe();
         
!        //sprintf( namebuf, "MyWorld.position:%d.laser:0", i );
!        //robots[i].laser = (StgModelLaser*)world.GetModel( namebuf );
!        //assert(robots[i].laser);
         //robots[i].laser->Subscribe();
  
-        //sprintf( namebuf, "MyWorld.position:%d.ranger:0", i );
         sprintf( namebuf, "%s%02d.ranger:0", base, i );
         robots[i].ranger = (StgModelRanger*)world.GetModel( namebuf );
--- 86,94 ----
         robots[i].position->Subscribe();
         
!        sprintf( namebuf, "%s%02d.laser:0", base, i );
!        robots[i].laser = (StgModelLaser*)world.GetModel( namebuf );
!        assert(robots[i].laser);
         //robots[i].laser->Subscribe();
  
         sprintf( namebuf, "%s%02d.ranger:0", base, i );
         robots[i].ranger = (StgModelRanger*)world.GetModel( namebuf );

Index: canvas.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/canvas.cc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** canvas.cc   19 Nov 2007 08:18:44 -0000      1.1.2.2
--- canvas.cc   19 Nov 2007 08:30:34 -0000      1.1.2.3
***************
*** 34,39 ****
    rotating = false;
  
!   //showflags = STG_SHOW_CLOCK | STG_SHOW_DATA | STG_SHOW_BLOCKS | 
STG_SHOW_GRID;
!   showflags = STG_SHOW_CLOCK | STG_SHOW_BLOCKS | STG_SHOW_GRID;
   
    // start the timer that causes regular redraws
--- 34,39 ----
    rotating = false;
  
!   showflags = STG_SHOW_CLOCK | STG_SHOW_DATA | STG_SHOW_BLOCKS | 
STG_SHOW_GRID;
!   //showflags = STG_SHOW_CLOCK | STG_SHOW_BLOCKS | STG_SHOW_GRID;
   
    // start the timer that causes regular redraws


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to