Revision: 6826
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6826&view=rev
Author:   rtv
Date:     2008-07-08 18:00:59 -0700 (Tue, 08 Jul 2008)

Log Message:
-----------
libstageplugin currently broken

Modified Paths:
--------------
    code/stage/trunk/libstage/model_load.cc
    code/stage/trunk/libstage/stage.hh
    code/stage/trunk/libstageplugin/p_position.cc
    code/stage/trunk/worlds/simple.cfg
    code/stage/trunk/worlds/simple.world

Modified: code/stage/trunk/libstage/model_load.cc
===================================================================
--- code/stage/trunk/libstage/model_load.cc     2008-07-08 23:41:30 UTC (rev 
6825)
+++ code/stage/trunk/libstage/model_load.cc     2008-07-09 01:00:59 UTC (rev 
6826)
@@ -9,12 +9,15 @@
 
 #include "stage_internal.hh"
 
+#define DEBUG 1
+
 void StgModel::Load()
 {  
   assert( wf );
   assert( wf_entity );
 
   PRINT_DEBUG1( "Model \"%s\" loading...", token );
+  
 
   if( wf->PropertyExists( wf_entity, "debug" ) )
     {
@@ -27,16 +30,13 @@
     {
       char *name = (char*)wf->ReadString(wf_entity, "name", NULL );
       if( name )
-       {
-         //printf( "changed %s to %s\n", this->token, token );
-         this->token = strdup( name );
-         world->AddModel( this ); // add this name to the world's table
-       }
+                 {
+                        printf( "adding name %s to %s\n", name, this->token );
+                        this->token = strdup( name );
+                        world->AddModel( this ); // add this name to the 
world's table
+                 }
       else
-       PRINT_ERR1( "Name blank for model %s. Check your worldfile\n", 
this->token );
-
-      // add this name to the table
-
+                 PRINT_ERR1( "Name blank for model %s. Check your 
worldfile\n", this->token );
     }
 
   //PRINT_WARN1( "%s::Load", token );

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2008-07-08 23:41:30 UTC (rev 6825)
+++ code/stage/trunk/libstage/stage.hh  2008-07-09 01:00:59 UTC (rev 6826)
@@ -1653,10 +1653,12 @@
         and has the type indicated by the string */
        StgModel* GetUnsubscribedModelOfType( stg_model_type_t type );
        
-       // iff true, model may output some debugging visualizations and other 
info
+  // Iff true, model may output some debugging visualizations and other info
        //bool debug;
        
-       bool stalled(){ return this->stall; }
+  /** Returns the value of the model's stall boolean, which is true
+               iff the model has crashed into another model */
+       bool Stalled(){ return this->stall; }
 };
 
 // BLOCKS

Modified: code/stage/trunk/libstageplugin/p_position.cc
===================================================================
--- code/stage/trunk/libstageplugin/p_position.cc       2008-07-08 23:41:30 UTC 
(rev 6825)
+++ code/stage/trunk/libstageplugin/p_position.cc       2008-07-09 01:00:59 UTC 
(rev 6826)
@@ -293,7 +293,7 @@
   ppd.vel.pa = v.a;
   
   // etc
-  ppd.stall = this->mod->Stall();
+  ppd.stall = this->mod->Stalled();
   
   // publish this data
   this->driver->Publish( this->addr,

Modified: code/stage/trunk/worlds/simple.cfg
===================================================================
--- code/stage/trunk/worlds/simple.cfg  2008-07-08 23:41:30 UTC (rev 6825)
+++ code/stage/trunk/worlds/simple.cfg  2008-07-09 01:00:59 UTC (rev 6826)
@@ -10,7 +10,7 @@
 driver
 (              
   name "stage"
-  provides ["simulation:0" ]
+  provides [ "simulation:0" ]
   plugin "libstageplugin"
 
   # load the named file into the simulator
@@ -22,18 +22,7 @@
 driver
 ( 
   name "stage"
-  provides ["position2d:0" "laser:0" "sonar:0"]
+  provides [ "position2d:0" "sonar:0" ]
   model "r0" 
 )
 
-
-# Demonstrates use of a Player "abstract driver": one that doesn't
-# interface directly with hardware, but only with other Player devices.
-# The VFH driver attempts to drive to commanded positions without 
-# bumping into obstacles.
-driver 
-(
-  name "vfh"
-  provides ["position2d:1"]
-  requires ["position2d:0" "laser:0" ]
-)

Modified: code/stage/trunk/worlds/simple.world
===================================================================
--- code/stage/trunk/worlds/simple.world        2008-07-08 23:41:30 UTC (rev 
6825)
+++ code/stage/trunk/worlds/simple.world        2008-07-09 01:00:59 UTC (rev 
6826)
@@ -1,16 +1,11 @@
 # simple.world - basic world file example
 # Authors: Richard Vaughan
-# $id$
+# $Id$
 
-# defines Pioneer-like robots
-include "pioneer.inc"
+include "pioneer.inc"     # defines Pioneer-like robots
+include "map.inc"         # defines 'floorplan' object used for obstacle maps
+include "sick.inc"        # defines sick laser
 
-# defines 'map' object used for floorplans
-include "map.inc"
-
-# defines sick laser
-include "sick.inc"
-
 interval_sim 100  # simulation timestep in milliseconds
 interval_real 20  # real-time interval between simulation updates in 
milliseconds 
 
@@ -34,26 +29,13 @@
 
 pioneer2dx
 (                
-  pose [ -6.5 -6.5 0 45 ] 
-  sicklaser( pose [0.04 0 0 0]
-
-#     model( size [0.1 0.1 0.1 ] color "red"
-#        model ( size [0.1 0.1 0.1 ] color "green"
-#              model (size [0.1 0.1 0.1 ] color "blue" pose [0 0 0.03 0 ]
-#                model (size [0.1 0.1 0.1 ] color "magenta"
-#             ) 
-#                   )
-#        )
-#     )
-  )
-
- #pose [ 0.04 0 0 0 ] ) 
-
   # can refer to the robot by this name
   name "r0"
 
-  # remove this if you're using Player to control the robot    
-  ctrl "wander" 
+  pose [ -6.5 -6.5 0 45 ] 
+  sicklaser( pose [0.04 0 0 0] )
 
+  # remove this if you're using Player to control the robot    
+  # ctrl "wander" 
 )
 


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

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to