Revision: 6637
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6637&view=rev
Author:   rtv
Date:     2008-06-17 19:44:30 -0700 (Tue, 17 Jun 2008)

Log Message:
-----------
replaced world grid with checkered texture

Modified Paths:
--------------
    code/stage/trunk/docsrc/stage.dox
    code/stage/trunk/libstage/canvas.cc
    code/stage/trunk/libstage/model_laser.cc
    code/stage/trunk/libstage/test.cc
    code/stage/trunk/libstage/worldgui.cc
    code/stage/trunk/worlds/fasr.world

Added Paths:
-----------
    code/stage/trunk/worlds/bitmaps/cave_compact.png

Modified: code/stage/trunk/docsrc/stage.dox
===================================================================
--- code/stage/trunk/docsrc/stage.dox   2008-06-18 02:18:00 UTC (rev 6636)
+++ code/stage/trunk/docsrc/stage.dox   2008-06-18 02:44:30 UTC (rev 6637)
@@ -229,7 +229,7 @@
 # If the EXTRACT_STATIC tag is set to YES all static members of a file 
 # will be included in the documentation.
 
-EXTRACT_STATIC         = NO
+EXTRACT_STATIC         = YES
 
 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
 # defined locally in source files will be included in the documentation. 
@@ -257,7 +257,7 @@
 # If set to NO (the default) these classes will be included in the various 
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
-HIDE_UNDOC_CLASSES     = YES
+HIDE_UNDOC_CLASSES     = NO
 
 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
 # friend (class|struct|union) declarations. 

Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2008-06-18 02:18:00 UTC (rev 6636)
+++ code/stage/trunk/libstage/canvas.cc 2008-06-18 02:44:30 UTC (rev 6637)
@@ -11,6 +11,12 @@
 
 using namespace Stg;
 
+static  const int checkImageWidth = 2;
+static  const int      checkImageHeight = 2;
+static  GLubyte checkImage[checkImageHeight][checkImageWidth][4];
+static  GLuint texName;
+static bool canvas_init_done = false;
+
 void StgCanvas::TimerCallback( StgCanvas* c )
 {
   c->redraw();
@@ -25,6 +31,7 @@
 : Fl_Gl_Window(x,y,w,h)
 {
        end();
+
        //show(); // must do this so that the GL context is created before 
configuring GL
        // but that line causes a segfault in Linux/X11! TODO: test in OS X
 
@@ -375,13 +382,87 @@
 {
        glLoadIdentity();
        glViewport(0,0,W,H);
+
+       if( ! canvas_init_done ) // do a bit of texture setup
+         {
+                canvas_init_done = true;
+                int i, j, c;
+                for (i = 0; i < checkImageHeight; i++) 
+                       for (j = 0; j < checkImageWidth; j++) 
+                         {                     
+                                int even = (i+j)%2;
+                                checkImage[i][j][0] = (GLubyte) 255 - 10*even;
+                                checkImage[i][j][1] = (GLubyte) 255 - 10*even;
+                                checkImage[i][j][2] = (GLubyte) 255;// - 
5*even;
+                                checkImage[i][j][3] = 255;
+                         }
+                
+                
+                glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+                glGenTextures(1, &texName);             
+                glBindTexture(GL_TEXTURE_2D, texName);
+                glEnable(GL_TEXTURE_2D);
+                
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 
GL_NEAREST);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 
GL_NEAREST);
+                
+                
+                glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, 
checkImageHeight, 
+                                                 0, GL_RGBA, GL_UNSIGNED_BYTE, 
checkImage);
+
+                glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
+         }
 }
 
+
 void StgCanvas::DrawGlobalGrid()
 {
-       PushColor( 0,0,0,0.2 );
-       gl_draw_grid( world->GetExtent() );
+
+       
+       stg_bounds3d_t bounds = world->GetExtent();
+
+   char str[16];       
+       PushColor( 0,0,0,0.15 );
+       for( double i = floor(bounds.x.min); i < bounds.x.max; i++)
+         {
+                snprintf( str, 16, "%d", (int)i );
+                gl_draw_string(  i, 0, 0.00, str );
+         }
+       
+       for( double i = floor(bounds.y.min); i < bounds.y.max; i++)
+         {
+                snprintf( str, 16, "%d", (int)i );
+                gl_draw_string(  0, i, 0.00, str );
+         }
        PopColor();
+       
+       glEnable(GL_POLYGON_OFFSET_FILL);
+       glPolygonOffset(2.0, 2.0);
+       glDisable(GL_BLEND);
+
+   glEnable(GL_TEXTURE_2D);
+       glBindTexture(GL_TEXTURE_2D, texName);
+
+   glBegin(GL_QUADS);
+
+   glTexCoord2f( bounds.x.min/2.0, bounds.y.min/2.0 ); 
+       glVertex3f( bounds.x.min, bounds.y.min, 0 );
+   glTexCoord2f( bounds.x.max/2.0, bounds.y.min/2.0); 
+       glVertex3f(  bounds.x.max, bounds.y.min, 0 );
+   glTexCoord2f( bounds.x.max/2.0, bounds.y.max/2.0 ); 
+       glVertex3f(  bounds.x.max, bounds.y.max, 0 );
+   glTexCoord2f( bounds.x.min/2.0, bounds.y.max/2.0 ); 
+       glVertex3f( bounds.x.min, bounds.y.max, 0 );
+
+   glEnd();
+
+   glDisable(GL_TEXTURE_2D);
+       glEnable(GL_BLEND);
+       
+
+       glDisable(GL_POLYGON_OFFSET_FILL );
 }
 
 void StgCanvas::renderFrame( bool robot_camera )
@@ -393,42 +474,28 @@
        if( ! (showflags & STG_SHOW_TRAILS) || robot_camera == true )
                glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
 
-       glPushMatrix();
+       if( showflags & STG_SHOW_GRID && robot_camera == false )
+               DrawGlobalGrid();
 
-       // draw the world size rectangle in white, using the polygon offset
-       // so it doesn't z-fight with the models
-       glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-       glEnable(GL_POLYGON_OFFSET_FILL);
-       glPolygonOffset(2.0, 2.0);
-
-       glScalef( 1.0/world->Resolution(), 1.0/world->Resolution(), 0 );
-       ((StgWorldGui*)world)->DrawFloor();
-
-       glDisable(GL_POLYGON_OFFSET_FILL);
-
        if( (showflags & STG_SHOW_QUADTREE) || (showflags & STG_SHOW_OCCUPANCY) 
&& robot_camera == false )
        {
-               glDisable( GL_LINE_SMOOTH );
-               glLineWidth( 1 );
-               glPolygonMode( GL_FRONT, GL_LINE );
-               colorstack.Push(1,0,0);
-
-               if( showflags & STG_SHOW_OCCUPANCY )
-                       ((StgWorldGui*)world)->DrawTree( false );
-
-               if( showflags & STG_SHOW_QUADTREE )
-                       ((StgWorldGui*)world)->DrawTree( true );
-
-               colorstack.Pop();
-
-               glEnable( GL_LINE_SMOOTH );
+         glPushMatrix();         
+         glScalef( 1.0/world->Resolution(), 1.0/world->Resolution(), 0 );
+         
+         glLineWidth( 1 );
+         glPolygonMode( GL_FRONT, GL_LINE );
+         colorstack.Push(1,0,0);
+         
+         if( showflags & STG_SHOW_OCCUPANCY )
+                ((StgWorldGui*)world)->DrawTree( false );
+         
+         if( showflags & STG_SHOW_QUADTREE )
+                ((StgWorldGui*)world)->DrawTree( true );
+         
+         colorstack.Pop();
+         glPopMatrix();
        }
-
-       glPopMatrix();
-
-       if( showflags & STG_SHOW_GRID && robot_camera == false )
-               DrawGlobalGrid();
-
+       
        for( GList* it=selected_models; it; it=it->next )
                ((StgModel*)it->data)->DrawSelected();
 

Modified: code/stage/trunk/libstage/model_laser.cc
===================================================================
--- code/stage/trunk/libstage/model_laser.cc    2008-06-18 02:18:00 UTC (rev 
6636)
+++ code/stage/trunk/libstage/model_laser.cc    2008-06-18 02:44:30 UTC (rev 
6637)
@@ -79,9 +79,9 @@
 {
        PRINT_DEBUG2( "Constructing StgModelLaser %d (%s)\n", 
                        id, typestr );
-
+       
        // sensible laser defaults 
-       interval = 1e3 * StgModelLaser::DEFAULT_INTERVAL_MS;
+       interval = StgModelLaser::DEFAULT_INTERVAL_MS * thousand;
        laser_return = LaserVisible;
 
        stg_geom_t geom;
@@ -168,23 +168,23 @@
 
        samples = g_renew( stg_laser_sample_t, samples, sample_count );
 
-       stg_pose_t rayorg;
+       stg_pose_t rayorg = geom.pose;
        bzero( &rayorg, sizeof(rayorg));
-       rayorg.z = geom.size.z/2;
+       rayorg.z += geom.size.z/2;
 
        for( unsigned int t=0; t<sample_count; t += resolution )
        {
                stg_raytrace_sample_t sample;
 
-               rayorg.a = pose.a + bearing;
+               rayorg.a = bearing;
 
                Raytrace( rayorg, 
-                               range_max,
-                               laser_raytrace_match,
-                               NULL,
-                               &sample,
-                               true ); // z testing enabled
-
+                                        range_max,
+                                        laser_raytrace_match,
+                                        NULL,
+                                        &sample,
+                                        true ); // z testing enabled
+               
                samples[t].range = sample.range;
 
                // if we hit a model and it reflects brightly, we set

Modified: code/stage/trunk/libstage/test.cc
===================================================================
--- code/stage/trunk/libstage/test.cc   2008-06-18 02:18:00 UTC (rev 6636)
+++ code/stage/trunk/libstage/test.cc   2008-06-18 02:44:30 UTC (rev 6637)
@@ -38,7 +38,7 @@
 
   StgWorldGui world( 400,400, "Test" );
 
-  world.SetRealTimeInterval( 20000 );
+  world.SetRealTimeInterval( 10000 );
 
   world.Start();
 
@@ -46,6 +46,7 @@
   stg_geom_t geom;
   bzero( &geom, sizeof(geom) );
 
+  if( 0 )
   {
         StgModel mod( &world, NULL );
         
@@ -135,49 +136,76 @@
   } // mod goes out of scope
   
 
- #define POP 100
-  
+ #define POP 10
+  stg_velocity_t v = {0,0,0,0};
+                 
   StgModel* m[POP]; 
   for( int i=0; i<POP; i++ )
         {
-               m[i] = new StgModel( &world, NULL );
+               m[i] = new StgModelLaser( &world, NULL );
 
                //m[i]->Say( "Hello" );
-               m[i]->SetGeom( geom );
-               m[i]->SetPose( random_pose( -10,10, -10,10 ) );         
-               //m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
+               m[i]->Subscribe();
+               //m[i]->SetGeom( geom );
+               
+               //m[i]->SetPose( random_pose( -5,5, -5,5 ) );           
+               m[i]->PlaceInFreeSpace( 0, 10, 0, 10 );
                m[i]->SetColor( lrand48() | 0xFF000000 );
-               interact( &world );
+
+               v.x = drand48() / 10.0;
+               v.y = drand48() / 10.0;
+               v.z = drand48() / 10.0;
+               v.a = drand48() / 3.0;
+
+               m[i]->SetVelocity( v );
         }
-  
-  geom.size.x = 0.2;
-  geom.size.y = 0.2;
-  geom.size.z = 0.2;
 
-  for( int i=0; i<POP; i++ )
-        {
-               StgModel* top = new StgModel( &world, m[i] );
-               top->SetGeom( geom );
-               //top->SetPose( new_pose( 0,0,0,0 ) );
-               //m[i]->SetPose( random_pose( -10,10, -10,10 ) );               
-               //m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
-               top->SetColor( lrand48() | 0xFF000000 );
+
+ //  stg_pose_t o = { 1, 2, 0, 0 };
+//   stg_pose_t p = {0,0,0,0};
+
+//   m[0]->SetPose( o );
+
+//   stg_pose_t q = m[0]->LocalToGlobal( p );
+
+//   stg_print_pose( &o );
+//   stg_print_pose( &q );
+
+//   assert( fabs( q.x - o.x ) < 0.0001 );
+//   assert( fabs( q.y - o.y ) < 0.0001 );
+//   assert( fabs( q.z - o.z ) < 0.0001 );
+//   assert( fabs( q.a - o.a ) < 0.0001 );
+
+//   m[1]->SetPose( new_pose( 0,0,0,0 ));
+
+  //  geom.size.x = 0.2;
+  //geom.size.y = 0.2;
+  //geom.size.z = 0.2;
+
+//   for( int i=0; i<POP; i++ )
+//      {
+//             StgModel* top = new StgModel( &world, m[i] );
+//             top->SetGeom( geom );
+//             //top->SetPose( new_pose( 0,0,0,0 ) );
+//             //m[i]->SetPose( random_pose( -10,10, -10,10 ) );               
+//             //m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
+//             top->SetColor( lrand48() | 0xFF000000 );
                
-               //interact( &world );
-        }
+//             //interact( &world );
+//      }
 
-   for( int i=0; i<POP; i++ )
-        {
-//             m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
-               //m[i]->SetColor( 0xFF00FF00 );
+ //   for( int i=0; i<POP; i++ )
+//      {
+// //                  m[i]->PlaceInFreeSpace( -10, 10, -10, 10 );
+//             //m[i]->SetColor( 0xFF00FF00 );
 
 
-               stg_velocity_t v = {0,0,0,1};
+//             stg_velocity_t v = {0,0,0,0.1};
                
-               m[i]->SetVelocity( v );
+//             m[i]->SetVelocity( v );
                                                                
-               //interact( &world );
-        }
+//             //interact( &world );
+//      }
   
 //   for( int i=0; i<POP; i++ )
 //      {

Modified: code/stage/trunk/libstage/worldgui.cc
===================================================================
--- code/stage/trunk/libstage/worldgui.cc       2008-06-18 02:18:00 UTC (rev 
6636)
+++ code/stage/trunk/libstage/worldgui.cc       2008-06-18 02:44:30 UTC (rev 
6637)
@@ -257,47 +257,52 @@
        fileMan.newWorld( filename );
 
        StgWorld::Load( filename );
-
-//     wf_section = wf->LookupEntity( "window" );
-//     if( wf_section < 1) // no section defined
-//             return;
        
-       int wf_section = 0; // root section
+       int world_section = 0; // use the top-level section for some parms
+                                                                 // that 
traditionally live there
 
        this->paused = 
-         wf->ReadInt( wf_section, "paused", this->paused );
+         wf->ReadInt( world_section, "paused", this->paused );
 
        this->interval_real = (stg_usec_t)thousand *  
-         wf->ReadInt( wf_section, "interval_real", 
(int)(this->interval_real/thousand) );
+         wf->ReadInt( world_section, "interval_real", 
(int)(this->interval_real/thousand) );
 
-       int width =  (int)wf->ReadTupleFloat(wf_section, "size", 0, w() );
-       int height = (int)wf->ReadTupleFloat(wf_section, "size", 1, h() );
+
+       // use the window section for the rest
+       int window_section = wf->LookupEntity( "window" );
+
+       if( window_section < 1) // no section defined
+               return;
+       
+
+       int width =  (int)wf->ReadTupleFloat(window_section, "size", 0, w() );
+       int height = (int)wf->ReadTupleFloat(window_section, "size", 1, h() );
        // on OS X this behaves badly - prevents the Window manager resizing
        //larger than this size.
        size( width,height );
 
-       float x = wf->ReadTupleFloat(wf_section, "center", 0, 0 );
-       float y = wf->ReadTupleFloat(wf_section, "center", 1, 0 );
+       float x = wf->ReadTupleFloat(window_section, "center", 0, 0 );
+       float y = wf->ReadTupleFloat(window_section, "center", 1, 0 );
        canvas->camera.setPose( x, y );
 
-       canvas->camera.setPitch( wf->ReadTupleFloat( wf_section, "rotate", 0, 0 
) );
-       canvas->camera.setYaw( wf->ReadTupleFloat( wf_section, "rotate", 1, 0 ) 
);
-       canvas->camera.setScale( wf->ReadFloat(wf_section, "scale", 
canvas->camera.getScale() ) );
-       canvas->interval = wf->ReadInt(wf_section, "interval", canvas->interval 
);
+       canvas->camera.setPitch( wf->ReadTupleFloat( window_section, "rotate", 
0, 0 ) );
+       canvas->camera.setYaw( wf->ReadTupleFloat( window_section, "rotate", 1, 
0 ) );
+       canvas->camera.setScale( wf->ReadFloat(window_section, "scale", 
canvas->camera.getScale() ) );
+       canvas->interval = wf->ReadInt(window_section, "interval", 
canvas->interval );
 
        // set the canvas visibilty flags   
        uint32_t flags = canvas->GetShowFlags();
-       uint32_t grid = wf->ReadInt(wf_section, "show_grid", flags & 
STG_SHOW_GRID ) ? STG_SHOW_GRID : 0;
-       uint32_t data = wf->ReadInt(wf_section, "show_data", flags & 
STG_SHOW_DATA ) ? STG_SHOW_DATA : 0;
-       uint32_t follow = wf->ReadInt(wf_section, "show_follow", flags & 
STG_SHOW_FOLLOW ) ? STG_SHOW_FOLLOW : 0;
-       uint32_t blocks = wf->ReadInt(wf_section, "show_blocks", flags & 
STG_SHOW_BLOCKS ) ? STG_SHOW_BLOCKS : 0;
-       uint32_t quadtree = wf->ReadInt(wf_section, "show_tree", flags & 
STG_SHOW_QUADTREE ) ? STG_SHOW_QUADTREE : 0;
-       uint32_t clock = wf->ReadInt(wf_section, "show_clock", flags & 
STG_SHOW_CLOCK ) ? STG_SHOW_CLOCK : 0;
-       uint32_t trails = wf->ReadInt(wf_section, "show_trails", flags & 
STG_SHOW_TRAILS ) ? STG_SHOW_TRAILS : 0;
-       uint32_t trailsrising = wf->ReadInt(wf_section, "show_trails_rising", 
flags & STG_SHOW_TRAILRISE ) ? STG_SHOW_TRAILRISE : 0;
-       uint32_t arrows = wf->ReadInt(wf_section, "show_arrows", flags & 
STG_SHOW_ARROWS ) ? STG_SHOW_ARROWS : 0;
-       uint32_t footprints = wf->ReadInt(wf_section, "show_footprints", flags 
& STG_SHOW_FOOTPRINT ) ? STG_SHOW_FOOTPRINT : 0;
-       uint32_t status = wf->ReadInt(wf_section, "show_status", flags & 
STG_SHOW_STATUS ) ? STG_SHOW_STATUS : 0;
+       uint32_t grid = wf->ReadInt(window_section, "show_grid", flags & 
STG_SHOW_GRID ) ? STG_SHOW_GRID : 0;
+       uint32_t data = wf->ReadInt(window_section, "show_data", flags & 
STG_SHOW_DATA ) ? STG_SHOW_DATA : 0;
+       uint32_t follow = wf->ReadInt(window_section, "show_follow", flags & 
STG_SHOW_FOLLOW ) ? STG_SHOW_FOLLOW : 0;
+       uint32_t blocks = wf->ReadInt(window_section, "show_blocks", flags & 
STG_SHOW_BLOCKS ) ? STG_SHOW_BLOCKS : 0;
+       uint32_t quadtree = wf->ReadInt(window_section, "show_tree", flags & 
STG_SHOW_QUADTREE ) ? STG_SHOW_QUADTREE : 0;
+       uint32_t clock = wf->ReadInt(window_section, "show_clock", flags & 
STG_SHOW_CLOCK ) ? STG_SHOW_CLOCK : 0;
+       uint32_t trails = wf->ReadInt(window_section, "show_trails", flags & 
STG_SHOW_TRAILS ) ? STG_SHOW_TRAILS : 0;
+       uint32_t trailsrising = wf->ReadInt(window_section, 
"show_trails_rising", flags & STG_SHOW_TRAILRISE ) ? STG_SHOW_TRAILRISE : 0;
+       uint32_t arrows = wf->ReadInt(window_section, "show_arrows", flags & 
STG_SHOW_ARROWS ) ? STG_SHOW_ARROWS : 0;
+       uint32_t footprints = wf->ReadInt(window_section, "show_footprints", 
flags & STG_SHOW_FOOTPRINT ) ? STG_SHOW_FOOTPRINT : 0;
+       uint32_t status = wf->ReadInt(window_section, "show_status", flags & 
STG_SHOW_STATUS ) ? STG_SHOW_STATUS : 0;
 
        canvas->SetShowFlags( grid | data | follow | blocks | quadtree | clock
                        | trails | arrows | footprints | trailsrising | status 
);
@@ -560,31 +565,35 @@
 {
        PRINT_DEBUG1( "%s.Save()", token );
 
-       int wf_section = 0;
-
-       wf->WriteTupleFloat( wf_section, "size", 0, w() );
-       wf->WriteTupleFloat( wf_section, "size", 1, h() );
-
-       wf->WriteFloat( wf_section, "scale", canvas->camera.getScale() );
+       StgWorld::Save( filename );
        
-       wf->WriteTupleFloat( wf_section, "center", 0, canvas->camera.getX() );
-       wf->WriteTupleFloat( wf_section, "center", 1, canvas->camera.getY() );
-       
-       wf->WriteTupleFloat( wf_section, "rotate", 0, canvas->camera.getPitch() 
 );
-       wf->WriteTupleFloat( wf_section, "rotate", 1, canvas->camera.getYaw()  
);
+       // use the window section for the rest
+       int window_section = wf->LookupEntity( "window" );
 
-       uint32_t flags = canvas->GetShowFlags();
-       wf->WriteInt( wf_section, "show_blocks", flags & STG_SHOW_BLOCKS );
-       wf->WriteInt( wf_section, "show_grid", flags & STG_SHOW_GRID );
-       wf->WriteInt( wf_section, "show_follow", flags & STG_SHOW_FOLLOW );
-       wf->WriteInt( wf_section, "show_data", flags & STG_SHOW_DATA );
-       wf->WriteInt( wf_section, "show_occupancy", flags & STG_SHOW_OCCUPANCY 
);
-       wf->WriteInt( wf_section, "show_tree", flags & STG_SHOW_QUADTREE );
-       wf->WriteInt( wf_section, "show_clock", flags & STG_SHOW_CLOCK );
+       if( window_section > 0 ) // section defined
+         {
+                wf->WriteTupleFloat( window_section, "size", 0, w() );
+                wf->WriteTupleFloat( window_section, "size", 1, h() );
+                
+                wf->WriteFloat( window_section, "scale", 
canvas->camera.getScale() );
+                
+                wf->WriteTupleFloat( window_section, "center", 0, 
canvas->camera.getX() );
+                wf->WriteTupleFloat( window_section, "center", 1, 
canvas->camera.getY() );
+                
+                wf->WriteTupleFloat( window_section, "rotate", 0, 
canvas->camera.getPitch()  );
+                wf->WriteTupleFloat( window_section, "rotate", 1, 
canvas->camera.getYaw()  );
+                
+                uint32_t flags = canvas->GetShowFlags();
+                wf->WriteInt( window_section, "show_blocks", flags & 
STG_SHOW_BLOCKS );
+                wf->WriteInt( window_section, "show_grid", flags & 
STG_SHOW_GRID );
+                wf->WriteInt( window_section, "show_follow", flags & 
STG_SHOW_FOLLOW );
+                wf->WriteInt( window_section, "show_data", flags & 
STG_SHOW_DATA );
+                wf->WriteInt( window_section, "show_occupancy", flags & 
STG_SHOW_OCCUPANCY );
+                wf->WriteInt( window_section, "show_tree", flags & 
STG_SHOW_QUADTREE );
+                wf->WriteInt( window_section, "show_clock", flags & 
STG_SHOW_CLOCK );
 
-       // TODO - per model visualizations save 
-
-       return StgWorld::Save( filename );
+                // TODO - per model visualizations save 
+         }
 }
 
 
@@ -595,7 +604,6 @@
 
   bool val = paused ? true : StgWorld::Update();
   
-
   stg_usec_t interval;
   stg_usec_t timenow;
   
@@ -614,11 +622,10 @@
   } while( interval < interval_real );
   
   
+  interval_log[updates%INTERVAL_LOG_LEN] =  timenow - real_time_of_last_update;
+
   real_time_of_last_update = timenow;
   
-  
-  interval_log[updates%INTERVAL_LOG_LEN] = interval_real;//timenow - 
real_time_now;
-
   return val;
 }
 

Added: code/stage/trunk/worlds/bitmaps/cave_compact.png
===================================================================
(Binary files differ)


Property changes on: code/stage/trunk/worlds/bitmaps/cave_compact.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: code/stage/trunk/worlds/fasr.world
===================================================================
--- code/stage/trunk/worlds/fasr.world  2008-06-18 02:18:00 UTC (rev 6636)
+++ code/stage/trunk/worlds/fasr.world  2008-06-18 02:44:30 UTC (rev 6637)
@@ -1,5 +1,5 @@
 # FASR demo world 
-# Authors: Richard Vaughan
+# Authors: Richard Vaughanwo
 # $Id: fasr.world,v 1.4 2008-04-01 23:57:41 rtv Exp $
 
 # defines Pioneer-like robots
@@ -15,17 +15,19 @@
 resolution 0.02
 
 interval_sim 100  # simulation timestep in milliseconds
-interval_real 20  # real-time interval between simulation updates in 
milliseconds 
+interval_real 0  # real-time interval between simulation updates in 
milliseconds 
 paused 1
 
 # configure the GUI window
-size [ 698.000 628.000 ] 
-center [6.990 -4.040] 
-rotate [ 0.000 0.000 ]
-scale 33.306 
-show_data 0
+window
+( 
+  # size [ 698.000 628.000 ] 
+  center [6.990 -4.040] 
+  rotate [ 0.000 0.000 ]
+  scale 33.306 
+  show_data 0
+)
 
-
 # load an environment bitmap
 floorplan
 ( 
@@ -55,11 +57,10 @@
 (
  color "red"
 
- sicklaser( pose [ 0.040 0.000 0.000 ] samples 32 range_max 5 laser_return 2 ) 
+ sicklaser( pose [ 0.040 0.000 0.000 ] samples 30 range_max 5 laser_return 2  )
+ ctrl "fasr"
 
-  ctrl "fasr"   
-
-  say "Autolab"
+  # say "Autolab"
 )
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to