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

Modified Files:
      Tag: opengl
        Makefile Makefile.am model_fiducial.cc model_laser.cc stage.hh 
        stest.cc world.cc 
Log Message:
fixed plugin

Index: stest.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/stest.cc,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -C2 -d -r1.1.2.23 -r1.1.2.24
*** stest.cc    7 Jan 2008 05:33:17 -0000       1.1.2.23
--- stest.cc    8 Jan 2008 00:30:12 -0000       1.1.2.24
***************
*** 149,155 ****
       stg_blobfinder_blob_t* blobs = robots[i].blobfinder->GetBlobs( &bcount 
);    
  
!        printf( "robot %s sees %u blobs\n", robots[i].blobfinder->Token(), 
bcount );          
  
!        //robots[i].position->SetSpeed( forward_speed, side_speed, turn_speed 
);
      }
    
--- 149,155 ----
       stg_blobfinder_blob_t* blobs = robots[i].blobfinder->GetBlobs( &bcount 
);    
  
!      //printf( "robot %s sees %u blobs\n", robots[i].blobfinder->Token(), 
bcount );          
  
!        robots[i].position->SetSpeed( forward_speed, side_speed, turn_speed );
      }
    

Index: model_laser.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/model_laser.cc,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.18
diff -C2 -d -r1.1.2.17 -r1.1.2.18
*** model_laser.cc      7 Jan 2008 05:33:17 -0000       1.1.2.17
--- model_laser.cc      8 Jan 2008 00:30:12 -0000       1.1.2.18
***************
*** 150,159 ****
  bool laser_raytrace_match( StgBlock* testblock, 
                           StgModel* finder,
!                          const void* dummy )
! { 
    // Ignore the model that's looking and things that are invisible to
    // lasers
  
    if( (testblock->Model() != finder) &&
        (testblock->Model()->LaserReturn() > 0 ) )
      return true; // match!
--- 150,162 ----
  bool laser_raytrace_match( StgBlock* testblock, 
                           StgModel* finder,
!                          const void* zp )
! {
    // Ignore the model that's looking and things that are invisible to
    // lasers
  
+   double z = *(stg_meters_t*)zp;
+ 
    if( (testblock->Model() != finder) &&
+       testblock->IntersectGlobalZ( z ) &&
        (testblock->Model()->LaserReturn() > 0 ) )
      return true; // match!
***************
*** 174,177 ****
--- 177,185 ----
    double bearing = -fov/2.0;
    double sample_incr = fov / (double)(sample_count-1);  
+   
+   stg_pose_t gpose;
+   GetGlobalPose( &gpose );
+ 
+   stg_meters_t zscan = gpose.z + geom.size.z /2.0;
  
    for( unsigned int t=0; t<sample_count; t += resolution )
***************
*** 181,185 ****
                range_max,
                laser_raytrace_match,
!               NULL,
                &sample );
        
--- 189,193 ----
                range_max,
                laser_raytrace_match,
!               &zscan, // height of scan line
                &sample );
        

Index: Makefile
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/Makefile,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -C2 -d -r1.1.2.11 -r1.1.2.12
*** Makefile    29 Dec 2007 05:07:40 -0000      1.1.2.11
--- Makefile    8 Jan 2008 00:30:12 -0000       1.1.2.12
***************
*** 68,73 ****
        glcolorstack.lo model.lo model_callbacks.lo model_fiducial.lo \
        model_laser.lo model_load.lo model_position.lo model_ranger.lo \
!       model_props.lo stage.lo typetable.lo world.lo worldfile.lo \
!       worldgui.lo
  libstage_la_OBJECTS = $(am_libstage_la_OBJECTS)
  libstage_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
--- 68,73 ----
        glcolorstack.lo model.lo model_callbacks.lo model_fiducial.lo \
        model_laser.lo model_load.lo model_position.lo model_ranger.lo \
!       model_blobfinder.lo model_props.lo stage.lo typetable.lo \
!       world.lo worldfile.lo worldgui.lo
  libstage_la_OBJECTS = $(am_libstage_la_OBJECTS)
  libstage_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
***************
*** 139,143 ****
  GREP = /usr/bin/grep
  HAVE_FLTK_CONFIG = fltk-config
! INSTALL = /usr/bin/install -c
  INSTALL_DATA = ${INSTALL} -m 644
  INSTALL_PROGRAM = ${INSTALL}
--- 139,143 ----
  GREP = /usr/bin/grep
  HAVE_FLTK_CONFIG = fltk-config
! INSTALL = /opt/local/bin/ginstall -c
  INSTALL_DATA = ${INSTALL} -m 644
  INSTALL_PROGRAM = ${INSTALL}
***************
*** 152,156 ****
  LTLIBOBJS = 
  MAKEINFO = ${SHELL} /Users/vaughan/PS/HEAD/stage.opengl/missing --run makeinfo
! MKDIR_P = .././install-sh -c -d
  OBJEXT = o
  PACKAGE = stage
--- 152,156 ----
  LTLIBOBJS = 
  MAKEINFO = ${SHELL} /Users/vaughan/PS/HEAD/stage.opengl/missing --run makeinfo
! MKDIR_P = /opt/local/bin/gmkdir -p
  OBJEXT = o
  PACKAGE = stage
***************
*** 210,214 ****
  localstatedir = ${prefix}/var
  mandir = ${datarootdir}/man
! mkdir_p = $(top_builddir)/./install-sh -c -d
  oldincludedir = /usr/include
  pdfdir = ${docdir}
--- 210,214 ----
  localstatedir = ${prefix}/var
  mandir = ${datarootdir}/man
! mkdir_p = /opt/local/bin/gmkdir -p
  oldincludedir = /usr/include
  pdfdir = ${docdir}
***************
*** 257,260 ****
--- 257,261 ----
        model_position.cc \
        model_ranger.cc \
+       model_blobfinder.cc \
        model_props.cc \
        stage.cc \
***************
*** 379,382 ****
--- 380,384 ----
  include ./$(DEPDIR)/glcolorstack.Plo
  include ./$(DEPDIR)/model.Plo
+ include ./$(DEPDIR)/model_blobfinder.Plo
  include ./$(DEPDIR)/model_callbacks.Plo
  include ./$(DEPDIR)/model_fiducial.Plo

Index: world.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/world.cc,v
retrieving revision 1.1.2.21
retrieving revision 1.1.2.22
diff -C2 -d -r1.1.2.21 -r1.1.2.22
*** world.cc    7 Jan 2008 05:33:17 -0000       1.1.2.21
--- world.cc    8 Jan 2008 00:30:12 -0000       1.1.2.22
***************
*** 582,586 ****
              // matches the predicate and it's in the right z range
              if( //block && (block->Model() != finder) && 
!                 block->IntersectGlobalZ( pose.z ) &&
                  (*func)( block, mod, arg ) )
                {
--- 582,586 ----
              // matches the predicate and it's in the right z range
              if( //block && (block->Model() != finder) && 
!                 //block->IntersectGlobalZ( pose.z ) &&
                  (*func)( block, mod, arg ) )
                {

Index: Makefile.am
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/Makefile.am,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -C2 -d -r1.1.2.7 -r1.1.2.8
*** Makefile.am 24 Dec 2007 11:20:36 -0000      1.1.2.7
--- Makefile.am 8 Jan 2008 00:30:12 -0000       1.1.2.8
***************
*** 35,38 ****
--- 35,39 ----
        model_position.cc \
        model_ranger.cc \
+       model_blobfinder.cc \
        model_props.cc \
        stage.cc \

Index: model_fiducial.cc
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/model_fiducial.cc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** model_fiducial.cc   7 Jan 2008 05:33:17 -0000       1.1.2.4
--- model_fiducial.cc   8 Jan 2008 00:30:12 -0000       1.1.2.5
***************
*** 169,175 ****
    StgModel* hitmod = ray.block->Model();
  
!   printf( "ray hit %s and was seeking LOS to %s\n",
!     hitmod ? hitmod->Token() : "null",
!     him->Token() );
    
    // if it was him, we can see him
--- 169,175 ----
    StgModel* hitmod = ray.block->Model();
  
!   //  printf( "ray hit %s and was seeking LOS to %s\n",
!   //hitmod ? hitmod->Token() : "null",
!   //him->Token() );
    
    // if it was him, we can see him

Index: stage.hh
===================================================================
RCS file: /cvsroot/playerstage/code/stage/libstage/Attic/stage.hh,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -C2 -d -r1.1.2.23 -r1.1.2.24
*** stage.hh    7 Jan 2008 05:33:17 -0000       1.1.2.23
--- stage.hh    8 Jan 2008 00:30:12 -0000       1.1.2.24
***************
*** 859,862 ****
--- 859,863 ----
    friend class StgModel; // allow access to private members
    friend class StgBlock;
+   friend class StgTime;
  
  private:
***************
*** 1282,1285 ****
--- 1283,1288 ----
    void GetColor( stg_color_t* col )
    { if(color) memcpy( col, &this->color, sizeof(stg_color_t)); }
+ 
+   stg_color_t Color(){ return color; }
    
    void GetLaserReturn( int* val )
***************
*** 1292,1301 ****
--- 1295,1311 ----
        origin in local coords) */
    void GetGeom(  stg_geom_t* dest );
+   /** Get a model's geometry - it's size and local pose (offset from
+       origin in local coords) */
+   stg_geom_t Geom(){ return geom; };
  
    /** Get the pose of a model in its parent's coordinate system  */
    void GetPose(  stg_pose_t* dest );
+   /** Get the pose of a model in its parent's coordinate system  */
+   stg_pose_t Pose(){ return pose; }
  
    /** Get a model's velocity (in its local reference frame) */
    void GetVelocity(  stg_velocity_t* dest );
+   /** Get a model's velocity (in its local reference frame) */
+   stg_velocity_t Velocity(){ return velocity; }
  
    // guess what these do?
***************
*** 1452,1456 ****
    
    stg_color_t Color()
!   { return color; };
  
  private:
--- 1462,1466 ----
    
    stg_color_t Color()
!   { return( inherit_color ? mod->Color() : color ); }
  
  private:
***************
*** 1659,1668 ****
  typedef struct
  {
-   //int channel;
    stg_color_t color;
!   int xpos, ypos;   // all values are in pixels
!   //int width, height;
!   int left, top, right, bottom;
!   int area;
    stg_meters_t range;
  } stg_blobfinder_blob_t;
--- 1669,1674 ----
  typedef struct
  {
    stg_color_t color;
!   uint32_t left, top, right, bottom;
    stg_meters_t range;
  } stg_blobfinder_blob_t;
***************
*** 1685,1692 ****
    stg_meters_t range;
    stg_radians_t fov;
  
-   // TODO
-   // stg_radians_t pan;
-   
   // constructor
    StgModelBlobfinder( StgWorld* world,
--- 1691,1696 ----
    stg_meters_t range;
    stg_radians_t fov;
+   stg_radians_t pan;
  
   // constructor
    StgModelBlobfinder( StgWorld* world,


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to