Revision: 7290
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7290&view=rev
Author:   rtv
Date:     2009-01-23 21:49:08 +0000 (Fri, 23 Jan 2009)

Log Message:
-----------
bugfixes

Modified Paths:
--------------
    code/stage/trunk/INSTALL.txt
    code/stage/trunk/RELEASE.txt
    code/stage/trunk/docsrc/Makefile
    code/stage/trunk/docsrc/header.html
    code/stage/trunk/docsrc/stage.dox
    code/stage/trunk/examples/ctrl/fasr.cc
    code/stage/trunk/libstage/model.cc
    code/stage/trunk/worlds/fasr.world

Modified: code/stage/trunk/INSTALL.txt
===================================================================
--- code/stage/trunk/INSTALL.txt        2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/INSTALL.txt        2009-01-23 21:49:08 UTC (rev 7290)
@@ -1,10 +1,11 @@
 
 Build system
 ------------
-Stage is now built using the CMake build system (version 2.4.7 or newer). 
-This has two main advantages: (i) it is much faster; (ii) CMake can 
-create native build files for Windows and Mac OS X, which will help 
-Stage become more portable.
+Stage is now built using the CMake build system (version 2.4.7 or
+newer).  This has two main advantages over the old GNU
+autoconf/automake system: (i) it is much faster; (ii) CMake can create
+native build files for Windows and Mac OS X, which will help Stage
+become more portable.
 
 Dependencies
 ------------

Modified: code/stage/trunk/RELEASE.txt
===================================================================
--- code/stage/trunk/RELEASE.txt        2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/RELEASE.txt        2009-01-23 21:49:08 UTC (rev 7290)
@@ -1,3 +1,10 @@
+Version 3.1.0
+-------------
+
+XX TODO
+
+Richard Vaughan (rtv) vaug...@sfu.ca - 2009.X.X 
+
 Version 3.0.1
 -------------
 This version incorporates a number of fixes made since the previous 

Modified: code/stage/trunk/docsrc/Makefile
===================================================================
--- code/stage/trunk/docsrc/Makefile    2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/docsrc/Makefile    2009-01-23 21:49:08 UTC (rev 7290)
@@ -4,7 +4,6 @@
 EXTRA_DIST = \
 README \
 stage.txt \
-sourced.txt \
 header.html \
 stage.dox \
 stage_button.png 

Modified: code/stage/trunk/docsrc/header.html
===================================================================
--- code/stage/trunk/docsrc/header.html 2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/docsrc/header.html 2009-01-23 21:49:08 UTC (rev 7290)
@@ -147,7 +147,7 @@
 
 <div class=box>
 <div class="title">Developer</div>
-<a href="group__libstage.html">libstage</a>
+<a href="namespaces.html">libstage</a>
 </div>
 
 <div class=box_light>

Modified: code/stage/trunk/docsrc/stage.dox
===================================================================
--- code/stage/trunk/docsrc/stage.dox   2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/docsrc/stage.dox   2009-01-23 21:49:08 UTC (rev 7290)
@@ -23,7 +23,7 @@
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 3.0.1
+PROJECT_NUMBER         = 3.1.0
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 

Modified: code/stage/trunk/examples/ctrl/fasr.cc
===================================================================
--- code/stage/trunk/examples/ctrl/fasr.cc      2009-01-23 19:44:12 UTC (rev 
7289)
+++ code/stage/trunk/examples/ctrl/fasr.cc      2009-01-23 21:49:08 UTC (rev 
7290)
@@ -33,6 +33,7 @@
   ModelLaser* laser;
   ModelRanger* ranger;
   ModelBlobfinder* blobfinder;
+  ModelFiducial* fiducial;
   Model *source, *sink;
   int avoidcount, randcount;
   int work_get, work_put;
@@ -52,15 +53,18 @@
   
   robot->pos = (ModelPosition*)mod;
 
-  robot->laser = (ModelLaser*)mod->GetModel( "laser:0" );
+  robot->laser = (ModelLaser*)mod->GetUnusedModelOfType( MODEL_TYPE_LASER );
   assert( robot->laser );
   robot->laser->Subscribe();
 
-  robot->ranger = (ModelRanger*)mod->GetModel( "ranger:0" );
+  robot->fiducial = (ModelFiducial*)mod->GetUnusedModelOfType( 
MODEL_TYPE_FIDUCIAL );
+  assert( robot->fiducial );
+  robot->fiducial->Subscribe();
+
+  robot->ranger = (ModelRanger*)mod->GetUnusedModelOfType( MODEL_TYPE_RANGER );
   assert( robot->ranger );
   //robot->ranger->Subscribe();
 
-
   robot->avoidcount = 0;
   robot->randcount = 0;
   
@@ -73,21 +77,6 @@
   robot->sink = mod->GetWorld()->GetModel( "sink" );
   assert(robot->sink);
     
-  
-//   const int waypoint_count = 100;
-//   Waypoint* waypoints = new Waypoint[waypoint_count];
-  
-//   for( int i=0; i<waypoint_count; i++ )
-//      {
-//             waypoints[i].pose.x = i* 0.1;
-//             waypoints[i].pose.y = drand48() * 4.0;
-//             waypoints[i].pose.z = 0;
-//             waypoints[i].pose.a = normalize( i/10.0 );
-//             waypoints[i].color = stg_color_pack( 0,0,1,0 );
-//      }
-  
-//   robot->pos->SetWaypoints( waypoints, waypoint_count );
-
   return 0; //ok
 }
 

Modified: code/stage/trunk/libstage/model.cc
===================================================================
--- code/stage/trunk/libstage/model.cc  2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/libstage/model.cc  2009-01-23 21:49:08 UTC (rev 7290)
@@ -489,39 +489,36 @@
 // returns true iff model [testmod] is a descendent of this model
 bool Model::IsDescendent( Model* testmod )
 {
+  if( this == testmod )
+        return true;
+  
   for( GList* it=this->children; it; it=it->next )
     {
-      Model* child = (Model*)it->data;
-
-      if( child == testmod )
-       return true;
-               
+      Model* child = (Model*)it->data;         
       if( child->IsDescendent( testmod ) )
-       return true;
+                 return true;
     }
-
+  
   // neither mod nor a child of this matches testmod
   return false;
 }
 
-// returns true iff model [mod1] and [mod2] are in the same model tree
-bool Model::IsRelated( Model* mod2 )
+bool Model::IsRelated( Model* that )
 {
-  return( (this == mod2) || IsAntecedent( mod2 ) || IsDescendent( mod2 ) );
+  // is it me?
+  if( this == that )
+        return true;
+  
+  // wind up to top-level object
+  Model* candidate = this;
+  while( candidate->parent )
+        candidate = candidate->parent;
+  
+  // and recurse down the tree    
+  return candidate->IsDescendent( that );
 }
 
 
-// bool Model::IsRelated( Model* that )
-// {
-//   if( this == that )
-//      return true;
-
-//   for( GList* it = children; it; it=it->next )
-//      {
-//             if( 
-//      }
-
-
 // get the model's velocity in the global frame
 Velocity Model::GetGlobalVelocity()
 {

Modified: code/stage/trunk/worlds/fasr.world
===================================================================
--- code/stage/trunk/worlds/fasr.world  2009-01-23 19:44:12 UTC (rev 7289)
+++ code/stage/trunk/worlds/fasr.world  2009-01-23 21:49:08 UTC (rev 7290)
@@ -75,9 +75,11 @@
 
 define autorob pioneer2dx                
 (               
- sicklaser( samples 32 range_max 5 laser_return 2 watts 30 )
+ sicklaser( samples 32 range_max 5 laser_return 2 watts 30  )
+ fiducial( ) 
  ctrl "fasr"
  joules 1000000 
+ fiducial_return 1
 )
 
 autorob( pose [4.116 6.107 0  -147.323] )


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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to