Permalink
Browse files

bugfixes

  • Loading branch information...
1 parent ec56d04 commit 72c8156c3faf41432580ca784044a0a81bab575e rtv committed Jan 23, 2009
Showing with 42 additions and 47 deletions.
  1. +5 −4 INSTALL.txt
  2. +7 −0 RELEASE.txt
  3. +0 −1 docsrc/Makefile
  4. +1 −1 docsrc/header.html
  5. +1 −1 docsrc/stage.dox
  6. +7 −18 examples/ctrl/fasr.cc
  7. +18 −21 libstage/model.cc
  8. +3 −1 worlds/fasr.world
View
@@ -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
------------
View
@@ -1,3 +1,10 @@
+Version 3.1.0
+-------------
+
+XX TODO
+
+Richard Vaughan (rtv) vaughan@sfu.ca - 2009.X.X
+
Version 3.0.1
-------------
This version incorporates a number of fixes made since the previous
View
@@ -4,7 +4,6 @@
EXTRA_DIST = \
README \
stage.txt \
-sourced.txt \
header.html \
stage.dox \
stage_button.png
View
@@ -147,7 +147,7 @@ <h2 style="text-align:center;">
<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>
View
@@ -23,7 +23,7 @@ PROJECT_NAME = Stage
# 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.
View
@@ -33,6 +33,7 @@ typedef struct
ModelLaser* laser;
ModelRanger* ranger;
ModelBlobfinder* blobfinder;
+ ModelFiducial* fiducial;
Model *source, *sink;
int avoidcount, randcount;
int work_get, work_put;
@@ -52,15 +53,18 @@ extern "C" int Init( Model* mod )
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 @@ extern "C" int Init( Model* mod )
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
}
View
@@ -489,39 +489,36 @@ bool Model::IsAntecedent( Model* testmod )
// 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()
{
View
@@ -75,9 +75,11 @@ zone
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] )

0 comments on commit 72c8156

Please sign in to comment.