[Playerstage-commit] code/stage configure.ac,1.18.4.1,1.18.4.2

2008-03-28 Thread Toby Collett
Update of /cvsroot/playerstage/code/stage
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2628

Modified Files:
  Tag: release-2-1-patches
configure.ac 
Log Message:
updated version so cvs is distinguishable form released rc1

Index: configure.ac
===
RCS file: /cvsroot/playerstage/code/stage/configure.ac,v
retrieving revision 1.18.4.1
retrieving revision 1.18.4.2
diff -C2 -d -r1.18.4.1 -r1.18.4.2
*** configure.ac16 Mar 2008 02:14:40 -  1.18.4.1
--- configure.ac29 Mar 2008 00:52:53 -  1.18.4.2
***
*** 5,9 
  
  dnl AC_INIT( package, version )
! AC_INIT(stage,2.1.0rc1)
  
  AC_CONFIG_SRCDIR(src/stage.c)
--- 5,9 
  
  dnl AC_INIT( package, version )
! AC_INIT(stage,2.1.0rc2-cvs)
  
  AC_CONFIG_SRCDIR(src/stage.c)


-
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/stage/src model_gripper.c, 1.26, 1.26.8.1 p_simulation.cc, 1.23, 1.23.4.1

2008-03-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/stage/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9073/src

Modified Files:
  Tag: release-2-1-patches
model_gripper.c p_simulation.cc 
Log Message:
removed a couple of simulation debug printf's
Applied patches:
1912203   Grip location patch
1912201   add disable optmize configur option



Index: model_gripper.c
===
RCS file: /cvsroot/playerstage/code/stage/src/Attic/model_gripper.c,v
retrieving revision 1.26
retrieving revision 1.26.8.1
diff -C2 -d -r1.26 -r1.26.8.1
*** model_gripper.c 12 May 2006 22:09:50 -  1.26
--- model_gripper.c 16 Mar 2008 02:14:41 -  1.26.8.1
***
*** 438,443 
  
  int gripper_paddle_contact( stg_model_t* mod, 
!   stg_gripper_config_t* cfg,
!   double contacts[2] )
  { 
stg_geom_t geom;
--- 438,443 
  
  int gripper_paddle_contact( stg_model_t* mod, 
!   stg_gripper_config_t* cfg,
!   double contacts[2] )
  { 
stg_geom_t geom;
***
*** 456,464 
// y location of paddle beam origin
  
! lpz.y = (1.0 - cfg-paddle_position) * 
!   ((geom.size.y/2.0) - (geom.size.y*cfg-paddle_size.y));
  
! rpz.y = (1.0 - cfg-paddle_position) * 
!   -((geom.size.y/2.0) - (geom.size.y*cfg-paddle_size.y));

  /*   // if we're opening, we check the outside of the paddle instead */
--- 456,464 
// y location of paddle beam origin
  
!   lpz.y = (1.0 - cfg-paddle_position) * 
! ((geom.size.y/2.0) - (geom.size.y*cfg-paddle_size.y));
  
!   rpz.y = (1.0 - cfg-paddle_position) * 
! -((geom.size.y/2.0) - (geom.size.y*cfg-paddle_size.y));

  /*   // if we're opening, we check the outside of the paddle instead */
***
*** 485,496 
  
itl_t* litl = itl_create( lpz.x, lpz.y, lpz.a, 
!  bbr,
!  mod-world-matrix, 
!  PointToBearingRange );
  
itl_t* ritl = itl_create( rpz.x, rpz.y, rpz.a, 
!  bbr,
!  mod-world-matrix, 
!  PointToBearingRange );

stg_model_t* lhit = NULL;
--- 485,496 
  
itl_t* litl = itl_create( lpz.x, lpz.y, lpz.a, 
! bbr,
! mod-world-matrix, 
! PointToBearingRange );
  
itl_t* ritl = itl_create( rpz.x, rpz.y, rpz.a, 
! bbr,
! mod-world-matrix, 
! PointToBearingRange );

stg_model_t* lhit = NULL;
***
*** 507,558 
// if the breakbeam strikes anything
if( (lhit = itl_first_matching( litl, gripper_raytrace_match, mod )) )
! {
!   contacts[0] = 1; // touching something
!   
!   //if( cfg-paddles == STG_GRIPPER_PADDLE_CLOSING || 
!   //  cfg-paddles == STG_GRIPPER_PADDLE_OPENING )
!   //cfg-paddles_stalled = TRUE;

!   //puts( left hit );
! }
  

if( (rhit = itl_first_matching( ritl, gripper_raytrace_match, mod )))
! {
!   contacts[1] = 1;  
!   //puts( right hit );
! }

if( lhit  (lhit == rhit) )
  {
!   //puts( left and right hit same thing );

!   if(  cfg-paddles == STG_GRIPPER_PADDLE_CLOSING )
!   {
! // grab the model we hit - very simple grip model for now
! stg_model_set_parent( lhit, mod );
! 
! // and move it to be right between the paddles
! stg_geom_t hitgeom;
! stg_model_get_geom( lhit, hitgeom );
! 
! stg_pose_t pose;
! pose.x = hitgeom.size.x/2.0;
! pose.y = 0;
! pose.a = 0;
! 
! stg_model_set_pose( lhit, pose );  
! 
! // add this item to the stack
! cfg-grip_stack = g_slist_prepend( cfg-grip_stack, lhit );
! 
! // calculate how far closed we can get the paddles now
! double puckw = hitgeom.size.y;
! double gripperw = geom.size.y;  
! 
! cfg-close_limit = 
!   MAX( 0.0, 1.0 - puckw/(gripperw - cfg-paddle_size.y/2.0 )); 
!   }
  }
  
itl_destroy( litl );
--- 507,557 
// if the breakbeam strikes anything
if( (lhit = itl_first_matching( litl, gripper_raytrace_match, mod )) )
!   {
! contacts[0] = 1; // touching something
! 
! //if( cfg-paddles == STG_GRIPPER_PADDLE_CLOSING || 
! //  cfg-paddles == STG_GRIPPER_PADDLE_OPENING )
!   //cfg-paddles_stalled = TRUE;

! //puts( left hit );
!   }
  

if( (rhit = itl_first_matching( ritl, gripper_raytrace_match, mod )))
!   {
! contacts[1] = 1;  
! //puts( right hit );
!   }

if( lhit  (lhit == rhit) )
+   {
+ //puts( left and right hit same thing );
+ 
+ if(  cfg-paddles == STG_GRIPPER_PADDLE_CLOSING )
  {
!   // get the global pose of the gripper for calculations of the gripped 
object position
! // 

[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python Makefile.am, 1.21, 1.22 playerc_swig_parse.py, 1.1, 1.2

2008-03-05 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1744

Modified Files:
Makefile.am playerc_swig_parse.py 
Log Message:
added property supprt for swigged devices


Index: playerc_swig_parse.py
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc_swig_parse.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** playerc_swig_parse.py   12 Feb 2008 01:12:39 -  1.1
--- playerc_swig_parse.py   6 Mar 2008 05:21:03 -   1.2
***
*** 253,262 
  
  guff = ''
  for prefix in prefixes:
  guff += '%%header\n %%{\ntypedef %s_t %s;\n' % (prefix, prefix)
  guff += '#define new_%s %s_create\n' % (prefix, prefix)
! guff += '#define del_%s %s_destroy\n%%}\n' % (prefix, prefix)
  
! outstream = guff + outstream
  
  file = open(outfilename, 'w+')
--- 253,310 
  
  guff = ''
+ propguff = ''
  for prefix in prefixes:
  guff += '%%header\n %%{\ntypedef %s_t %s;\n' % (prefix, prefix)
  guff += '#define new_%s %s_create\n' % (prefix, prefix)
! guff += '#define del_%s %s_destroy\n' % (prefix, prefix)
! guff += '%}\n'
! 
! # stuff for properties 
! if prefix != playerc_mclient and prefix != playerc_client:
! propguff += 
! %%extend %(prefix)s
! {
! int get_intprop (char * propname)
! {
! int ret;
! if (playerc_device_get_intprop(self-info,propname,ret) == 0)
! return ret;
! else
! return 0;
! };
! int set_intprop (char * propname, int value)
! {
! return playerc_device_set_intprop(self-info,propname,value);
! };
  
! double get_dblprop (char * propname)
! {
! double ret;
! if (playerc_device_get_dblprop(self-info,propname,ret) == 0)
! return ret;
! else
! return 0;
! };
! int set_dblprop (char * propname, double value)
! {
! return playerc_device_set_dblprop(self-info,propname,value);
! };
! 
! char * get_strprop (char * propname)
! {
! char * ret;
! if (playerc_device_get_strprop(self-info,propname,ret) == )
! return ret;
! else
! return NULL;
! };
! int set_strprop (char * propname, char * value)
! {
! return playerc_device_set_strprop(self-info,propname,value);
! };
! }  % {prefix: prefix}
! 
! 
! outstream = guff + outstream + propguff
  
  file = open(outfilename, 'w+')

Index: Makefile.am
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Makefile.am 12 Feb 2008 01:12:39 -  1.21
--- Makefile.am 6 Mar 2008 05:21:03 -   1.22
***
*** 18,22 
  # enable VPAPTH (distcheck) builds; the header files needed by swig
  # are copied into the build tree.
! playerc_oo.i: ../../playerc.h $(top_srcdir)/libplayercore/player.h
if test ! -s ../../playerc.h; then cp $(srcdir)/../../playerc.h ../../; 
fi
if test ! -s $(top_builddir)/libplayercore/player.h; then cp 
$(top_srcdir)/libplayercore/player.h $(top_builddir)/libplayercore/; fi
--- 18,22 
  # enable VPAPTH (distcheck) builds; the header files needed by swig
  # are copied into the build tree.
! playerc_oo.i: ../../playerc.h $(top_srcdir)/libplayercore/player.h 
$(srcdir)/playerc_swig_parse.py
if test ! -s ../../playerc.h; then cp $(srcdir)/../../playerc.h ../../; 
fi
if test ! -s $(top_builddir)/libplayercore/player.h; then cp 
$(top_srcdir)/libplayercore/player.h $(top_builddir)/libplayercore/; fi


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerprop playerprop.cpp, 1.3, 1.4

2008-02-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerprop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29342/utils/playerprop

Modified Files:
playerprop.cpp 
Log Message:
added opaque interface

Index: playerprop.cpp
===
RCS file: /cvsroot/playerstage/code/player/utils/playerprop/playerprop.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** playerprop.cpp  14 Dec 2007 00:19:55 -  1.3
--- playerprop.cpp  28 Feb 2008 03:30:01 -  1.4
***
*** 146,149 
--- 146,152 
deviceProxy = (ClientProxy*) new MapProxy (client, devIndex);
break;
+   case PLAYER_OPAQUE_CODE:
+   deviceProxy = (OpaqueProxy*) new OpaqueProxy (client, 
devIndex);
+   break;
case PLAYER_PLANNER_CODE:
deviceProxy = (ClientProxy*) new PlannerProxy (client, 
devIndex);


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore property.cpp, 1.4, 1.5

2008-02-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4217/libplayercore

Modified Files:
property.cpp 
Log Message:
fixed unitialised readonly in properties
changd readonly to only be read only from messages


Index: property.cpp
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/property.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** property.cpp11 Aug 2007 00:21:28 -  1.4
--- property.cpp28 Feb 2008 05:21:27 -  1.5
***
*** 48,56 
  
  Property::Property (void)
!   : key (NULL)
  {
  }
  
  Property::Property (const char *newKey, bool readOnly)
  {
if ((key = strdup (newKey)) == NULL)
--- 48,57 
  
  Property::Property (void)
!   : key (NULL), readonly(false)
  {
  }
  
  Property::Property (const char *newKey, bool readOnly)
+   : readonly(readOnly)
  {
if ((key = strdup (newKey)) == NULL)
***
*** 97,106 
  void IntProperty::SetValue (int newValue)
  {
!   if (readonly)
!   {
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, newValue);
!   return;
!   }
! 
value = newValue;
  }
--- 98,107 
  void IntProperty::SetValue (int newValue)
  {
! //if (readonly)
! //{
! //PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, newValue);
! //return;
! //}
! //
value = newValue;
  }
***
*** 115,119 
if (readonly)
{
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, reinterpret_castconst player_intprop_req_t* (data)-value);
return;
}
--- 116,120 
if (readonly)
{
!   PLAYER_WARN2 (Property %s is read only, cannot change value 
%d, key, reinterpret_castconst player_intprop_req_t* (data)-value);
return;
}
***
*** 132,140 
  const IntProperty IntProperty::operator= (const IntProperty rhs)
  {
!   if (readonly)
!   {
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, rhs.GetValue ());
!   return *this;
!   }
  
value = rhs.GetValue ();
--- 133,141 
  const IntProperty IntProperty::operator= (const IntProperty rhs)
  {
! //if (readonly)
! //{
! //PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, rhs.GetValue ());
! //return *this;
! //}
  
value = rhs.GetValue ();
***
*** 144,153 
  int IntProperty::operator= (int rhs)
  {
!   if (readonly)
!   {
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, rhs);
!   return value;
!   }
! 
value = rhs;
return value;
--- 145,154 
  int IntProperty::operator= (int rhs)
  {
! //if (readonly)
! //{
! //PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%d, key, rhs);
! //return value;
! //}
! //
value = rhs;
return value;
***
*** 164,173 
  void DoubleProperty::SetValue (double newValue)
  {
!   if (readonly)
!   {
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%f, key, newValue);
!   return;
!   }
! 
value = newValue;
  }
--- 165,174 
  void DoubleProperty::SetValue (double newValue)
  {
! //if (readonly)
! //{
! //PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%f, key, newValue);
! //return;
! //}
! //
value = newValue;
  }
***
*** 182,186 
if (readonly)
{
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%f, key, reinterpret_castconst player_dblprop_req_t* (data)-value);
return;
}
--- 183,187 
if (readonly)
{
!   PLAYER_WARN2 (Property %s is read only, cannot change value 
%f, key, reinterpret_castconst player_dblprop_req_t* (data)-value);
return;
}
***
*** 199,207 
  const DoubleProperty DoubleProperty::operator= (const DoubleProperty rhs)
  {
!   if (readonly)
!   {
!   PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%f, key, rhs.GetValue ());
!   return *this;
!   }
  
value = rhs.GetValue ();
--- 200,208 
  const DoubleProperty DoubleProperty::operator= (const DoubleProperty rhs)
  {
! //if (readonly)
! //{
! //PLAYER_WARN2 (Property %s is read only, cannot change value 50 
%f, key, rhs.GetValue ());
! //return *this;
! //}
  
value = rhs.GetValue ();
***
*** 211,219 
  double 

[Playerstage-commit] code/player/server/drivers/position/nav200 sicknav200.cc, 1.15, 1.16

2008-02-25 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/position/nav200
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22520/server/drivers/position/nav200

Modified Files:
sicknav200.cc 
Log Message:
clean up debug output and some velocity output fixes

Index: sicknav200.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nav200/sicknav200.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** sicknav200.cc   19 Feb 2008 19:06:28 -  1.15
--- sicknav200.cc   25 Feb 2008 19:59:19 -  1.16
***
*** 178,181 
--- 178,182 
  double speed;
  double steeringAngle;
+ double navAngle;
  
  DoubleProperty wheelBase;
***
*** 213,220 
  // Vector map interface
  player_devaddr_t vectormap_addr;
- // Position interface
- player_devaddr_t debug_addr;
- player_position2d_data_t debug_packet;
- struct timeval previous;
  };
  
--- 214,217 
***
*** 273,291 
return;
}
-   
-   // Create debug interface
-   if (cf-ReadDeviceAddr((this-debug_addr), section, 
-provides, PLAYER_POSITION2D_CODE, 2, NULL) != 0)
-   {
-   PLAYER_ERROR(Could not read debug interface device address.);
-   this-SetError(-1);
-   return;
-   }  
-   if (this-AddInterface(this-debug_addr))
-   {
-   PLAYER_ERROR(Could not add debug interface.);
-   this-SetError(-1);
-   return;
-   }
  
// Laser geometry.
--- 270,273 
***
*** 303,306 
--- 285,289 
this-steeringAngle = 0;
this-fetchOnStart = false;
+   this-navAngle = 0;

// Serial port - done in the opaque driver
***
*** 337,342 
  PLAYER_VECTORMAP_CODE, -1, NULL);

-   gettimeofday(previous, NULL);
-   
return;
  }
--- 320,323 
***
*** 667,670 
--- 648,654 
  ProcessMessages();
  
+ double vehicleVelX = 0;
+ double vehicleVelY = 0;
+ double angularVelocity = 0;
  bool gotReading;
  if (velocity)
***
*** 677,694 
else
{
!   // Convert vehicle movement data into NAV200 format and 
coordinates.
!   //double arcRadius = wheelBase / tan(steeringAngle);
//double angularVelocity = speed / arcRadius;
!   double angularVelocity = speed * tan(steeringAngle) / 
wheelBase.GetValue();
!   double velX = speed - pose[1] * angularVelocity;
double velY = pose[0] * angularVelocity;
double navVelX = velX * cos(pose[2]) + velY * sin(pose[2]);
double navVelY = velY * cos(pose[2]) - velX * sin(pose[2]);
!   debug_packet.vel.pa = angularVelocity;
!   debug_packet.vel.px = navVelX;
!   debug_packet.vel.py = navVelY;
!   debug_packet.stall = 0;
!   this-Publish(this-debug_addr, PLAYER_MSGTYPE_DATA, 
PLAYER_POSITION2D_DATA_STATE, (void*)debug_packet, sizeof(debug_packet), NULL);
!   gotReading = Laser.GetPositionSpeedVelocity(short(navVelX * 
1000), short(navVelY * 1000), short(angularVelocity * 32768.0 / M_PI), Reading);
}
  }
--- 661,682 
else
{
!   // Calculate the vehicles velocity
!   double angle = navAngle - pose[2];
!   vehicleVelX = speed * cos(angle); // Vehicle velocity in world 
coordinates.
!   vehicleVelY = speed * sin(angle);
!   //double arcRadius = wheelBase / tan(steeringAngle);
//double angularVelocity = speed / arcRadius;
!   angularVelocity = speed * tan(steeringAngle) / 
wheelBase.GetValue(); // Angular velocity of NAV and vehicle.
!   
!   // Convert vehicle movement data into NAV200 coordinates.
!   double velX = speed - pose[1] * angularVelocity; // NAV vel in 
vehicle coordinates.
double velY = pose[0] * angularVelocity;
double navVelX = velX * cos(pose[2]) + velY * sin(pose[2]);
double navVelY = velY * cos(pose[2]) - velX * sin(pose[2]);
!   //gotReading = Laser.GetPositionSpeedVelocity(short(navVelX * 
1000), short(navVelY * 1000), short(angularVelocity * 32768.0 / M_PI), Reading);
!   // Convert NAV200 velocity into world coordinates.
!   double worldVelX = navVelX * cos(navAngle) - navVelY * 
sin(navAngle);
!   double worldVelY = navVelX * sin(navAngle) + navVelY * 
cos(navAngle);
!   gotReading = 
Laser.GetPositionSpeedVelocityAbsolute(short(worldVelX * 1000), short(worldVelY 
* 1000), short(angularVelocity * 32768.0 / M_PI), Reading);
}
  }
***
*** 700,704 
  {
// Use NAV200 position and orientation data to determine vehicle 
position and 

[Playerstage-commit] code/player/client_libs/libplayerc playerc.h, 1.256, 1.257 dev_aio.c, 1.4, 1.5

2008-02-25 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2115/client_libs/libplayerc

Modified Files:
playerc.h dev_aio.c 
Log Message:
libplayerc additions to aid python aio interface

Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.256
retrieving revision 1.257
diff -C2 -d -r1.256 -r1.257
*** playerc.h   25 Feb 2008 02:04:59 -  1.256
--- playerc.h   26 Feb 2008 00:52:08 -  1.257
***
*** 928,931 
--- 928,934 
  int playerc_aio_set_output(playerc_aio_t *device, uint8_t id, float volt);
  
+ /** get the aio data */
+ float playerc_aio_get_data(playerc_aio_t *device, uint32_t index);
+ 
  /** @} */
  /***/

Index: dev_aio.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/dev_aio.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dev_aio.c   1 Nov 2007 22:16:16 -   1.4
--- dev_aio.c   26 Feb 2008 00:52:08 -  1.5
***
*** 123,124 
--- 123,131 
NULL);
  }
+ 
+ /** Accessor method for the aio data */
+ float playerc_aio_get_data(playerc_aio_t *device, uint32_t index)
+ {
+   assert(index  device-voltages_count);
+   return device-voltages[index];
+ }


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/shell passthrough.cc, 1.22, 1.23

2008-02-24 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/shell
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16797/server/drivers/shell

Modified Files:
passthrough.cc 
Log Message:
applied
[ 1898627 ] CVS: passthrough fails passing any request


Index: passthrough.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/passthrough.cc,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** passthrough.cc  11 Dec 2007 01:58:01 -  1.22
--- passthrough.cc  25 Feb 2008 00:09:25 -  1.23
***
*** 269,274 
this-Publish(resp_queue, 
  newhdr,
! msg-GetPayload(),
! false);
delete msg;
inspected=true;
--- 269,273 
this-Publish(resp_queue, 
  newhdr,
! msg-GetPayload());
delete msg;
inspected=true;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc playerc.h, 1.255, 1.256 dev_actarray.c, 1.14, 1.15

2008-02-24 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25240/client_libs/libplayerc

Modified Files:
playerc.h dev_actarray.c 
Log Message:
fixes for swig actarray support


Index: dev_actarray.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_actarray.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** dev_actarray.c  9 Jan 2008 11:45:36 -   1.14
--- dev_actarray.c  25 Feb 2008 02:04:59 -  1.15
***
*** 40,43 
--- 40,44 
  #include string.h
  #include stdlib.h
+ #include assert.h
  
  #include playerc.h
***
*** 104,107 
--- 105,122 
  }
  
+ /** Accessor method for the actuator data */
+ player_actarray_actuator_t 
playerc_actarray_get_actuator_data(playerc_actarray_t *device, int index)
+ {
+   assert(index  device-actuators_count);
+   return device-actuators_data[index];
+ }
+ 
+ /** Accessor method for the actuator geom */
+ player_actarray_actuatorgeom_t 
playerc_actarray_get_actuator_geom(playerc_actarray_t *device, int index)
+ {
+   assert(index  device-actuators_geom_count);
+   return device-actuators_geom[index];
+ }
+ 
  // Get the actarray geometry
  int playerc_actarray_get_geom(playerc_actarray_t *device)

Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.255
retrieving revision 1.256
diff -C2 -d -r1.255 -r1.256
*** playerc.h   22 Feb 2008 20:51:50 -  1.255
--- playerc.h   25 Feb 2008 02:04:59 -  1.256
***
*** 985,988 
--- 985,994 
  int playerc_actarray_unsubscribe(playerc_actarray_t *device);
  
+ /** Accessor method for the actuator data */
+ player_actarray_actuator_t 
playerc_actarray_get_actuator_data(playerc_actarray_t *device, int index);
+ 
+ /** Accessor method for the actuator geom */
+ player_actarray_actuatorgeom_t 
playerc_actarray_get_actuator_geom(playerc_actarray_t *device, int index);
+ 
  /** @brief Get the actarray geometry.  The writes the result into the proxy
  rather than returning it to the caller. */


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc.i, 1.32, 1.33

2008-02-24 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26643/client_libs/libplayerc/bindings/python

Modified Files:
playerc.i 
Log Message:
fixes for swig actarray support


Index: playerc.i
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** playerc.i   25 Feb 2008 02:04:59 -  1.32
--- playerc.i   25 Feb 2008 02:08:33 -  1.33
***
*** 7,12 
  
  %include typemaps.i
- %include ../../../../libplayercore/player.h
- %include ../../../../libplayercore/player_interfaces.h
  
  // Provide array access to the RFID tags
--- 7,10 
***
*** 396,399 
--- 394,398 
  // wrapper code for structs
  %include ../../../../libplayercore/player.h
+ %include ../../../../libplayercore/player_interfaces.h
  
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/position/nav200 sicknav200.cc, 1.14, 1.15

2008-02-19 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/position/nav200
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32449/server/drivers/position/nav200

Modified Files:
sicknav200.cc 
Log Message:
patch to support reconnection to hardware
adds a fetch mode to upload reflectors from a vectormap
fixes to speed calculations (may not be perfect yet)

Index: sicknav200.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nav200/sicknav200.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** sicknav200.cc   4 Feb 2008 19:40:27 -   1.14
--- sicknav200.cc   19 Feb 2008 19:06:28 -  1.15
***
*** 154,159 
  // Set the reflector positions.
  void SetReflectors(player_vectormap_layer_data_t* data);
! // Fetch the reflector positions from a provided vectormap and download 
to device.
! void FetchReflectors();
  // Build the well known binary view of the reflector positions.
  void BuildWKB();
--- 154,164 
  // Set the reflector positions.
  void SetReflectors(player_vectormap_layer_data_t* data);
! // Checks if the reflectors stored on the NAV200 are identical to those 
in the database.
! // If they are not, the reflectors in the database are copied to the 
NAV200.
! void FetchIfNeeded();
! // Fetch the reflector positions from a provided vectormap.
! player_vectormap_layer_data_t* FetchReflectors();
! // Extract reflector positions from vectormap layer. Returns number of 
reflectors.
! int InterpretLayerData(player_vectormap_layer_data_t* data, PositionXY* 
reflectors);
  // Build the well known binary view of the reflector positions.
  void BuildWKB();
***
*** 171,174 
--- 176,181 
  uint8_t* wkbData;
  uint32_t wkbSize;
+ double speed;
+ double steeringAngle;
  
  DoubleProperty wheelBase;
***
*** 177,180 
--- 184,188 
  // and mode will be automatically set back to positioning.
  StringProperty mode;
+ bool fetchOnStart; // If true, fetch reflectors whenever connecting.
  
  // Name of device used to communicate with the laser
***
*** 205,208 
--- 213,220 
  // Vector map interface
  player_devaddr_t vectormap_addr;
+ // Position interface
+ player_devaddr_t debug_addr;
+ player_position2d_data_t debug_packet;
+ struct timeval previous;
  };
  
***
*** 229,233 
  SickNAV200::SickNAV200(ConfigFile* cf, int section)
  : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN),
! wheelBase (wheelBase, -1.0, 0),
mode (mode, DEFAULT_SICKNAV200_MODE, 0)
  {
--- 241,245 
  SickNAV200::SickNAV200(ConfigFile* cf, int section)
  : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN),
! wheelBase (wheelbase, -1.0, 0),
mode (mode, DEFAULT_SICKNAV200_MODE, 0)
  {
***
*** 261,264 
--- 273,291 
return;
}
+   
+   // Create debug interface
+   if (cf-ReadDeviceAddr((this-debug_addr), section, 
+provides, PLAYER_POSITION2D_CODE, 2, NULL) != 0)
+   {
+   PLAYER_ERROR(Could not read debug interface device address.);
+   this-SetError(-1);
+   return;
+   }  
+   if (this-AddInterface(this-debug_addr))
+   {
+   PLAYER_ERROR(Could not add debug interface.);
+   this-SetError(-1);
+   return;
+   }
  
// Laser geometry.
***
*** 273,276 
--- 300,307 
this-wkbSize = 0;

+   this-speed = 0;
+   this-steeringAngle = 0;
+   this-fetchOnStart = false;
+   
// Serial port - done in the opaque driver
//this-device_name = strdup(cf-ReadString(section, port, DEFAULT_PORT));
***
*** 306,309 
--- 337,342 
  PLAYER_VECTORMAP_CODE, -1, NULL);

+   gettimeofday(previous, NULL);
+   
return;
  }
***
*** 412,415 
--- 445,457 
  return 0;
}
+ 
+   if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_DATA, 
PLAYER_POSITION2D_DATA_STATE, velocity_id))
+   {
+ player_position2d_data_t * recv = 
reinterpret_castplayer_position2d_data_t *  (data);
+ speed = recv-vel.px;
+ steeringAngle = recv-pos.pa;
+ return 0;
+   }
+ 

if (Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
***
*** 548,552 
else if (strncmp(mode, fetch, 5) == 0)
{
!   FetchReflectors(); // Fetch reflectors from database
mode.SetValue(positioning);
}
--- 590,594 
else if (strncmp(mode, fetch, 5) == 0)
{
!   SetReflectors(FetchReflectors()); // Fetch reflectors 
from database
mode.SetValue(positioning);
}
***
*** 607,610 
--- 649,661 

[Playerstage-commit] code/player/server/drivers/opaque tcpstream.cc, 1.1, 1.2

2008-02-19 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/opaque
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32449/server/drivers/opaque

Modified Files:
tcpstream.cc 
Log Message:
patch to support reconnection to hardware
adds a fetch mode to upload reflectors from a vectormap
fixes to speed calculations (may not be perfect yet)

Index: tcpstream.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/opaque/tcpstream.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tcpstream.cc18 Dec 2007 05:05:08 -  1.1
--- tcpstream.cc19 Feb 2008 19:06:27 -  1.2
***
*** 183,186 
--- 183,188 
  IntProperty port;
  
+ bool connected;
+ 
  // This is the data we store and send
  player_opaque_data_t mData;
***
*** 225,228 
--- 227,232 
assert(rx_buffer);

+   connected = false;
+   
return;
  }
***
*** 241,247 
// Open the terminal
if (OpenTerm())
!   return -1;
! 
!   PLAYER_MSG0(2, TCP Opaque Driver ready);
  
// Start the device thread; spawns a new thread and executes
--- 245,251 
// Open the terminal
if (OpenTerm())
!   PLAYER_ERROR(Failed to connect to socket);
!   else
!   PLAYER_MSG0(2, TCP Opaque Driver ready);
  
// Start the device thread; spawns a new thread and executes
***
*** 275,278 
--- 279,288 
// return -1, and a NACK will be sent for you, if a response is 
required.

+   if (!connected)
+   {
+   PLAYER_MSG0(2, TCP reconnecting);
+   OpenTerm();
+   }
+   
if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_CMD, 
PLAYER_OPAQUE_CMD_DATA, this-device_addr))
{
***
*** 287,291 
--- 297,305 
} while (result  0  errno == EAGAIN);
if (result  (int)recv-data_count)
+   {
PLAYER_ERROR2(Error sending data (%d, %s), errno, 
strerror(errno));
+   // Attempt to reconnect.
+   CloseTerm();
+   }
}

***
*** 312,317 
  ProcessMessages();
  
! // Reads the data from the serial port and then publishes it
! ReadData();
  
  // Sleep (you might, for example, block on a read() instead)
--- 326,339 
  ProcessMessages();
  
! if (connected)
! {
!   // Reads the data from the serial port and then publishes it
!   ReadData();
! }
! else
! {
!   PLAYER_MSG0(2, TCP reconnecting);
!   OpenTerm();
! }
  
  // Sleep (you might, for example, block on a read() instead)
***
*** 343,346 
--- 365,370 
PLAYER_MSG0(2, TCP Opaque Driver connected);

+   connected = true;
+   
return 0;
  }
***
*** 353,356 
--- 377,381 
  {
close(sock);
+   connected = false;
return 0;
  }
***
*** 364,368 
//
int len = recv(sock, rx_buffer, buffer_size, 0);
!   if (len == 0 || (len  0  errno == EAGAIN))
{
   // PLAYER_MSG0(2, empty packet);
--- 389,393 
//
int len = recv(sock, rx_buffer, buffer_size, 0);
!   if (len  0  errno == EAGAIN)
{
   // PLAYER_MSG0(2, empty packet);
***
*** 370,376 
}
  
!   if (len  0)
{
  PLAYER_ERROR2(error reading from socket: %d %s, errno, strerror(errno));
  return;
}
--- 395,402 
}
  
!   if (len = 0)
{
  PLAYER_ERROR2(error reading from socket: %d %s, errno, strerror(errno));
+ CloseTerm();
  return;
}


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player acinclude.m4,1.153,1.154

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8383

Modified Files:
acinclude.m4 
Log Message:
applied
[ 1895536 ] CVS: linuxwifi can't be compiled with recent 2.6 kernheaders



Index: acinclude.m4
===
RCS file: /cvsroot/playerstage/code/player/acinclude.m4,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** acinclude.m47 Feb 2008 02:22:59 -   1.153
--- acinclude.m418 Feb 2008 19:32:04 -  1.154
***
*** 271,275 
  
  PLAYER_ADD_DRIVER([linuxwifi],[yes],[linux/wireless.h],
!   [],[],[],[],[[#include netinet/in.h]])
  
  PLAYER_ADD_DRIVER([localbb],[yes],[],[],[])
--- 271,275 
  
  PLAYER_ADD_DRIVER([linuxwifi],[yes],[linux/wireless.h],
!   [],[],[],[],[[#include linux/if.h]])
  
  PLAYER_ADD_DRIVER([localbb],[yes],[],[],[])


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/wifi iwspy.cc, 1.21, 1.22 linuxwifi.cc, 1.19, 1.20

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/wifi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8383/server/drivers/wifi

Modified Files:
iwspy.cc linuxwifi.cc 
Log Message:
applied
[ 1895536 ] CVS: linuxwifi can't be compiled with recent 2.6 kernheaders



Index: linuxwifi.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/linuxwifi.cc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** linuxwifi.cc1 Nov 2007 22:16:23 -   1.19
--- linuxwifi.cc18 Feb 2008 19:32:04 -  1.20
***
*** 76,79 
--- 76,81 
  /** @} */
  
+ #include stddef.h
+ #include assert.h
  #include ctype.h
  #include pthread.h
***
*** 83,86 
--- 85,89 
  #include net/ethernet.h
  #include netinet/in.h
+ #include linux/if.h
  #include linux/wireless.h
  #include sys/ioctl.h
***
*** 441,445 
wifi_data.qual_type = qual_type;
  
!   Publish(device_addr, 
PLAYER_MSGTYPE_DATA,PLAYER_WIFI_DATA_STATE,(void*)wifi_data, 
sizeof(player_wifi_data_t),NULL);
  }
  
--- 444,448 
wifi_data.qual_type = qual_type;
  
!   Publish(device_addr, 
PLAYER_MSGTYPE_DATA,PLAYER_WIFI_DATA_STATE,(void*)wifi_data);
  }
  

Index: iwspy.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/iwspy.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** iwspy.cc23 Aug 2007 19:58:48 -  1.21
--- iwspy.cc18 Feb 2008 19:32:04 -  1.22
***
*** 84,87 
--- 84,89 
  #include string.h
  #include stdlib.h
+ #include stddef.h
+ #include assert.h
  
  #include sys/stat.h
***
*** 290,294 
if (nic-in_count  nic-out_count)
{
! link = data.links + data.links_count++;
  memcpy(link-ip, nic-ip, strlen(nic-ip));
link-ip_count = strlen(nic-ip);
--- 292,300 
if (nic-in_count  nic-out_count)
{
! data.links_count++;
! data.links = reinterpret_castplayer_wifi_link_t 
*(realloc(data.links, sizeof(player_wifi_link_t) * data.links_count));
! assert(data.links);
! link = data.links + (data.links_count - 1);
! assert(link);
  memcpy(link-ip, nic-ip, strlen(nic-ip));
link-ip_count = strlen(nic-ip);
***
*** 301,309 
}
  }
- data.links_count = data.links_count;
  
  // Send data
  this-Publish(this-device_addr,PLAYER_MSGTYPE_DATA,
!   PLAYER_WIFI_DATA_STATE, data, sizeof(data), time);
}
return;
--- 307,317 
}
  }
  
  // Send data
  this-Publish(this-device_addr,PLAYER_MSGTYPE_DATA,
!   PLAYER_WIFI_DATA_STATE, data, 0, time);
! if (data.links) free(data.links);
! data.links = NULL;
! data.links_count = 0;
}
return;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/blobfinder/simpleshape simpleshape.cc, 1.7, 1.8

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/blobfinder/simpleshape
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12245/server/drivers/blobfinder/simpleshape

Modified Files:
simpleshape.cc 
Log Message:
applied
[ 1895643 ] CVS: big simpleshape patch
[ 1895540 ] CVS: imagebase cannot handle compressed camera images



Index: simpleshape.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blobfinder/simpleshape/simpleshape.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** simpleshape.cc  1 Nov 2007 22:16:17 -   1.7
--- simpleshape.cc  18 Feb 2008 19:42:49 -  1.8
***
*** 101,104 
--- 101,108 
  /** @} */
  
+ #include stddef.h
+ #include stdlib.h
+ #include assert.h
+ #include string.h
  #include ../../base/imagebase.h
  
***
*** 164,167 
--- 168,173 
private: void WriteBlobfinderData();
  
+   private: void WriteCameraData();
+ 
// Model data (this is the shape to search for)
private: const char *modelFilename;
***
*** 183,186 
--- 189,197 
private: Shape shapes[256];
private: unsigned int shapeCount;
+   
+   private: player_devaddr_t blobfinder_addr;
+   private: player_devaddr_t debugcam_addr;
+ 
+   private: bool debugcam;
  };
  
***
*** 203,211 
  // Constructor
  SimpleShape::SimpleShape( ConfigFile* cf, int section)
!   : ImageBase(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN, 
PLAYER_BLOBFINDER_CODE)
  {
this-inpImage = NULL;
this-outImage = NULL;
this-workImage = NULL;
  
// Filename for the target shape image
--- 214,247 
  // Constructor
  SimpleShape::SimpleShape( ConfigFile* cf, int section)
!   : ImageBase(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN)
  {
this-inpImage = NULL;
this-outImage = NULL;
this-workImage = NULL;
+   memset((this-blobfinder_addr), 0, sizeof blobfinder_addr);
+   memset((this-debugcam_addr), 0, sizeof debugcam_addr);
+   this-debugcam = true;
+ 
+   if (cf-ReadDeviceAddr((this-blobfinder_addr), section, provides,
+PLAYER_BLOBFINDER_CODE, -1, NULL))
+   {
+ this-SetError(-1);
+ return;
+   }
+   if (this-AddInterface(this-blobfinder_addr))
+   {
+ this-SetError(-1);
+ return;
+   }
+   if (cf-ReadDeviceAddr((this-debugcam_addr), section, provides,
+PLAYER_CAMERA_CODE, -1, NULL))
+   {
+ PLAYER_WARN(debug preview will not be available);
+ this-debugcam = false;
+   } else if (this-AddInterface(this-debugcam_addr))
+   {
+ this-SetError(-1);
+ return;
+   }
  
// Filename for the target shape image
***
*** 221,225 
  
this-shapeCount = 0;
-   return;
  }
  
--- 257,260 
***
*** 321,326 
  {
CvSize size;
!   int width, height;
!   
width = this-stored_data.width;
height = this-stored_data.height;
--- 356,363 
  {
CvSize size;
!   int i, j, width, height, depth;
!   unsigned char * row1;
!   unsigned char * row2;
! 
width = this-stored_data.width;
height = this-stored_data.height;
***
*** 332,336 
  this-inpImage = cvCreateImage(size, IPL_DEPTH_8U, 1);
size = cvSize(2 * width, 2 * height);
!   if (this-outImage == NULL)
{
  this-outImage = cvCreateImage(size, IPL_DEPTH_8U, 1);
--- 369,373 
  this-inpImage = cvCreateImage(size, IPL_DEPTH_8U, 1);
size = cvSize(2 * width, 2 * height);
!   if ((this-outImage == NULL)  (this-debugcam))
{
  this-outImage = cvCreateImage(size, IPL_DEPTH_8U, 1);
***
*** 344,367 
switch (this-stored_data.format)
{
! case PLAYER_CAMERA_FORMAT_MONO8:
! {
!   // Copy pixels to input image (grayscale)
!   assert(this-inpImage-imageSize = (int) 
this-stored_data.image_count);
!   memcpy(this-inpImage-imageData, this-stored_data.image, 
this-inpImage-imageSize);
!   break;
! }
! default:
  {
!   PLAYER_WARN1(image format [%d] is not supported, 
this-stored_data.format);
!   return -1;
  }
}
  
// Copy original image to output
! /*  if (this-out_camera_id.port)
{
  cvSetZero(this-outImage);
  cvCopy(this-inpImage, this-outSubImages + 0);
!   }*/
  
// Clone the input image to our workspace
--- 381,416 
switch (this-stored_data.format)
{
!   case PLAYER_CAMERA_FORMAT_MONO8:
! // Copy pixels to input image (grayscale)
! assert(this-inpImage-imageSize = 
static_castint(this-stored_data.image_count));
! memcpy(this-inpImage-imageData, this-stored_data.image, 
this-inpImage-imageSize);
! break;
!   case PLAYER_CAMERA_FORMAT_RGB888:
! depth = this-stored_data.bpp / 8;
! assert((depth == 4) || (depth == 3));
! assert(this-inpImage-imageSize = 
static_castint((this-stored_data.image_count) / depth));
! for (i = 0; 

[Playerstage-commit] code/player/server/drivers/base imagebase.cc, 1.3, 1.4 imagebase.h, 1.2, 1.3

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12245/server/drivers/base

Modified Files:
imagebase.cc imagebase.h 
Log Message:
applied
[ 1895643 ] CVS: big simpleshape patch
[ 1895540 ] CVS: imagebase cannot handle compressed camera images



Index: imagebase.h
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/base/imagebase.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** imagebase.h 23 Aug 2007 19:58:42 -  1.2
--- imagebase.h 18 Feb 2008 19:42:49 -  1.3
***
*** 66,70 
ImageBase(ConfigFile *cf, int section, bool overwrite_cmds, 
size_t queue_maxlen, int interf);
ImageBase(ConfigFile *cf, int section, bool overwrite_cmds = 
true, size_t queue_maxlen = PLAYER_MSGQUEUE_DEFAULT_MAXLEN);
!   virtual ~ImageBase() {};
  
// Setup/shutdown routines.
--- 66,74 
ImageBase(ConfigFile *cf, int section, bool overwrite_cmds, 
size_t queue_maxlen, int interf);
ImageBase(ConfigFile *cf, int section, bool overwrite_cmds = 
true, size_t queue_maxlen = PLAYER_MSGQUEUE_DEFAULT_MAXLEN);
!   virtual ~ImageBase()
!   {
! if (stored_data.image) delete [](stored_data.image);
! PLAYER_WARN(image deleted from the memory);
!   }
  
// Setup/shutdown routines.
***
*** 75,78 
--- 79,86 
int ProcessMessage (QueuePointer resp_queue, player_msghdr * 
hdr, void * data);
  
+   private:
+   ImageBase(); // no default constructor
+   ImageBase(const ImageBase ); // no copy constructor
+ 
protected: 
virtual int ProcessFrame() = 0;
***
*** 86,89 
bool HaveData;
  };
- 
- 
--- 94,95 

Index: imagebase.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/base/imagebase.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** imagebase.cc1 Nov 2007 22:16:17 -   1.3
--- imagebase.cc18 Feb 2008 19:42:49 -  1.4
***
*** 28,33 
--- 28,39 
  ///
  
+ #include stddef.h
+ #include string.h
+ #include assert.h
  #include imagebase.h
  #include libplayerxdr/playerxdr.h
+ #if HAVE_JPEGLIB_H
+ #include libplayerjpeg/playerjpeg.h
+ #endif
  
  

***
*** 38,42 
  {
memset(this-camera_addr, 0, sizeof(player_devaddr_t));
!   
HaveData = false;
  
--- 44,49 
  {
memset(this-camera_addr, 0, sizeof(player_devaddr_t));
!   stored_data.image = NULL;
!   stored_data.image_count = 0;
HaveData = false;
  
***
*** 56,60 
  {
memset(this-camera_addr, 0, sizeof(player_devaddr_t));
!   
HaveData = false;
  
--- 63,68 
  {
memset(this-camera_addr, 0, sizeof(player_devaddr_t));
!   stored_data.image = NULL;
!   stored_data.image_count = 0;
HaveData = false;
  
***
*** 96,100 
  }
  
- 
  

  // Shutdown the device (called by server thread).
--- 104,107 
***
*** 112,118 
  int ImageBase::ProcessMessage (QueuePointer resp_queue, player_msghdr * hdr, 
void * data)
  {
assert(hdr);
!   assert(data);
!   
if(Message::MatchMessage (hdr, PLAYER_MSGTYPE_DATA, 
PLAYER_CAMERA_DATA_STATE, camera_addr))
{
--- 119,128 
  int ImageBase::ProcessMessage (QueuePointer resp_queue, player_msghdr * hdr, 
void * data)
  {
+   uint32_t new_image_count;
+   player_camera_data_t * compdata = reinterpret_castplayer_camera_data_t 
*(data);
+ 
assert(hdr);
!   assert(compdata);
! 
if(Message::MatchMessage (hdr, PLAYER_MSGTYPE_DATA, 
PLAYER_CAMERA_DATA_STATE, camera_addr))
{
***
*** 120,125 
if (!HaveData)
{
!   player_camera_data_t_copy(stored_data, (player_camera_data_t 
*)data);
!   HaveData = true;
}
Unlock();
--- 130,188 
if (!HaveData)
{
!   this-stored_data.width = (compdata-width);
!   this-stored_data.height = (compdata-height);
!   this-stored_data.fdiv = (compdata-fdiv);
! #if HAVE_JPEGLIB_H
!   if (compdata-compression != PLAYER_CAMERA_COMPRESS_JPEG)
!   {
! #endif
!   this-stored_data.compression = (compdata-compression);
!   this-stored_data.format = (compdata-format);
!   this-stored_data.bpp = (compdata-bpp);
!   if ((this-stored_data.image_count) != (compdata-image_count))
!   

[Playerstage-commit] code/player/server/drivers/vectormap dbconn.cc, 1.5, 1.6

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/vectormap
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1298/server/drivers/vectormap

Modified Files:
dbconn.cc 
Log Message:
applied
[ 1895961 ] CVS: postgis cannot be compiled with older g++


Index: dbconn.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/vectormap/dbconn.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dbconn.cc   15 Feb 2008 08:42:37 -  1.5
--- dbconn.cc   18 Feb 2008 20:41:56 -  1.6
***
*** 155,168 
for (int i=0; inum_rows; ++i)
{
! FeatureDataHolder fd(string(PQgetvalue(res, i, 0)));
  uint32_t length = PQgetlength(res, i, 1);
  uint8_t * wkb = new uint8_t[length];
  assert(wkb);
  length = Text2Bin(PQgetvalue(res, i, 1), wkb, length);
! fd.wkb.assign(wkb, wkb + length);
  delete []wkb;
! fd.attrib = string(PQgetvalue(res, i, 2));
  
! data.features.push_back(fd);
}
  
--- 155,170 
for (int i=0; inum_rows; ++i)
{
! FeatureDataHolder * fd = new FeatureDataHolder(string(PQgetvalue(res, i, 
0)));
! assert(fd);
  uint32_t length = PQgetlength(res, i, 1);
  uint8_t * wkb = new uint8_t[length];
  assert(wkb);
  length = Text2Bin(PQgetvalue(res, i, 1), wkb, length);
! fd-wkb.assign(wkb, wkb + length);
  delete []wkb;
! fd-attrib = string(PQgetvalue(res, i, 2));
  
! data.features.push_back(*fd);
! delete fd;
}
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ playerc++config.h.in, 1.1, NONE

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2826/client_libs/libplayerc++

Removed Files:
playerc++config.h.in 
Log Message:
removed generated file

--- playerc++config.h.in DELETED ---


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc playercconfig.h.in, 1.1, NONE

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3211/client_libs/libplayerc

Removed Files:
playercconfig.h.in 
Log Message:
removed generated file

--- playercconfig.h.in DELETED ---


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc playercconfig.h.in, 1.2, 1.3

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24326

Added Files:
playercconfig.h.in 
Log Message:
readded deleted file, was not generated after all


--- NEW FILE: playercconfig.h.in ---

/*
 * Desc: Configured values.
 * CVS:  $Id: playercconfig.h.in,v 1.3 2008/02/18 21:44:02 thjc Exp $
 *
 * DO NOT EDIT playercconfig.h; edit playercconfig.h.in instead.
 */


/* The following macros are replaced by configure with the right values
 * for the build system.  That way the installed version of this header
 * will be usable by anyone.  They MUST not be changed here, or else
 * configure will not replace them with the correct values. */
/*/
/* DO NOT TOUCH THE MACROS BELOW */
/*/
#undef HAVE_GEOS
/*/
/* DO NOT TOUCH THE MACROS ABOVE */
/*/



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/exampleinterface .cvsignore, 1.3, 1.4

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/exampleinterface
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26158/examples/plugins/exampleinterface

Modified Files:
.cvsignore 
Log Message:
added ignores


Index: .cvsignore
===
RCS file: 
/cvsroot/playerstage/code/player/examples/plugins/exampleinterface/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** .cvsignore  16 Jan 2008 05:05:00 -  1.3
--- .cvsignore  18 Feb 2008 21:48:20 -  1.4
***
*** 10,11 
--- 10,12 
  example_xdr.c
  example_xdr.h
+ *.so


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ playerc++config.h.in, 1.2, 1.3

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25086

Added Files:
playerc++config.h.in 
Log Message:
undeleted file, it was not a generated file


--- NEW FILE: playerc++config.h.in ---

/*
 * Desc: Configured values.
 * CVS:  $Id: playerc++config.h.in,v 1.3 2008/02/18 21:46:16 thjc Exp $
 *
 * DO NOT EDIT playerc++config.h; edit playerc++config.h.in instead.
 */


/* The following macros are replaced by configure with the right values
 * for the build system.  That way the installed version of this header
 * will be usable by anyone.  They MUST not be changed here, or else
 * configure will not replace them with the correct values. */
/*/
/* DO NOT TOUCH THE MACROS BELOW */
/*/
#undef HAVE_BOOST_SIGNALS
#undef HAVE_BOOST_THREAD
/*/
/* DO NOT TOUCH THE MACROS ABOVE */
/*/



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/exampleinterface .cvsignore, 1.4, 1.5

2008-02-18 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/exampleinterface
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4386/examples/plugins/exampleinterface

Modified Files:
.cvsignore 
Log Message:
adding ignores


Index: .cvsignore
===
RCS file: 
/cvsroot/playerstage/code/player/examples/plugins/exampleinterface/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** .cvsignore  18 Feb 2008 21:48:20 -  1.4
--- .cvsignore  18 Feb 2008 22:18:12 -  1.5
***
*** 11,12 
--- 11,13 
  example_xdr.h
  *.so
+ .player


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerv pv_dev_vectormap.c, 1.4, 1.5

2008-02-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2608/utils/playerv

Modified Files:
pv_dev_vectormap.c 
Log Message:
applied
[ 1894443 ] CVS: really small bug in new playerv vectormap code


Index: pv_dev_vectormap.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/pv_dev_vectormap.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pv_dev_vectormap.c  15 Feb 2008 08:25:38 -  1.4
--- pv_dev_vectormap.c  17 Feb 2008 23:05:05 -  1.5
***
*** 136,140 
time_diff = (double)(time.tv_sec - old_time.tv_sec) +
(double)(time.tv_usec - 
old_time.tv_usec)/100;
!   if (time_diff  MAP_UPDATE_TIME)
{
// get the map info
--- 136,140 
time_diff = (double)(time.tv_sec - old_time.tv_sec) +
(double)(time.tv_usec - 
old_time.tv_usec)/100;
!   if (time_diff  VECTORMAP_UPDATE_TIME)
{
// get the map info


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/camera/1394 camera1394.cc, 1.40, 1.41

2008-02-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5752/server/drivers/camera/1394

Modified Files:
camera1394.cc 
Log Message:
applied
[ 1894981 ] CVS: Big camera1394 patch



Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** camera1394.cc   15 Feb 2008 08:16:48 -  1.40
--- camera1394.cc   18 Feb 2008 03:34:43 -  1.41
***
*** 169,172 
--- 169,173 
  #include stddef.h   // for NULL
  #include unistd.h
+ #include assert.h
  
  #ifdef HAVE_LIBRAW1394
***
*** 301,306 
private: int GrabFrame();
  
-   private: uint8_t * resized;//[1280 * 960 * 3];
- 
// Save a frame to disk
private: int SaveFrame( const char *filename );
--- 302,305 
***
*** 352,367 
private: int save;
  
-   // Frame capture size
-   private: size_t frameSize;
- 
// Capture timestamp
private: double frameTime;

// Data to send to server
!   private: player_camera_data_t *data;
  
// Bayer Colour Conversion
private: bool DoBayerConversion;
!   private: int BayerPattern;
private: int BayerMethod;
  
--- 351,363 
private: int save;
  
// Capture timestamp
private: double frameTime;

// Data to send to server
!   private: player_camera_data_t * data;
  
// Bayer Colour Conversion
private: bool DoBayerConversion;
!   private: bayer_pattern_t BayerPattern;
private: int BayerMethod;
  
***
*** 399,403 
float fps;
  
!   resized=NULL;
  
  #ifdef HAVE_LIBRAW1394
--- 395,399 
float fps;
  
!   this-data = NULL;
  
  #ifdef HAVE_LIBRAW1394
***
*** 439,443 
{
  this-mode = MODE_160x120_YUV444;
- this-frameSize = 160 * 120 * 2; // Is this correct?
}
*/
--- 435,438 
***
*** 445,449 
{
  this-mode = MODE_320x240_YUV422;
- this-frameSize = 320 * 240 * 3;
}
/*
--- 440,443 
***
*** 461,475 
{
  this-mode = MODE_640x480_MONO;
- this-frameSize = 640 * 480 * 1;
}
else if (0==strcmp(str,640x480_yuv422))
{
  this-mode = MODE_640x480_YUV422;
- this-frameSize = 640 * 480 * 3;
}
else if (0==strcmp(str,640x480_rgb))
{
  this-mode = MODE_640x480_RGB;
- this-frameSize = 640 * 480 * 3;
}
else if (0==strcmp(str,800x600_mono))
--- 455,466 
***
*** 477,481 
  this-mode = MODE_800x600_MONO;
  this-format = FORMAT_SVGA_NONCOMPRESSED_1;
- this-frameSize = 800 * 600 * 1;
}
else if (0==strcmp(str,800x600_yuv422))
--- 468,471 
***
*** 483,487 
  this-mode = MODE_800x600_YUV422;
  this-format = FORMAT_SVGA_NONCOMPRESSED_1;
- this-frameSize = 600 * 450 * 3;
}
else if (0==strcmp(str,1024x768_mono))
--- 473,476 
***
*** 489,493 
  this-mode = MODE_1024x768_MONO;
  this-format = FORMAT_SVGA_NONCOMPRESSED_1;
- this-frameSize = 1024 * 768 * 1;
}
else if (0==strcmp(str,1024x768_yuv422))
--- 478,481 
***
*** 495,499 
  this-mode = MODE_1024x768_YUV422;
  this-format = FORMAT_SVGA_NONCOMPRESSED_1;
- this-frameSize = 512 * 384 * 3;
}
else if (0==strcmp(str,1280x960_mono))
--- 483,486 
***
*** 501,505 
  this-mode = MODE_1280x960_MONO;
  this-format = FORMAT_SVGA_NONCOMPRESSED_2;
- this-frameSize = 1280 * 960 * 1;
}
else if (0==strcmp(str,1280x960_yuv422))
--- 488,491 
***
*** 507,511 
  this-mode = MODE_1280x960_YUV422;
  this-format = FORMAT_SVGA_NONCOMPRESSED_2;
- this-frameSize = 640 * 480 * 3;
}
  #if LIBDC1394_VERSION == 0200
--- 493,496 
***
*** 514,518 
  this-mode = MODE_FORMAT7_0;
  this-format = FORMAT_7;
- this-frameSize = 0;
}
  #endif
--- 499,502 
***
*** 687,691 
break;
}
!   
return;
  }
--- 671,675 
break;
}
! 
return;
  }
***
*** 695,700 
  void Camera1394::SafeCleanup()
  {
-   delete resized;
-   resized = NULL;
  
  #if LIBDC1394_VERSION == 0200
--- 679,682 
***
*** 736,739 
--- 718,728 
this-handle = NULL;
  #endif
+   if (this-data)
+   {
+ if (this-data-image) delete[](this-data-image);
+ this-data-image = NULL;
+ delete (this-data);
+   }
+   this-data = NULL;
  }
  
***
*** 742,746 
  int Camera1394::Setup()
  {
!   this-data = 0;
  
  #if LIBDC1394_VERSION == 0200
--- 731,735 
  int Camera1394::Setup()
  {
!   
  
  #if LIBDC1394_VERSION == 0200
***
*** 1161,1167 
  int Camera1394::GrabFrame()
  {
-   uint32_t f, c;
-   int  i, 

[Playerstage-commit] code/player/server/drivers/camera/1394 Makefile.am, 1.5, 1.6 camera1394.cc, 1.41, 1.42

2008-02-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29876/server/drivers/camera/1394

Modified Files:
Makefile.am camera1394.cc 
Log Message:
fix for build camera1394 withotu cmvision


Index: Makefile.am
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Makefile.am 20 Jan 2006 01:12:55 -  1.5
--- Makefile.am 18 Feb 2008 04:38:31 -  1.6
***
*** 6,9 
--- 6,13 
  endif
  
+ if INCLUDE_CMVISION
  libcamera1394_la_SOURCES = camera1394.cc
+ else
+ libcamera1394_la_SOURCES = camera1394.cc 
../../blobfinder/cmvision/conversions.c ../../blobfinder/cmvision/conversions.h
+ endif
  

Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** camera1394.cc   18 Feb 2008 03:34:43 -  1.41
--- camera1394.cc   18 Feb 2008 04:38:31 -  1.42
***
*** 1249,1252 
--- 1249,1253 
switch (this-BayerMethod)
{
+   
case BAYER_DECODING_DOWNSAMPLE:
  // quarter of the image but 3 bytes per pixel


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/camera/1394 camera1394.cc, 1.39, 1.40

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12968/server/drivers/camera/1394

Modified Files:
camera1394.cc 
Log Message:
applied patches 
[ 1892298 ] camera1394: pass messages without copy
[ 1891487 ] allow message publication without copy


Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** camera1394.cc   30 Jan 2008 07:00:52 -  1.39
--- camera1394.cc   15 Feb 2008 08:16:48 -  1.40
***
*** 356,363 
  
// Capture timestamp
!   private: struct timeval frameTime;

// Data to send to server
!   private: player_camera_data_t data;
  
// Bayer Colour Conversion
--- 356,363 
  
// Capture timestamp
!   private: double frameTime;

// Data to send to server
!   private: player_camera_data_t *data;
  
// Bayer Colour Conversion
***
*** 687,691 
break;
}
-   this-data.compression = PLAYER_CAMERA_COMPRESS_RAW;

return;
--- 687,690 
***
*** 743,747 
  int Camera1394::Setup()
  {
!   memset((this-data), 0, sizeof(this-data));
  
  #if LIBDC1394_VERSION == 0200
--- 742,746 
  int Camera1394::Setup()
  {
!   this-data = 0;
  
  #if LIBDC1394_VERSION == 0200
***
*** 1112,1118 
  this-GrabFrame();
  
- // Write data to server
- this-RefreshData();
- 
  // this should go or be replaced
  // Save frames; must be done after writedata (which will byteswap)
--- ,1114 
***
*** 1123,1126 
--- 1119,1126 
this-SaveFrame(filename);
  }
+ 
+ // Write data to server
+ this-RefreshData();
+ 
  /*
gettimeofday(now,NULL);
***
*** 1197,1204 
--- 1197,1206 
}
  
+   this-data = (player_camera_data_t *)malloc(sizeof(*this-data));
unsigned int frame_width;
unsigned int frame_height;
uint8_t * capture_buffer;
  #if LIBDC1394_VERSION == 0200
+   frameTime = frame-timestamp/1.e-6;
frame_width = frame-size[0];
frame_height = frame-size[1];
***
*** 1213,1232 
  frameSize = frame_width * frame_height;

-   
-   //delete [] this-data.image;
-   //this-data.image = NULL;
-   unsigned int old_image_count = this-data.image_count;
switch (this-mode)
{
case MODE_320x240_YUV422:
case MODE_640x480_YUV422:
! this-data.bpp = 24;
! this-data.format = PLAYER_CAMERA_FORMAT_RGB888;
! this-data.image_count = this-frameSize;
! if(old_image_count  this-data.image_count)
! this-data.image = new uint8_t [this-data.image_count];
! this-data.width = frame_width;
! this-data.height = frame_height;
! uyvy2rgb(capture_buffer, this-data.image, (frame_width) * 
(frame_height));
  break;
case MODE_1024x768_YUV422:
--- 1215,1229 
  frameSize = frame_width * frame_height;

switch (this-mode)
{
case MODE_320x240_YUV422:
case MODE_640x480_YUV422:
! this-data-bpp = 24;
! this-data-format = PLAYER_CAMERA_FORMAT_RGB888;
! this-data-image_count = this-frameSize;
! this-data-image = (uint8_t*) malloc(this-data-image_count);
! this-data-width = frame_width;
! this-data-height = frame_height;
! uyvy2rgb(capture_buffer, this-data-image, (frame_width) * 
(frame_height));
  break;
case MODE_1024x768_YUV422:
***
*** 1234,1251 
  if (resized == NULL)
resized = new uint8_t [1280 * 960 * 3];
! this-data.bpp = 24;
! this-data.format = PLAYER_CAMERA_FORMAT_RGB888;
! this-data.image_count = this-frameSize;
! if(old_image_count  this-data.image_count)
! this-data.image = new uint8_t [this-data.image_count];
! this-data.width = frame_width / 2;
! this-data.height = frame_height / 2;
! assert(this-data.image_count = sizeof(this-data.image));
  uyvy2rgb(capture_buffer, this-resized, (frame_width) * (frame_height));
  ptr1 = this-resized;
! ptr2 = this-data.image;
! for (f = 0; f  (this-data.height); f++)
  {
!   for (c = 0; c  (this-data.width); c++)
{
ptr2[0] = ptr1[0];
--- 1231,1247 
  if (resized == NULL)
resized = new uint8_t [1280 * 960 * 3];
! this-data-bpp = 24;
! this-data-format = PLAYER_CAMERA_FORMAT_RGB888;
! this-data-image_count = this-frameSize;
! this-data-image = (uint8_t *) malloc(this-data-image_count);
! this-data-width = frame_width / 2;
! this-data-height = frame_height / 2;
! assert(this-data-image_count = sizeof(this-data-image));
  uyvy2rgb(capture_buffer, this-resized, (frame_width) * (frame_height));
  ptr1 = this-resized;
! ptr2 = this-data-image;
! for (f = 0; f  (this-data-height); f++)
  {
!   

[Playerstage-commit] code/player/libplayerxdr playerxdrgen.py, 1.17, 1.18

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayerxdr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12968/libplayerxdr

Modified Files:
playerxdrgen.py 
Log Message:
applied patches 
[ 1892298 ] camera1394: pass messages without copy
[ 1891487 ] allow message publication without copy


Index: playerxdrgen.py
===
RCS file: /cvsroot/playerstage/code/player/libplayerxdr/playerxdrgen.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** playerxdrgen.py 18 Dec 2007 02:10:42 -  1.17
--- playerxdrgen.py 15 Feb 2008 08:16:48 -  1.18
***
*** 296,300 
if(src-%(varstring)s != NULL  src-%(countvar)s  0)
{
! if((dest-%(varstring)s = 
calloc(src-%(countvar)s,sizeof(%(typestring)s))) == NULL)
return(0);
}
--- 296,300 
if(src-%(varstring)s != NULL  src-%(countvar)s  0)
{
! if((dest-%(varstring)s = 
malloc(src-%(countvar)s*sizeof(%(typestring)s))) == NULL)
return(0);
}


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore driver.cc, 1.35, 1.36 driver.h, 1.23, 1.24 message.h, 1.24, 1.25

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12968/libplayercore

Modified Files:
driver.cc driver.h message.h 
Log Message:
applied patches 
[ 1892298 ] camera1394: pass messages without copy
[ 1891487 ] allow message publication without copy


Index: driver.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/driver.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** driver.h21 Sep 2007 03:31:50 -  1.23
--- driver.h15 Feb 2008 08:16:48 -  1.24
***
*** 178,182 
  @param deprecated Used to be the length of the message this is now 
calculated
  @param timestamp Timestamp for the message body (if NULL, then the
! current time will be filled in) */
  void Publish(player_devaddr_t addr,
   QueuePointer queue,
--- 178,183 
  @param deprecated Used to be the length of the message this is now 
calculated
  @param timestamp Timestamp for the message body (if NULL, then the
! current time will be filled in)
! @param copy if set to false the data will be claimed and the caller 
should no longer use or free it */
  void Publish(player_devaddr_t addr,
   QueuePointer queue,
***
*** 185,189 
   void* src=NULL,
   size_t deprecated=0,
!  double* timestamp=NULL);
  
   /** @brief Publish a message via one of this driver's interfaces.
--- 186,191 
   void* src=NULL,
   size_t deprecated=0,
!  double* timestamp=NULL,
!  bool copy=true);
  
   /** @brief Publish a message via one of this driver's interfaces.
***
*** 198,202 
   @param deprecated Used to be the length of the message this is now 
calculated
   @param timestamp Timestamp for the message body (if NULL, then the
!  current time will be filled in) */
   void Publish(player_devaddr_t addr, 
uint8_t type, 
--- 200,205 
   @param deprecated Used to be the length of the message this is now 
calculated
   @param timestamp Timestamp for the message body (if NULL, then the
!  current time will be filled in)
!  @param copy if set to false the data will be claimed and the caller 
should no longer use or free it */
   void Publish(player_devaddr_t addr, 
uint8_t type, 
***
*** 204,208 
void* src=NULL, 
size_t deprecated=0,
!   double* timestamp=NULL);
   
   
--- 207,212 
void* src=NULL, 
size_t deprecated=0,
!   double* timestamp=NULL,
!   bool copy=true);
   
   

Index: message.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/message.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** message.h   9 Feb 2008 02:52:29 -   1.24
--- message.h   15 Feb 2008 08:16:48 -  1.25
***
*** 51,58 
  #include libplayercore/player.h
  
- // TODO:
- //   - Add support for stealing the data pointer when creating a message.
- // That would save one allocation  copy in some situations.
- 
  class MessageQueue;
  
--- 51,54 

Index: driver.cc
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/driver.cc,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** driver.cc   18 Dec 2007 02:10:42 -  1.35
--- driver.cc   15 Feb 2008 08:16:48 -  1.36
***
*** 138,142 
  void* src, bool copy)
  {
!   Message msg(*hdr,src);
// push onto the given queue, which provides its own locking
if(!queue-Push(msg))
--- 138,142 
  void* src, bool copy)
  {
!   Message msg(*hdr,src,copy);
// push onto the given queue, which provides its own locking
if(!queue-Push(msg))
***
*** 154,158 
Device* dev;
  
!   Message msg(*hdr,src);
// lock here, because we're accessing our device's queue list
this-Lock();
--- 154,158 
Device* dev;
  
!   Message msg(*hdr,src,copy);
// lock here, because we're accessing our device's queue list
this-Lock();
***
*** 190,194 
  void* src,
  size_t deprecated,
! double* timestamp)
  {
double t;
--- 190,195 
  void* src,
  size_t deprecated,
! double* timestamp,
! bool copy)
  {
double t;
***
*** 208,212 
hdr.size = 0;
  
!   this-Publish(queue, hdr, src);
  }
  
--- 209,213 
hdr.size = 0;
  

[Playerstage-commit] code/player/utils/playerv playerv.h, 1.53, 1.54 pv_dev_vectormap.c, 1.3, 1.4

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16180/utils/playerv

Modified Files:
playerv.h pv_dev_vectormap.c 
Log Message:
applied patch [ 1893823 ] playerv: vectormap continuous update


Index: pv_dev_vectormap.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/pv_dev_vectormap.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pv_dev_vectormap.c  4 Feb 2008 18:59:44 -   1.3
--- pv_dev_vectormap.c  15 Feb 2008 08:25:38 -  1.4
***
*** 59,62 
--- 59,63 
map-menu = rtk_menu_create_sub(mainwnd-device_menu, label);
map-subscribe_item = rtk_menuitem_create(map-menu, Subscribe, 1);
+   map-continuous_item = rtk_menuitem_create(map-menu, continuous update, 
1);
// Set the initial menu state
rtk_menuitem_check(map-subscribe_item, subscribe);
***
*** 122,127 
// Dont draw the map.
if(map-proxy-info.subscribed)
  rtk_fig_show(map-fig, 1);
!   else
  rtk_fig_show(map-fig, 0);
  }
--- 123,159 
// Dont draw the map.
if(map-proxy-info.subscribed)
+   {
+ if(rtk_menuitem_ischecked(map-continuous_item))
+ {
+   static struct timeval old_time = {0,0};
+   struct timeval time;
+   double time_diff = 0.0;
+   gettimeofday(time, NULL);
+   // i don't use (map-proxy-info.datatime != 
map-datatime))
+   // because some drivers return strange datatimes
+   // and the map may change to often for the current map 
format
+   // in playerv.h you can adjust MAP_UPDATE_TIME (default 
1 sec)
+   time_diff = (double)(time.tv_sec - old_time.tv_sec) +
+   (double)(time.tv_usec - 
old_time.tv_usec)/100;
+   if (time_diff  MAP_UPDATE_TIME)
+   {
+   // get the map info
+   playerc_vectormap_get_map_info( map-proxy );
+ 
+   // download intial map data
+   for (ii = 0;  ii  map-proxy-layers_count; 
++ii)
+   {
+   if (playerc_vectormap_get_layer_data( 
map-proxy, ii ))
+   {
+   PRINT_ERR1(libplayerc error: %s, 
playerc_error_str());
+   return;
+   }
+   }
+   vectormap_draw( map );
+   old_time = time;
+   }
+ }
  rtk_fig_show(map-fig, 1);
!   } else
  rtk_fig_show(map-fig, 0);
  }

Index: playerv.h
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/playerv.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** playerv.h   9 Jan 2008 11:45:37 -   1.53
--- playerv.h   15 Feb 2008 08:25:38 -  1.54
***
*** 40,43 
--- 40,44 
  
  #define MAP_UPDATE_TIME 1.0
+ #define VECTORMAP_UPDATE_TIME 1.0
  
  /***
***
*** 936,939 
--- 937,941 
rtk_menu_t *menu;
rtk_menuitem_t *subscribe_item;
+   rtk_menuitem_t *continuous_item;
// Figures
rtk_fig_t *fig;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc dev_vectormap.c, 1.6, 1.7 playerc.h, 1.253, 1.254

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22171/client_libs/libplayerc

Modified Files:
dev_vectormap.c playerc.h 
Log Message:
applied patch
[ 1889308 ] Player CVS: Big postgis/vectormap patch



Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.253
retrieving revision 1.254
diff -C2 -d -r1.253 -r1.254
*** playerc.h   9 Feb 2008 02:52:29 -   1.253
--- playerc.h   15 Feb 2008 08:42:37 -  1.254
***
*** 2334,2337 
--- 2334,2340 
  int playerc_vectormap_get_layer_data(playerc_vectormap_t *device, unsigned 
layer_index);
  
+ /** @brief Write layer data. */
+ int playerc_vectormap_write_layer(playerc_vectormap_t *device, const 
player_vectormap_layer_data_t * data);
+ 
  /** @brief Clean up the dynamically allocated memory for the vectormap. */
  void playerc_vectormap_cleanup(playerc_vectormap_t *device);

Index: dev_vectormap.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_vectormap.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dev_vectormap.c 7 Feb 2008 02:22:59 -   1.6
--- dev_vectormap.c 15 Feb 2008 08:42:37 -  1.7
***
*** 186,189 
--- 186,206 
  }
  
+ // Write layer data
+ int playerc_vectormap_write_layer(playerc_vectormap_t *device, const 
player_vectormap_layer_data_t * data)
+ {
+   if (playerc_client_request(
+   device-info.client,
+   device-info,
+   PLAYER_VECTORMAP_REQ_WRITE_LAYER,
+   data,
+   NULL)  0)
+   {
+ PLAYERC_ERR(failed to write layer data);
+ return -1;
+   }
+   return 0;
+ }
+ 
+ 
  GEOSGeom playerc_vectormap_get_feature_data(playerc_vectormap_t *device, 
unsigned layer_index, unsigned feature_index)
  {


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/vectormap dbconn.cc, 1.4, 1.5 dbconn.h, 1.5, 1.6 postgis.cc, 1.8, 1.9

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/vectormap
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22171/server/drivers/vectormap

Modified Files:
dbconn.cc dbconn.h postgis.cc 
Log Message:
applied patch
[ 1889308 ] Player CVS: Big postgis/vectormap patch



Index: dbconn.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/vectormap/dbconn.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dbconn.cc   7 Dec 2007 04:31:45 -   1.4
--- dbconn.cc   15 Feb 2008 08:42:37 -  1.5
***
*** 1,5 
! #include stdio.h
! #include stdlib.h
  #include iostream
  #include dbconn.h
  #ifdef HAVE_GEOS
--- 1,8 
! #include cstdio
! #include cstddef
! #include cstdlib
  #include iostream
+ #include cassert
+ #include cctype
  #include dbconn.h
  #ifdef HAVE_GEOS
***
*** 23,30 
  }
  
  VectorMapInfoHolder PostgresConn::GetVectorMapInfo(vectorstring layerNames)
  {
// Get the extent in the first query
!   string query_string = SELECT asbinary(extent(geom)) FROM (SELECT geom FROM 
;
  
for (uint32_t ii=0; iilayerNames.size(); ++ii)
--- 26,49 
  }
  
+ uint32_t PostgresConn::Text2Bin(const char * text, unsigned char * bin, 
uint32_t maxlen)
+ {
+ char numbuff[5];
+ uint32_t i;
+ 
+ for (i = 0; i  maxlen; i++)
+ {
+   if (!(text[0])) break;
+   strcpy(numbuff, 0x);
+   strncat(numbuff, text, 2);
+   bin[i] = strtoul(numbuff, NULL, 0);
+   text += 2;
+ }
+ return i;
+ }
+ 
  VectorMapInfoHolder PostgresConn::GetVectorMapInfo(vectorstring layerNames)
  {
// Get the extent in the first query
!   string query_string = SELECT GeometryFromText(astext(extent(geom))) FROM 
(SELECT geom FROM ;
  
for (uint32_t ii=0; iilayerNames.size(); ++ii)
***
*** 41,67 
query_string += ) AS layer_extent;;
  
!   //PGresult* res = PQexec(conn, query_string.c_str());
!   PGresult* res = PQexecParams(conn,
!query_string.c_str(),
!0,
!NULL,
!NULL,
!NULL,
!NULL,
!1);
  
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
! cout  Error performing select query on database!  endl;
! cout  No extent value found.  endl;
! cout  GetVectorMapInfo() failed  endl;
}
   
-   uint8_t* wkb_temp = reinterpret_castuint8_t*(PQgetvalue(res, 0, 0));
uint32_t length = PQgetlength(res, 0, 0);
!   uint8_t* wkb = new uint8_t[length];
!   memcpy(wkb, wkb_temp, length);
BoundingBox extent = BinaryToBBox(wkb, length);
!   delete[] wkb;
  
// Get the srid in the second query
--- 60,79 
query_string += ) AS layer_extent;;
  
!   PGresult * res = PQexec(conn, query_string.c_str());
  
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
! cerr  Error performing select query on database!  endl;
! cerr  No extent value found.  endl;
! cerr  GetVectorMapInfo() failed  endl;
}
   
uint32_t length = PQgetlength(res, 0, 0);
!   uint8_t * wkb = new uint8_t[length];
!   assert(wkb);
!   length = Text2Bin(PQgetvalue(res, 0, 0), wkb, length);
BoundingBox extent = BinaryToBBox(wkb, length);
!   delete []wkb;
!   PQclear(res);
  
// Get the srid in the second query
***
*** 69,75 
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
! cout  Error performing select query on database!  endl;
! cout  No srid value found.  endl;
! cout  GetVectorMapInfo() failed  endl;
}
  
--- 81,87 
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
! cerr  Error performing select query on database!  endl;
! cerr  No srid value found.  endl;
! cerr  GetVectorMapInfo() failed  endl;
}
  
***
*** 91,95 
  
// Retrieve the extent of the layer in binary form
!   const char* query_template = SELECT asbinary(extent(geom)) AS extent FROM 
%s;;
  
char query_string[MAX_PSQL_STRING];
--- 103,107 
  
// Retrieve the extent of the layer in binary form
!   const char* query_template = SELECT GeometryFromText(astext(extent(geom))) 
AS extent FROM %s;;
  
char query_string[MAX_PSQL_STRING];
***
*** 97,122 
snprintf(query_string, MAX_PSQL_STRING, query_template, layer_name);
  
!   //PGresult* res = PQexec(conn, query_string);
!   PGresult* res = PQexecParams(conn,
!query_string,
!0,
!NULL,
!NULL,
!NULL,
!NULL,
!1);
  
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
! cout  Error performing select query on database!  endl;
! cout  

[Playerstage-commit] code/player/server/drivers/shell writelog.cc, 1.87, 1.88

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/shell
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28413/server/drivers/shell

Modified Files:
writelog.cc 
Log Message:
applied patch
[ 1849707 ] writelog: more flexible naming/update camera module


Index: writelog.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/writelog.cc,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** writelog.cc 1 Nov 2007 22:16:23 -   1.87
--- writelog.cc 15 Feb 2008 08:59:22 -  1.88
***
*** 80,83 
--- 80,84 
  - @ref interface_pointcloud3d
  - @ref interface_actarray
+ - @ref interface_camera
  
  The following interfaces are supported in principle but are currently
***
*** 85,89 
  
  - @ref interface_blobfinder
- - @ref interface_camera
  - @ref interface_fiducial
  - @ref interface_gps
--- 86,89 
***
*** 103,129 
- Name of the directory to store the log file in. Relative paths are 
  taken from the directory player is run from. Absolute paths work
! as expected.
  - basename (string)
!   - Default: writelog, produces the logfile: writelog__MM_DD_HH_MM.log, 
! where  is the year, MM is the month, etc.
!   - Base name of the logfile to attach the time stamp to. If specified the 
logfile
! will be (basename)__MM_DD_HH_MM.log.
! - filename (string)
!   - Default: (basename)__MM_DD_HH_MM.log, where  is the year,
! MM is the month, etc. If this parameter is specified it will NOT be time 
stamped.
!   - Name of logfile.
  - autorecord (integer)
- Default: 0
- Default log state; set to 1 for continous logging.
  - camera_save_images (integer)
- Default: 0
!   - Save camera data to image files as well as to the log file.  The image
! files are named writelog__MM_DD_HH_MM_camera_II_NNN.pnm,
  where II is the device index and NNN is the frame number.
- 
  @par Example
  
  @verbatim
! # Log data from laser:0 position2d:0 to 
/home/data/logs/mydata__MM_DD_HH_MM.log
  driver
  (
--- 103,137 
- Name of the directory to store the log file in. Relative paths are 
  taken from the directory player is run from. Absolute paths work
! as expected. The directory is created if it doesn't exist.
! - timestamp_directory (integer)
!   - Default: 0
!   - Add a timestamp to log_directory, in the format _MM_DD_HH_MM_SS,
! where  is the year, MM is the month, etc. 
  - basename (string)
!   - Default: writelog_
!   - Base name of the log file.
! - timestamp (integer)
!   - Default: 1
!   - Add a timestamp to each file, in the format _MM_DD_HH_MM_SS,
! where  is the year, MM is the month, etc. 
! - extension (string)
!   - Default: .log
!   - File extension for the log file.
  - autorecord (integer)
- Default: 0
- Default log state; set to 1 for continous logging.
+ - camera_log_images (integer)
+   - Default: 1
+   - Save image data to the log file. If this is turned off, a log line is 
still
+ generated for each frame, containing all information except the raw image 
data.
  - camera_save_images (integer)
- Default: 0
!   - Save image data to external files within the log directory.
! The image files are named (basename)(timestamp)_camera_II_NNN.pnm,
  where II is the device index and NNN is the frame number.
  @par Example
  
  @verbatim
! # Log data from laser:0 position2d:0 to 
/home/data/logs/mydata__MM_DD_HH_MM_SS.log
  driver
  (
***
*** 151,154 
--- 159,163 
  #include errno.h
  #include sys/types.h
+ #include sys/stat.h
  #include stdlib.h
  #include string.h
***
*** 258,271 
private: int WriteRFID(player_msghdr_t* hdr, void *data);
  
  #if 0
// Write blobfinder data to file
private: void WriteBlobfinder(player_blobfinder_data_t *data);
  
-   // Write camera data to file
-   private: void WriteCamera(player_camera_data_t *data);
- 
-   // Write camera data to image file as well
-   private: void WriteCameraImage(WriteLogDevice *device, player_camera_data_t 
*data, struct timeval *ts);
- 
// Write fiducial data to file
private: void WriteFiducial(player_fiducial_data_t *data);
--- 267,276 
private: int WriteRFID(player_msghdr_t* hdr, void *data);
  
+   // Write camera data to file
+   private: int WriteCamera(WriteLogDevice *device, player_msghdr_t* hdr, void 
*data);
  #if 0
// Write blobfinder data to file
private: void WriteBlobfinder(player_blobfinder_data_t *data);
  
// Write fiducial data to file
private: void WriteFiducial(player_fiducial_data_t *data);
***
*** 284,289 
--- 289,297 
  
  #endif
+   // Where to save files
+   private: char log_directory[1024];
  
// File to write data to
+   private: char filestem[1024];
private: char filename[1024];
private: 

[Playerstage-commit] code/player/utils/pmap logfile.cpp, 1.3, 1.4 logfile.h, 1.1, 1.2 pmap_test.cpp, 1.3, 1.4

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/pmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30928/utils/pmap

Modified Files:
logfile.cpp logfile.h pmap_test.cpp 
Log Message:
aplpied patch
[ 1850791 ] generalizing pmap



Index: pmap_test.cpp
===
RCS file: /cvsroot/playerstage/code/player/utils/pmap/pmap_test.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pmap_test.cpp   5 May 2007 11:53:08 -   1.3
--- pmap_test.cpp   15 Feb 2008 09:06:18 -  1.4
***
*** 178,182 
  static int opt_laser_index = 0;
  static double opt_scale = 0.025;
! static double opt_range_max = 8.0;
  static double opt_range_res = 0.10;
  static pose2_t opt_robot_pose;
--- 178,182 
  static int opt_laser_index = 0;
  static double opt_scale = 0.025;
! static double opt_range_max = -1.0;
  static double opt_range_res = 0.10;
  static pose2_t opt_robot_pose;
***
*** 190,193 
--- 190,201 
  static int opt_fine_max = 100;
  
+ // configuration data, read from logfile
+ static int laser_range_count;
+ static double laser_range_max;
+ static double laser_angle_min;
+ static double laser_angle_max;
+ static double laser_angle_step;
+ 
+ 
  // GUI settings
  static int win;
***
*** 219,222 
--- 227,231 
  static void process();
  static void save();
+ static void process_init();
  static int process_coarse();
  static void save_coarse();
***
*** 429,432 
--- 438,476 
  }
  
+ // recover configuration data from logfile
+ void process_init()
+ { 
+   while (1)
+   {
+ int logresult = logfile_read(logfile); 
+ if (logresult  0)
+ {
+   fprintf(stderr, \n);
+   return;
+ }
+ else if(logresult  0)
+   continue;
+ 
+ // wait for first laser scan
+ if (strcmp(logfile-interface, laser) == 0 
+ logfile-index == opt_laser_index)
+ {
+   // save data
+   laser_range_count = logfile-laser_range_count;
+   laser_range_max = logfile-laser_range_max;
+   laser_angle_min = logfile-laser_angle_min;
+   laser_angle_max = logfile-laser_angle_max;
+   laser_angle_step = logfile-laser_angle_step;
+ 
+   fprintf(stderr, range_count = %d\n, laser_range_count);
+   fprintf(stderr, range_max = %f\n, laser_range_max);
+   fprintf(stderr, angle_min = %f\n, laser_angle_min);
+   fprintf(stderr, angle_max = %f\n, laser_angle_max);
+   fprintf(stderr, angle_step = %f\n, laser_angle_step);
+ 
+   return;
+ }
+   }
+ }
  
  // Coarse map generation (process log file)
***
*** 470,480 
  logfile-index == opt_laser_index)
  {
-   if (logfile-laser_range_count != 181)
-   {
- fprintf(stderr, incorrect range count; expecting %d, got %d,
- lodo-num_ranges, logfile-laser_range_count);
- exit(-1);
-   }
- 
// Update the local pose estimate (corrected odometry)
lodo_pose = lodo_add_scan(lodo, odom_pose,
--- 514,517 
***
*** 799,805 
if (!logfile)
  return -1;
  
// Create lodo handle
!   lodo = lodo_alloc(181, opt_range_max, opt_range_res, -M_PI / 2, M_PI / 180);
if (!lodo)
  return -1;
--- 836,852 
if (!logfile)
  return -1;
+ 
+   //aquire laser configuration data
+   process_init();
+   
+   if (opt_range_max  0)
+ laser_range_max = opt_range_max;  // override maximum laser range if 
specified in command line
+   
+   // restart logreader
+   logfile_free(logfile);
+   logfile = logfile_alloc(opt_filename);
  
// Create lodo handle
!   lodo = lodo_alloc(laser_range_count, laser_range_max, opt_range_res, 
laser_angle_min, laser_angle_step);
if (!lodo)
  return -1;
***
*** 809,814 
  
// Create pmap handle
!   pmap = pmap_alloc(181, opt_range_max, -M_PI / 2, M_PI / 180,
! opt_num_samples, opt_grid_width, opt_grid_height, 
opt_grid_scale);
if (!pmap)
  return -1;
--- 856,861 
  
// Create pmap handle
!   pmap = pmap_alloc(laser_range_count, laser_range_max, laser_angle_min, 
laser_angle_step,
!   opt_num_samples, opt_grid_width, opt_grid_height, 
opt_grid_scale);  
if (!pmap)
  return -1;
***
*** 822,833 
  
// Create rmap handle
!   rmap = rmap_alloc(181, opt_range_max, -M_PI / 2, M_PI / 180,
! opt_grid_width, opt_grid_height);
if (!rmap)
  return -1;
  
// Create omap handle
!   omap = omap_alloc(181, opt_range_max, -M_PI / 2, M_PI / 180,
! opt_grid_width, opt_grid_height, opt_grid_scale);
if (!rmap)
  return -1;
--- 869,880 
  
// Create rmap handle
!   rmap = rmap_alloc(laser_range_count, laser_range_max, laser_angle_min, 
laser_angle_step,
!   opt_grid_width, opt_grid_height);
if (!rmap)
  

[Playerstage-commit] code/player/utils/pmap pmap_test.cpp,1.4,1.5

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/pmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1387/utils/pmap

Modified Files:
pmap_test.cpp 
Log Message:
applied patch
[ 1327235 ] show help in pmap_test



Index: pmap_test.cpp
===
RCS file: /cvsroot/playerstage/code/player/utils/pmap/pmap_test.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pmap_test.cpp   15 Feb 2008 09:06:18 -  1.4
--- pmap_test.cpp   15 Feb 2008 09:14:18 -  1.5
***
*** 233,236 
--- 233,279 
  static void save_fine();
  
+ // Shows help
+ void show_help ()
+ {
+   fprintf (stdout,
+  The pmap_test utility demonstrates the basic functionality of\n
+  the pmap library and serves a handy mapping utility in its own\n
+  right.  Given a Player logfile containing odometry and laser\n
+  data, pmap_test will produce an occupancy grid map of the\n
+  environment.\n\n
+  Basic usage is as follows:\n
+  \t$ pmap_test [options] logfilename\n\n
+  where the supported options are:\n
+-g disable the GUI (run in console mode\n
+   only).\n
+--range_maxmaximum effective range for the 
laser\n
+   (m).\n
+--position_index   index of odometry device in logfile.\n
+--laser_index  index of laser device in logfile.\n
+--num_samples  number of samples in particle 
filter.\n
+--resample_intervalnumber of scans between resampling\n
+   steps.\n
+--resample_sigma   width of resampling gaussian.\n
+--num_cycles   number of optimization cycles in the\n
+   fine phase.\n
+--robot_x, --robot_y, --robot_rot  initial robot pose.\n
+--grid_width, --grid_heightgrid dimensions (m).\n
+--grid_scale   grid scale (m/cell).\n
+--laser_x, --laser_rot laser position offset.\n
+--robot_hostname   the name of the robot to verify in\n
+   the log.\n
+--skip amount of time to skip between log\n
+   entries.\n
+--range_resResolution of the laser (only used 
in\n
+   lodo, not lodo2 which is currently\n
+   used.\n
+--action_model_xx,\n
+--action_model_rx,\n
+--action_model_rr  believe factors in the change of the\n
+   robot's pose.\n
+ );
+   
+   exit (EXIT_SUCCESS);
+ }
  
  // Key callback
***
*** 753,757 
struct timeval tv_a, tv_b;
int opt;
!   const char *opts = g;  
const struct option lopts[] =
  {
--- 796,800 
struct timeval tv_a, tv_b;
int opt;
!   const char *opts = gh;
const struct option lopts[] =
  {
***
*** 775,778 
--- 818,822 
{resample_sigma, 1, 0, 121},
{num_cycles, 1, 0, 122},
+   {help, 0, 0, 'h'},
{0, 0, 0, 0}
  };
***
*** 783,786 
--- 827,832 
  if (opt == 'g')
opt_gui = 0;
+ else if (opt == 'h')
+   show_help();
  else if (opt == 1)
opt_max_scans = atoi(optarg);
***
*** 824,828 
if (optind  0 || optind = argc)
{
! fprintf(stderr, usage: pmap_test [options] logfile\n);
  exit(-1);
}
--- 870,875 
if (optind  0 || optind = argc)
{
! //fprintf(stderr, usage: pmap_test [options] logfile\n);
! show_help ();
  exit(-1);
}


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/pmap lodo_driver.cc, 1.4, 1.5

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/pmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3814

Modified Files:
lodo_driver.cc 
Log Message:
fixed typo


Index: lodo_driver.cc
===
RCS file: /cvsroot/playerstage/code/player/utils/pmap/lodo_driver.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** lodo_driver.cc  23 Aug 2007 19:58:48 -  1.4
--- lodo_driver.cc  15 Feb 2008 09:20:26 -  1.5
***
*** 311,315 
// Laser offset from robot origin
this-laser_pose.pos.x = cf-ReadTupleLength(section, laser_pose, 0, 0.0);
!   this-laser_pose.pos.x = cf-ReadTupleLength(section, laser_pose, 1, 0.0);
this-laser_pose.rot = cf-ReadTupleAngle(section, laser_pose, 2, 0.0);
  
--- 311,315 
// Laser offset from robot origin
this-laser_pose.pos.x = cf-ReadTupleLength(section, laser_pose, 0, 0.0);
!   this-laser_pose.pos.y = cf-ReadTupleLength(section, laser_pose, 1, 0.0);
this-laser_pose.rot = cf-ReadTupleAngle(section, laser_pose, 2, 0.0);
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/sr3000 sr3000.cc, 1.5, 1.6

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/sr3000
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10407/server/drivers/mixed/sr3000

Modified Files:
sr3000.cc 
Log Message:
fixed some property initialisation issues


Index: sr3000.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/sr3000/sr3000.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sr3000.cc   1 Nov 2007 22:16:21 -   1.5
--- sr3000.cc   15 Feb 2008 09:39:21 -  1.6
***
*** 125,129 
  // SR3000 specific values
  unsigned int rows, cols, bpp, inr;
- unsigned char integration_time;
  //ModulationFrq modulation_freq;
  size_t buffer_size, buffer_points_size;
--- 125,128 
***
*** 131,138 
  float *buffer_points, *xp, *yp, *zp;
  
- // Properties
- IntProperty auto_illumination, integration_time, modulation_freq, 
sat_threshold, amp_threshold;
- DoubleProperty static_delay, dynamic_delay;
- 
  // device bookkeeping
  player_devaddr_t pcloud_addr;
--- 130,133 
***
*** 141,144 
--- 136,145 
  player_camera_data_t   d_cam_data, i_cam_data;
  bool providePCloud, provideDCam, provideICam;
+ 
+   protected:
+ // Properties
+ IntProperty auto_illumination, integration_time, modulation_freq, 
sat_threshold, amp_threshold;
+ DoubleProperty static_delay, dynamic_delay;
+ 
  };
  
***
*** 166,171 
  SR3000::SR3000 (ConfigFile* cf, int section)
: Driver (cf, section),
!   auto_illumination (0), integration_time (0), modulation_freq (0),
!   sat_threshold (0), amp_threshold (0), static_delay (0), dynamic_delay 
(0)
  {
memset (this-pcloud_addr, 0, sizeof (player_devaddr_t));
--- 167,177 
  SR3000::SR3000 (ConfigFile* cf, int section)
: Driver (cf, section),
!   auto_illumination (auto_illumination, 0, 0), 
!   integration_time (integration_time, 0, 0), 
!   modulation_freq (modulation_freq, 0, 0),
!   sat_threshold (sat_threshold, 0, 0), 
!   amp_threshold (amp_threshold, 0, 0), 
!   static_delay (static_delay, 0, 0), 
!   dynamic_delay (dynamic_delay, 0, 0)
  {
memset (this-pcloud_addr, 0, sizeof (player_devaddr_t));


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/sr3000 sr3000.cc, 1.6, 1.7

2008-02-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/sr3000
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13774/server/drivers/mixed/sr3000

Modified Files:
sr3000.cc 
Log Message:
build fixes for sr3000 driver relating to properties


Index: sr3000.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/sr3000/sr3000.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** sr3000.cc   15 Feb 2008 09:39:21 -  1.6
--- sr3000.cc   16 Feb 2008 02:22:30 -  1.7
***
*** 127,131 
  //ModulationFrq modulation_freq;
  size_t buffer_size, buffer_points_size;
! void *buffer;
  float *buffer_points, *xp, *yp, *zp;
  
--- 127,131 
  //ModulationFrq modulation_freq;
  size_t buffer_size, buffer_points_size;
! uint8_t *buffer;
  float *buffer_points, *xp, *yp, *zp;
  
***
*** 262,266 
  
// ---[ Alloc memory for the buffer ]---
!   buffer = malloc (buffer_size);
memset (buffer, 0, buffer_size);
  
--- 262,266 
  
// ---[ Alloc memory for the buffer ]---
!   buffer = (uint8_t*)malloc (buffer_size);
memset (buffer, 0, buffer_size);
  
***
*** 308,312 
  {
int res;
!   Property *property = NULL;
  
// Check for properties
--- 308,312 
  {
int res;
!   //Property *property = NULL;
  
// Check for properties
***
*** 314,323 
{
  player_intprop_req_t req = *reinterpret_castplayer_intprop_req_t* 
(data);
! if ((property = propertyBag.GetProperty (req.key)) == NULL)
!   return (-1);
! if (property-KeyIsEqual (auto_illumination))
  {
// ---[ Set Autoillumination
!   if (req-value == 1)
  res = SR_SetAutoIllumination (srCam, 5, 255, 10, 45);
else
--- 314,323 
{
  player_intprop_req_t req = *reinterpret_castplayer_intprop_req_t* 
(data);
! //if ((property = propertyBag.GetProperty (req.key)) == NULL)
! //  return (-1);
! if (auto_illumination.KeyIsEqual (req.key))
  {
// ---[ Set Autoillumination
!   if (req.value == 1)
  res = SR_SetAutoIllumination (srCam, 5, 255, 10, 45);
else
***
*** 327,331 
if (res == 0)
{
! property-SetValueFromMessage (reinterpret_castvoid* (req));
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
--- 327,331 
if (res == 0)
{
! auto_illumination = req.value;
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
***
*** 336,348 
return (0);
  }
! else if (property-KeyIsEqual (integration_time)
  {
// ---[ Set integration time
!   res = SR_SetIntegrationTime (srCam, req-value);
  
// Check the error code
if (res == 0)
{
! property-SetValueFromMessage (reinterpret_castvoid* (req));
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
--- 336,349 
return (0);
  }
! else if (integration_time.KeyIsEqual (req.key))
  {
// ---[ Set integration time
!   res = SR_SetIntegrationTime (srCam, req.value);
  
// Check the error code
if (res == 0)
{
! //property-SetValueFromMessage (reinterpret_castvoid* (req));
! integration_time = req.value;
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
***
*** 353,365 
return (0);
  }
! else if (property-KeyIsEqual (modulation_freq)
  {
// ---[ Set modulation frequency
!   res = SR_SetModulationFrequency (srCam, (ModulationFrq)req-value);
  
// Check the error code
if (res == 0)
{
! property-SetValueFromMessage (reinterpret_castvoid* (req));
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
--- 354,367 
return (0);
  }
! else if (modulation_freq.KeyIsEqual (req.key))
  {
// ---[ Set modulation frequency
!   res = SR_SetModulationFrequency (srCam, (ModulationFrq)req.value);
  
// Check the error code
if (res == 0)
{
! //property-SetValueFromMessage (reinterpret_castvoid* (req));
! modulation_freq = req.value;
  Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
}
***
*** 370,383 
return (0);
  }
! else if (property-KeyIsEqual (sat_threshold)
  {
// ---[ Set saturation threshold
!   res = SR_SetSaturationThreshold (srCam, req-value);
  
// Check the error code
if (res == 0)
{

[Playerstage-commit] code/player/server/drivers/mixed/chatterbox .cvsignore, NONE, 1.1

2008-02-14 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/chatterbox
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20447

Added Files:
.cvsignore 
Log Message:
added ignore


--- NEW FILE: .cvsignore ---
Makefile
Makefile.in
.deps
.libs


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc_swig_parse.py, NONE, 1.1 Makefile.am, 1.20, 1.21 parse.py, 1.9, NONE

2008-02-11 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26255/client_libs/libplayerc/bindings/python

Modified Files:
Makefile.am 
Added Files:
playerc_swig_parse.py 
Removed Files:
parse.py 
Log Message:
renamed parse.py and made it an installed script. It is useful for creating 
plugable client libs to go with the plugable interfaces


--- parse.py DELETED ---

--- NEW FILE: playerc_swig_parse.py ---
#!/usr/bin/env python

import re
import string
import sys


class Rule:

def __init__(self):

self.patterns = []
self.replacements = []
self.head = ''
self.foot = ''
return


class Replace:
pass



def compile_comment():
Compile comment rule.

rule = Rule()
rule.type = 'comment'
rule.patterns += [re.compile('/\*.*?\*/', re.DOTALL)]
rule.patterns += [re.compile('//.*')]

return [rule]



def compile(prefix):
Compute the grammar.

rules = []

# Create rule for typedefs
#rule = Rule()
#rule.type = 'typedef'
#rule.patterns += [re.compile('\s*\}\s*%s_t\s*;' % prefix)]
#rules += [rule]

# Create rule for constructor
rule = Rule()
rule.type = 'constructor'
rule.patterns += [re.compile('%s_t\s*\*\s*%s_create\s*\(.*?;' % (prefix, 
prefix), re.DOTALL)]

rule.head = '\n%%extend %s\n{\n' % prefix
rule.foot = '\n}\n'

rep = Replace()
rep.src = re.compile('\s*%s_create\s*' % (prefix))
rep.dst = '%s' % prefix
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\w*\s*\)' % prefix)
rep.dst = '()'
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\w*\s*,\s*' % prefix)
rep.dst = '('
rule.replacements += [rep]

rules += [rule]

# Create rule for destructor
rule = Rule()
rule.type = 'destructor'
rule.patterns += [re.compile('\w*\s*%s_destroy\s*\(.*?;' % (prefix), 
re.DOTALL)]

rule.head = '\n%%extend %s\n{\n' % prefix
rule.foot = '\n}\n'

rep = Replace()
rep.src = re.compile('\w*\s*%s_destroy\s*' % (prefix))
rep.dst = '~%s' % prefix
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\w*\s*\)' % prefix)
rep.dst = '()'
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\w*\s*,\s*' % prefix)
rep.dst = '('
rule.replacements += [rep]

rules += [rule]

# Create rule for regular functions
rule = Rule()
rule.type = 'method'
rule.patterns += [re.compile('\w*\s*%s_\w*\s*\(.*?;' % prefix, re.DOTALL)]
#rule.patterns += [re.compile('\w*\s*%s_[a-zA-Z0-9]*\s*\(.*?;' % prefix, 
re.DOTALL)]
rule.patterns += [re.compile('\w*\s*\w*\s*%s_\w*\s*\(.*?;' % prefix, 
re.DOTALL)]
#rule.patterns += [re.compile('\w*\s*\w*\s*%s_[a-zA-Z0-9]*\s*\(.*?;' % 
prefix, re.DOTALL)]
rule.patterns += [re.compile('\w*\s*\*%s_\w*\s*\(.*?;' % prefix, re.DOTALL)]
#rule.patterns += [re.compile('\w*\s*\*%s_[a-zA-Z0-9]*\s*\(.*?;' % prefix, 
re.DOTALL)]

rule.head = '\n%%extend %s\n{\n' % prefix
rule.foot = '\n}\n'

rep = Replace()
rep.src = re.compile('%s_*' % prefix)
rep.dst = ''
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\s*\w*\s*\)' % prefix)
rep.dst = '()'
rule.replacements += [rep]

rep = Replace()
rep.src = re.compile('\(*\s*%s_t\s*\*\s*\w*\s*,\s*' % prefix)
rep.dst = '('
rule.replacements += [rep]

rules += [rule]

return rules


def extract_prefixes(instream):
Extract class prefixes.

# Remove block comments from the file
commentRule = re.compile('/\*.*?\*/', re.DOTALL)
tempstream = commentRule.sub ('', instream)
commentRule = re.compile('//.*')
tempstream = commentRule.sub ('', tempstream)

src = re.compile('playerc_\w*_create')
constructors = src.findall(tempstream)

prefixes = []
for c in constructors:
prefixes += [c[:-7]]

return prefixes


def parse_file(instream, rules):
Apply replacement rules.

outstream = ''
current_struct = None

while instream:

line = instream
m = None

for rule in rules:
# See if this line matches the rule
for pattern in rule.patterns:
m = pattern.match(line)
if m:
break
if not m:
continue

func = line[m.start():m.end()]

# Parse comment blocks
if rule.type == 'comment':
#print instream[m.start():m.end()]
instream = instream[m.end():]
outstream += func
break

# Parse function name and args
(name, sig) = string.split(func, '(', 1)
sig = '(' + sig
tokens = string.split(name)
(rval, 

[Playerstage-commit] code/player/libplayercore message.cc, 1.33, 1.34 message.h, 1.23, 1.24 player.h, 1.147, 1.148

2008-02-08 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10388/libplayercore

Modified Files:
message.cc message.h player.h 
Log Message:
added message to inform clients of queue overflows
fixed some of the replace rule logic so that the queue does not expand 
indefinately


Index: player.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/player.h,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** player.h6 Feb 2008 19:38:36 -   1.147
--- player.h9 Feb 2008 02:52:29 -   1.148
***
*** 338,341 
--- 338,348 
  } player_bool_t;
  
+ /** @brief Structure for messages returning a single integer */
+ typedef struct player_uint32
+ {
+   uint32_t value;
+ } player_uint32_t;
+ 
+ 
  /** @} */
  

Index: message.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/message.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** message.h   7 Dec 2007 01:50:14 -   1.23
--- message.h   9 Feb 2008 02:52:29 -   1.24
***
*** 426,429 
--- 426,431 
  /// @brief Flag that data was sent (in PULL mode)
  bool data_delivered;
+ /// @brief Count of the number of messages discarded due to queue 
overflow.
+ bool drop_count;
  };
  

Index: message.cc
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/message.cc,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** message.cc  7 Dec 2007 02:25:20 -   1.33
--- message.cc  9 Feb 2008 02:52:29 -   1.34
***
*** 193,196 
--- 193,197 
this-data_requested = false;
this-data_delivered = false;
+   this-drop_count = 0;
  }
  
***
*** 289,297 
(hdr-type == PLAYER_MSGTYPE_CMD))
{
! // If we're over the queue length limit, ignore the new data/cmd message
! if(this-Length = this-Maxlen)
!   return(PLAYER_PLAYER_MSG_REPLACE_RULE_IGNORE);
! else
!   return(this-Replace ? PLAYER_PLAYER_MSG_REPLACE_RULE_REPLACE : 
PLAYER_PLAYER_MSG_REPLACE_RULE_ACCEPT);
}
else
--- 290,294 
(hdr-type == PLAYER_MSGTYPE_CMD))
{
! return(this-Replace ? PLAYER_PLAYER_MSG_REPLACE_RULE_REPLACE : 
PLAYER_PLAYER_MSG_REPLACE_RULE_ACCEPT);
}
else
***
*** 471,476 
// Should we try to replace an older message of the same signature?
int replaceOp = this-CheckReplace(hdr);
!   if (replaceOp == PLAYER_PLAYER_MSG_REPLACE_RULE_IGNORE)
{
  this-Unlock();
  return(true);
--- 468,484 
// Should we try to replace an older message of the same signature?
int replaceOp = this-CheckReplace(hdr);
!   // if our queue is over size discard any data or command packets
!   // if we discard requests or replies this will potentially lock up the 
client so we will let those through
!   if (PLAYER_PLAYER_MSG_REPLACE_RULE_IGNORE == replaceOp)
{
+ // drop silently
+ this-Unlock();
+ return(true);
+   }
+   if (PLAYER_PLAYER_MSG_REPLACE_RULE_ACCEPT == replaceOp  (hdr-type == 
PLAYER_MSGTYPE_DATA ||
+   hdr-type == PLAYER_MSGTYPE_CMD)  this-Length = this-Maxlen)
+   {
+ // record the fact that we are dropping a message
+ this-drop_count++;
  this-Unlock();
  return(true);
***
*** 562,567 
  syncHeader.addr.index = 0;
  syncHeader.type = PLAYER_MSGTYPE_SYNCH;
! syncHeader.subtype = 0;
! Message* syncMessage = new Message(syncHeader, 0, 0);
  this-SetDataRequested(false,true);
  Unlock();
--- 570,586 
  syncHeader.addr.index = 0;
  syncHeader.type = PLAYER_MSGTYPE_SYNCH;
! // flag the synch with overflow subtype and count if an overflow occured
! Message* syncMessage = NULL;
! if (this-drop_count == 0)
! {
!   syncHeader.subtype = PLAYER_PLAYER_SYNCH_OK;
!   syncMessage = new Message(syncHeader, 0, 0);
! }
! else
! {
!   syncHeader.subtype = PLAYER_PLAYER_SYNCH_OVERFLOW;
!   syncMessage = new Message(syncHeader, this-drop_count, true);
!   this-drop_count = 0;
! }
  this-SetDataRequested(false,true);
  Unlock();


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ playerclient.cc, 1.29, 1.30 playerclient.h, 1.27, 1.28

2008-02-08 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10388/client_libs/libplayerc++

Modified Files:
playerclient.cc playerclient.h 
Log Message:
added message to inform clients of queue overflows
fixed some of the replace rule logic so that the queue does not expand 
indefinately


Index: playerclient.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerclient.cc,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** playerclient.cc 4 Feb 2008 18:59:43 -   1.29
--- playerclient.cc 9 Feb 2008 02:52:29 -   1.30
***
*** 234,237 
--- 234,241 
throw PlayerError(PlayerClient::Read(), playerc_error_str());
  }
+ if (mClient-overflow_count  0)
+ {
+ throw PlayerError(PlayerClient::Read(), Overflow on server);
+ }
}
  
***
*** 304,307 
--- 308,320 
  }
  
+ uint32_t PlayerClient::GetOverflowCount() 
+ {
+   ClientProxy::scoped_lock_t lock(mMutex); 
+   uint32_t count = mClient-overflow_count; 
+   mClient-overflow_count = 0; 
+   return count; 
+ }
+ 
+ 
  std::ostream
  std::operator  (std::ostream os, const PlayerCc::PlayerClient c)

Index: playerclient.h
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerclient.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** playerclient.h  17 Jan 2008 04:37:23 -  1.27
--- playerclient.h  9 Feb 2008 02:52:29 -   1.28
***
*** 279,282 
--- 279,285 
  /// Get the name for a given interface code
  std::string LookupName(int aCode) const;
+ 
+ /// Get count of the number of discarded messages on the server since the 
last call to this method
+ uint32_t GetOverflowCount();
  };
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc client.c, 1.94, 1.95 playerc.h, 1.252, 1.253

2008-02-08 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10388/client_libs/libplayerc

Modified Files:
client.c playerc.h 
Log Message:
added message to inform clients of queue overflows
fixed some of the replace rule logic so that the queue does not expand 
indefinately


Index: client.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/client.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** client.c4 Feb 2008 18:59:43 -   1.94
--- client.c9 Feb 2008 02:52:29 -   1.95
***
*** 641,648 
case PLAYER_MSGTYPE_SYNCH:
  client-data_requested = 0;
  if(!client-data_received)
  {
PLAYERC_WARN (No data recieved with SYNC);
!   return -1;
  }
  else
--- 641,652 
case PLAYER_MSGTYPE_SYNCH:
  client-data_requested = 0;
+ if (header.subtype == PLAYER_PLAYER_SYNCH_OVERFLOW)
+ {
+   client-overflow_count += *((uint32_t*)client-data);
+ }
  if(!client-data_received)
  {
PLAYERC_WARN (No data recieved with SYNC);
!   ret = -1;
  }
  else
***
*** 650,655 
if (proxy)
  *proxy = client-id;
!   return 1;
  }
case PLAYER_MSGTYPE_DATA:
  client-lasttime = client-datatime;
--- 654,661 
if (proxy)
  *proxy = client-id;
!   ret = 1;
  }
+ playerxdr_cleanup_message(client-data, header.addr.interf, 
header.type, header.subtype);
+ return ret;
case PLAYER_MSGTYPE_DATA:
  client-lasttime = client-datatime;

Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.252
retrieving revision 1.253
diff -C2 -d -r1.252 -r1.253
*** playerc.h   7 Feb 2008 02:22:59 -   1.252
--- playerc.h   9 Feb 2008 02:52:29 -   1.253
***
*** 459,462 
--- 459,466 
double retry_time;
  
+   /** How many messages were lost on the server due to overflows, incremented 
by player, cleared by user. */
+   uint32_t overflow_count;
+   
+   
/** @internal Socket descriptor */
int sock;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore/interfaces 001_player.def, 1.1, 1.2

2008-02-08 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore/interfaces
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10388/libplayercore/interfaces

Modified Files:
001_player.def 
Log Message:
added message to inform clients of queue overflows
fixed some of the replace rule logic so that the queue does not expand 
indefinately


Index: 001_player.def
===
RCS file: 
/cvsroot/playerstage/code/player/libplayercore/interfaces/001_player.def,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** 001_player.def  20 Aug 2007 06:37:26 -  1.1
--- 001_player.def  9 Feb 2008 02:52:29 -   1.2
***
*** 29,32 
--- 29,35 
  message { REQ, ADD_REPLACE_RULE, 10, player_add_replace_rule_req_t };
  
+ message { SYNCH, OK, 1, player_null_t };
+ message { SYNCH, OVERFLOW, 2, player_uint32_t };
+ 
  
  /** Device access mode: open */


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed Makefile.am, 1.22, 1.23

2008-02-07 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10550/server/drivers/mixed

Modified Files:
Makefile.am 
Log Message:
removed chatterbox until missing files are added so that make dist still works


Index: Makefile.am
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Makefile.am 7 Feb 2008 02:23:00 -   1.22
--- Makefile.am 7 Feb 2008 19:15:32 -   1.23
***
*** 1 
! SUBDIRS = chatterbox p2os reb rmp rflex botrics clodbuster nomad khepera 
evolution cmucam2 garcia irobot wbr erratic sr3000 phidgetIFK robotino mricp
--- 1 
! SUBDIRS = p2os reb rmp rflex botrics clodbuster nomad khepera evolution 
cmucam2 garcia irobot wbr erratic sr3000 phidgetIFK robotino mricp


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/chatterbox Makefile.am, 1.1, 1.2

2008-02-07 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/chatterbox
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11744/server/drivers/mixed/chatterbox

Modified Files:
Makefile.am 
Log Message:
alternate temp fix for chaterbox missing file


Index: Makefile.am
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/chatterbox/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile.am 7 Feb 2008 02:23:00 -   1.1
--- Makefile.am 7 Feb 2008 20:12:12 -   1.2
***
*** 9,13 
  AM_CPPFLAGS = -Wall -I$(top_srcdir) -I$(ROBOSTIX)/Shared 
-I$(ROBOSTIX)/gumstix/Common -I$(ROBOSTIX)/gumstix/roomba
  
! libchatterbox_la_SOURCES = cb_driver.cc cb_i2c.c cb_i2c.h
  
  # this stuff is the right way to do it, but it's not respected by 
libplayerdrivers
--- 9,14 
  AM_CPPFLAGS = -Wall -I$(top_srcdir) -I$(ROBOSTIX)/Shared 
-I$(ROBOSTIX)/gumstix/Common -I$(ROBOSTIX)/gumstix/roomba
  
! #libchatterbox_la_SOURCES = cb_driver.cc cb_i2c.c cb_i2c.h
! libchatterbox_la_SOURCES = cb_driver.cc cb_i2c.c
  
  # this stuff is the right way to do it, but it's not respected by 
libplayerdrivers


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed Makefile.am, 1.23, 1.24

2008-02-07 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11744/server/drivers/mixed

Modified Files:
Makefile.am 
Log Message:
alternate temp fix for chaterbox missing file


Index: Makefile.am
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/Makefile.am,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Makefile.am 7 Feb 2008 19:15:32 -   1.23
--- Makefile.am 7 Feb 2008 20:12:12 -   1.24
***
*** 1 
! SUBDIRS = p2os reb rmp rflex botrics clodbuster nomad khepera evolution 
cmucam2 garcia irobot wbr erratic sr3000 phidgetIFK robotino mricp
--- 1 
! SUBDIRS = chatterbox p2os reb rmp rflex botrics clodbuster nomad khepera 
evolution cmucam2 garcia irobot wbr erratic sr3000 phidgetIFK robotino mricp


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/vectormap postgis.cc, 1.7, 1.8

2008-02-06 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/vectormap
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9644/server/drivers/vectormap

Modified Files:
postgis.cc 
Log Message:
applied [ 1887730 ] Player 2.1.0rc1: Fixed postgis.cc comments and Publish calls


Index: postgis.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/vectormap/postgis.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** postgis.cc  7 Dec 2007 04:31:45 -   1.7
--- postgis.cc  6 Feb 2008 18:46:03 -   1.8
***
*** 67,70 
--- 67,72 
  driver
  (
+   name postgis
+   provides [vectormap:0]
dbname gis
host 192.168.0.2
***
*** 81,98 
  
  After the database has been installed, you will need to install the PL/pgSQL 
language extension and load the PostGIS definitions.
! - To do this do a 'sudo su' to the postgres user.
! - Change to the directory holding lwpostgis.sql (Should be 
'/usr/share/postgres-8.1-postgis/lwpostgis.sql')
! - Add the PL/pgSQL language extension: createlang plpgsql template1
! - Load the PostGIS definitions: psql -d template1 -f lwpostgis.sql
  - Create a database: createdb gis
! - Add a user account:
! - psql gis
  - CREATE ROLE username WITH LOGIN CREATEDB CREATEROLE;
  - Create a table for your geometry data
! - CREATE TABLE obstacles_geom(ID int4, NAME varchar(25))
  - Let the PostGIS extension know about your data
! - SELECT AddGeometryColumn('public', 'obstacles_geom', 'geom', 423, 
'LINESTRING', 2)
  
! Each geometry column refers to one layer in the configuration file.
  
  For more information see http://postgis.refractions.net/
--- 83,102 
  
  After the database has been installed, you will need to install the PL/pgSQL 
language extension and load the PostGIS definitions.
! - To do this switch to a postgres user (for example do a 'su - postgres').
  - Create a database: createdb gis
! - Add the PL/pgSQL language extension: createlang plpgsql gis
! - Change to the directory holding lwpostgis.sql (For example 
'/usr/share/postgres-8.1-postgis/lwpostgis.sql')
! - Load the PostGIS definitions: psql -d gis -f lwpostgis.sql
! - Run psql command interpreter: psgl gis
! - (Optionally) Add a user account:
  - CREATE ROLE username WITH LOGIN CREATEDB CREATEROLE;
  - Create a table for your geometry data
! - CREATE TABLE obstacles_geom(id int4 PRIMARY KEY, name varchar(25));
  - Let the PostGIS extension know about your data
! - SELECT AddGeometryColumn('public', 'obstacles_geom', 'geom', 423, 
'LINESTRING', 2);
! - Add column for attributes:
! - ALTER TABLE obstacles_geom ADD COLUMN attrib varchar(25);
  
! Create one database table per one layer in the configuration file.
  
  For more information see http://postgis.refractions.net/
***
*** 303,307 
PLAYER_VECTORMAP_REQ_GET_MAP_INFO,
(void*)response,
!   sizeof(player_vectormap_info_t),
NULL);
  return(0);
--- 307,311 
PLAYER_VECTORMAP_REQ_GET_MAP_INFO,
(void*)response,
!   0,
NULL);
  return(0);
***
*** 320,324 
PLAYER_VECTORMAP_REQ_GET_LAYER_DATA,
(void*)response,
!   sizeof(player_vectormap_layer_data_t),
NULL);
  
--- 324,328 
PLAYER_VECTORMAP_REQ_GET_LAYER_DATA,
(void*)response,
!   0,
NULL);
  
***
*** 338,342 
PLAYER_VECTORMAP_REQ_WRITE_LAYER,
(void*)request,
!sizeof(player_vectormap_layer_data_t),
NULL);
  return(0);
--- 342,346 
PLAYER_VECTORMAP_REQ_WRITE_LAYER,
(void*)request,
!   0,
NULL);
  return(0);


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc dev_blackboard.c, 1.9, 1.10 playerc.h, 1.250, 1.251

2008-02-06 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28583/client_libs/libplayerc

Modified Files:
dev_blackboard.c playerc.h 
Log Message:
changed blackboard interface to use a string group id instead of an integer


Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.250
retrieving revision 1.251
diff -C2 -d -r1.250 -r1.251
*** playerc.h   4 Feb 2008 18:59:43 -   1.250
--- playerc.h   6 Feb 2008 19:38:35 -   1.251
***
*** 1154,1170 
  /** @brief Subscribe to a key. If entry is none null it will be filled in 
with the response. The caller is
   * responsible for freeing it. */
! int playerc_blackboard_subscribe_to_key(playerc_blackboard_t *device, const 
char* key, int32_t group_id, player_blackboard_entry_t** entry);
  
  /** @brief Unsubscribe from a key. */
! int playerc_blackboard_unsubscribe_from_key(playerc_blackboard_t *device, 
const char* key, int32_t group_id);
  
  /** @brief Set an entry value. */
  int playerc_blackboard_set_entry(playerc_blackboard_t *device, 
player_blackboard_entry_t* entry);
  
! int playerc_blackboard_set_string(playerc_blackboard_t *device, const char* 
key, uint32_t group_id, const char* value);
  
! int playerc_blackboard_set_int(playerc_blackboard_t *device, const char* key, 
uint32_t group_id, const int value);
  
! int playerc_blackboard_set_double(playerc_blackboard_t *device, const char* 
key, uint32_t group_id, const double value);
  
  /** @} */
--- 1154,1170 
  /** @brief Subscribe to a key. If entry is none null it will be filled in 
with the response. The caller is
   * responsible for freeing it. */
! int playerc_blackboard_subscribe_to_key(playerc_blackboard_t *device, const 
char* key, const char* group, player_blackboard_entry_t** entry);
  
  /** @brief Unsubscribe from a key. */
! int playerc_blackboard_unsubscribe_from_key(playerc_blackboard_t *device, 
const char* key, const char* group);
  
  /** @brief Set an entry value. */
  int playerc_blackboard_set_entry(playerc_blackboard_t *device, 
player_blackboard_entry_t* entry);
  
! int playerc_blackboard_set_string(playerc_blackboard_t *device, const char* 
key, const char* group, const char* value);
  
! int playerc_blackboard_set_int(playerc_blackboard_t *device, const char* key, 
const char* group, const int value);
  
! int playerc_blackboard_set_double(playerc_blackboard_t *device, const char* 
key, const char* group, const double value);
  
  /** @} */

Index: dev_blackboard.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_blackboard.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** dev_blackboard.c30 Jan 2008 02:06:45 -  1.9
--- dev_blackboard.c6 Feb 2008 19:38:35 -   1.10
***
*** 54,60 
  #include sys/time.h
  
! player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, uint32_t group_id, const char *str);
! player_blackboard_entry_t *playerc_pack_blackboard_entry_int(const char* key, 
uint32_t group_id, const int i);
! player_blackboard_entry_t *playerc_pack_blackboard_entry_double(const char* 
key, uint32_t group_id, const double d);
  
  char *playerc_unpack_blackboard_entry_string(const player_blackboard_entry_t 
*entry);
--- 54,60 
  #include sys/time.h
  
! player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, const char* group, const char *str);
! player_blackboard_entry_t *playerc_pack_blackboard_entry_int(const char* key, 
const char* group, const int i);
! player_blackboard_entry_t *playerc_pack_blackboard_entry_double(const char* 
key, const char* group, const double d);
  
  char *playerc_unpack_blackboard_entry_string(const player_blackboard_entry_t 
*entry);
***
*** 66,70 
  int playerc_check_blackboard_entry_is_double(const player_blackboard_entry_t 
*entry);
  
! player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, uint32_t group_id, const char *str)
  {
struct timeval tv;
--- 66,70 
  int playerc_check_blackboard_entry_is_double(const player_blackboard_entry_t 
*entry);
  
! player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, const char* group, const char *str)
  {
struct timeval tv;
***
*** 75,83 
entry-type = PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX;
entry-subtype = PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING;
-   entry-group_id = group_id;
  
entry-key_count = strlen(key) + 1;
entry-key = malloc(entry-key_count);
memcpy(entry-key, key, entry-key_count);
  
entry-data_count = strlen(str) + 1;
--- 75,86 
entry-type = PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX;
entry-subtype = 

[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc.i, 1.30, 1.31

2008-02-06 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28583/client_libs/libplayerc/bindings/python

Modified Files:
playerc.i 
Log Message:
changed blackboard interface to use a string group id instead of an integer


Index: playerc.i
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** playerc.i   30 Jan 2008 02:06:46 -  1.30
--- playerc.i   6 Feb 2008 19:38:36 -   1.31
***
*** 431,435 
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry.key));
!   PyDict_SetItem(dict, PyString_FromString(group_id), 
PyLong_FromLong(entry.group_id));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry.type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry.subtype));
--- 431,435 
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry.key));
!   PyDict_SetItem(dict, PyString_FromString(group), 
PyString_FromString(entry.group));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry.type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry.subtype));
***
*** 495,499 
  }
  
!   PyObject * subscribe_to_key(const char *key, int group_id)
{
char *str;
--- 495,499 
  }
  
!   PyObject * subscribe_to_key(const char *key, const char *group)
{
char *str;
***
*** 504,508 
  
assert(self);
!   int result = playerc_blackboard_subscribe_to_key(self, key, group_id, 
entry);
if (result != 0)
{
--- 504,508 
  
assert(self);
!   int result = playerc_blackboard_subscribe_to_key(self, key, group, 
entry);
if (result != 0)
{
***
*** 516,520 
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry-key));
!   PyDict_SetItem(dict, PyString_FromString(group_id), 
PyLong_FromLong(entry-group_id));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry-type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry-subtype));
--- 516,520 
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry-key));
!   PyDict_SetItem(dict, PyString_FromString(group), 
PyString_FromString(entry-group));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry-type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry-subtype));
***
*** 554,557 
--- 554,558 
  PyDict_SetItem(dict, PyString_FromString(data), data);
  free(entry-key);
+ free(entry-group);
  free(entry-data);
  free(entry);
***
*** 562,566 
{
PyObject *key;
!   PyObject *group_id;
PyObject *type;
PyObject *subtype;
--- 563,567 
{
PyObject *key;
!   PyObject *group;
PyObject *type;
PyObject *subtype;
***
*** 583,587 
  
  key = PyDict_GetItem(dict, PyString_FromString(key));
! group_id = PyDict_GetItem(dict, PyString_FromString(group_id));
type = PyDict_GetItem(dict, PyString_FromString(type));
subtype = PyDict_GetItem(dict, PyString_FromString(subtype));
--- 584,588 
  
  key = PyDict_GetItem(dict, PyString_FromString(key));
! group = PyDict_GetItem(dict, PyString_FromString(group));
type = PyDict_GetItem(dict, PyString_FromString(type));
subtype = PyDict_GetItem(dict, PyString_FromString(subtype));
***
*** 590,594 
data = PyDict_GetItem(dict, PyString_FromString(data));

!   if (key == NULL || group_id == NULL || type == NULL || subtype == NULL 
|| timestamp_sec == NULL || timestamp_usec == NULL || data == NULL)
{
printf(Dictionary object missing keys.\n);
--- 591,595 
data = PyDict_GetItem(dict, PyString_FromString(data));

!   if (key == NULL || group == NULL || type == NULL || subtype == NULL || 
timestamp_sec == NULL || timestamp_usec == NULL || data == NULL)
{
printf(Dictionary object missing keys.\n);
***
*** 596,602 
}

entry.key = PyString_AsString(key);
entry.key_count = strlen(entry.key) + 1;
!   entry.group_id = PyInt_AsLong(group_id);
entry.type = PyInt_AsLong(type);
entry.subtype = PyInt_AsLong(subtype);
--- 597,640 
}

+   if (!PyString_Check(key))
+   {
+   

[Playerstage-commit] code/player/client_libs/libplayerc++ playerc++.h, 1.108, 1.109

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19666/client_libs/libplayerc++

Modified Files:
playerc++.h 
Log Message:
prevent segfault when getting ranges from sonar proxy with no data


Index: playerc++.h
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** playerc++.h 30 Jan 2008 02:06:46 -  1.108
--- playerc++.h 4 Feb 2008 19:54:27 -   1.109
***
*** 2309,2313 
  /// return a particular scan value
  double GetScan(uint32_t aIndex) const
!   { return GetVar(mDevice-scan[aIndex]); };
  /// This operator provides an alternate way of access the scan data.
  /// For example, SonarProxy[0] == SonarProxy.GetRange(0)
--- 2309,2313 
  /// return a particular scan value
  double GetScan(uint32_t aIndex) const
!   { if (GetVar(mDevice-scan_count) = aIndex) return -1; return 
GetVar(mDevice-scan[aIndex]); };
  /// This operator provides an alternate way of access the scan data.
  /// For example, SonarProxy[0] == SonarProxy.GetRange(0)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/evolution/er1 er.cc, 1.21, 1.22

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14630/server/drivers/mixed/evolution/er1

Modified Files:
er.cc 
Log Message:
fixed copy in laser pose interpolator and many compiler warnings in other 
drivers etc


Index: er.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/evolution/er1/er.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** er.cc   1 Nov 2007 22:35:56 -   1.21
--- er.cc   4 Feb 2008 19:40:27 -   1.22
***
*** 976,981 
  ER::BytesToFloat(unsigned char *ptr)
  {
!   int rawi = BytesToInt32 (ptr);
!   return *(float *)rawi;
  }
  
--- 976,981 
  ER::BytesToFloat(unsigned char *ptr)
  {
!   uint32_t rawi = BytesToInt32 (ptr);
!   return *reinterpret_castfloat *(rawi);
  }
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/map maptransform.cc, 1.3, 1.4

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/map
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14630/server/drivers/map

Modified Files:
maptransform.cc 
Log Message:
fixed copy in laser pose interpolator and many compiler warnings in other 
drivers etc


Index: maptransform.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/map/maptransform.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** maptransform.cc 1 Nov 2007 22:16:19 -   1.3
--- maptransform.cc 4 Feb 2008 19:40:27 -   1.4
***
*** 115,119 
// now, get the map data
player_map_data_t* data_req;
-   size_t reqlen;
unsigned int i,j;
unsigned int oi,oj;
--- 115,118 
***
*** 141,145 
 PLAYER_MSGTYPE_REQ,
 PLAYER_MAP_REQ_GET_DATA,
!(void*)data_req,reqlen,NULL,false)))
  {
PLAYER_ERROR(failed to get map info);
--- 140,144 
 PLAYER_MSGTYPE_REQ,
 PLAYER_MAP_REQ_GET_DATA,
!(void*)data_req,0,NULL,false)))
  {
PLAYER_ERROR(failed to get map info);


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerv pv_dev_vectormap.c, 1.2, 1.3

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31331/utils/playerv

Modified Files:
pv_dev_vectormap.c 
Log Message:
These changes were contributed by David Olsen, including:
Extensive NAV200 changes, adding new constallelation configuration options
Fix to memory leak of messages when a player client is destroyed
Fix to laser interface which assumed intensity was provided
Fix to memory leaks in vectormap interface (mainly leaking geoms)
Proper error handling in C++ PlayerClient Peek
Mutex lock in VectorMapProxy GetLayerData
playerv vectormap rendering bug 



Index: pv_dev_vectormap.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/pv_dev_vectormap.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pv_dev_vectormap.c  18 Dec 2007 05:05:09 -  1.2
--- pv_dev_vectormap.c  4 Feb 2008 18:59:44 -   1.3
***
*** 193,198 
if(GEOSCoordSeq_getSize(seq, numcoords))
{
! GEOSCoordSeq_getX(seq, ii, x2);
! GEOSCoordSeq_getY(seq, ii, y2);
  if (numcoords  2)
  {
--- 193,198 
if(GEOSCoordSeq_getSize(seq, numcoords))
{
! GEOSCoordSeq_getX(seq, 0, x2);
! GEOSCoordSeq_getY(seq, 0, y2);
  if (numcoords  2)
  {


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc client.c, 1.93, 1.94 dev_laser.c, 1.48, 1.49 dev_vectormap.c, 1.4, 1.5 playerc.h, 1.249, 1.250

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31331/client_libs/libplayerc

Modified Files:
client.c dev_laser.c dev_vectormap.c playerc.h 
Log Message:
These changes were contributed by David Olsen, including:
Extensive NAV200 changes, adding new constallelation configuration options
Fix to memory leak of messages when a player client is destroyed
Fix to laser interface which assumed intensity was provided
Fix to memory leaks in vectormap interface (mainly leaking geoms)
Proper error handling in C++ PlayerClient Peek
Mutex lock in VectorMapProxy GetLayerData
playerv vectormap rendering bug 



Index: client.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/client.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** client.c17 Jan 2008 04:37:23 -  1.93
--- client.c4 Feb 2008 18:59:43 -   1.94
***
*** 185,188 
--- 185,195 
  void playerc_client_destroy(playerc_client_t *client)
  {
+   player_msghdr_t header;
+   // Pop everything off the queue.
+   while (!playerc_client_pop(client, header, client-data))
+   {
+ playerxdr_cleanup_message(client-data,header.addr.interf, 
header.type, header.subtype);
+   }
+   
free(client-data);
free(client-write_xdrdata);
***
*** 630,633 
--- 637,641 
case PLAYER_MSGTYPE_RESP_ACK:
  PLAYERC_WARN (Discarding unclaimed ACK);
+ playerxdr_cleanup_message(client-data, header.addr.interf, 
header.type, header.subtype);
  break;
case PLAYER_MSGTYPE_SYNCH:
***
*** 670,673 
--- 678,682 
  }
default:
+ playerxdr_cleanup_message(client-data, header.addr.interf, 
header.type, header.subtype);
  PLAYERC_WARN1 (unexpected message type [%s], 
msgtype_to_str(header.type));
  printf(address: %u:%u:%s:%u\nsize: %u,

Index: dev_laser.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/dev_laser.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** dev_laser.c 17 Jan 2008 04:37:23 -  1.48
--- dev_laser.c 4 Feb 2008 18:59:43 -   1.49
***
*** 148,152 
device-point[i].px = r * cos(b);
device-point[i].py = r * sin(b);
-   device-intensity[i] = scan_data-intensity[i];
b += db;
  
--- 148,151 
***
*** 156,159 
--- 155,160 
  device-min_left = r;
  }
+ for (i = 0; i  scan_data-intensity_count; i++)
+   device-intensity[i] = scan_data-intensity[i];
  
  device-scan_id = scan_data-id;
***
*** 184,190 
device-point[i].px = r * cos(b);
device-point[i].py = r * sin(b);
-   device-intensity[i] = scan_data-scan.intensity[i];
b += db;
  }
  
  device-scan_id = scan_data-scan.id;
--- 185,192 
device-point[i].px = r * cos(b);
device-point[i].py = r * sin(b);
b += db;
  }
+ for (i = 0; i  scan_data-scan.intensity_count; i++)
+   device-intensity[i] = scan_data-scan.intensity[i];
  
  device-scan_id = scan_data-scan.id;

Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.249
retrieving revision 1.250
diff -C2 -d -r1.249 -r1.250
*** playerc.h   30 Jan 2008 02:06:45 -  1.249
--- playerc.h   4 Feb 2008 18:59:43 -   1.250
***
*** 2254,2257 
--- 2254,2259 
/** Layer info. */
player_vectormap_layer_info_t** layers_info;
+   /** geos geometry returned by get_feature_data */
+   GEOSGeom geom;
  
  } playerc_vectormap_t;
***
*** 2278,2282 
  void playerc_vectormap_cleanup(playerc_vectormap_t *device);
  
! /** @brief Get an individual feature as a geos geometry. Must only be used 
after a successful call to playerc_vectormap_get_layer_data. */
  GEOSGeom playerc_vectormap_get_feature_data(playerc_vectormap_t *device, 
unsigned layer_index, unsigned feature_index);
  
--- 2280,2285 
  void playerc_vectormap_cleanup(playerc_vectormap_t *device);
  
! /** @brief Get an individual feature as a geos geometry. Must only be used 
after a successful call to playerc_vectormap_get_layer_data.
!  *  The geos geometry is owned by the proxy, duplicate it if it is needed 
after the next call to get_feature_data. Non-reentrant. */
  GEOSGeom playerc_vectormap_get_feature_data(playerc_vectormap_t *device, 
unsigned layer_index, unsigned feature_index);
  

Index: dev_vectormap.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_vectormap.c,v
retrieving revision 1.4

[Playerstage-commit] code/player/client_libs/libplayerc++ playerclient.cc, 1.28, 1.29 vectormapproxy.cc, 1.4, 1.5

2008-02-04 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31331/client_libs/libplayerc++

Modified Files:
playerclient.cc vectormapproxy.cc 
Log Message:
These changes were contributed by David Olsen, including:
Extensive NAV200 changes, adding new constallelation configuration options
Fix to memory leak of messages when a player client is destroyed
Fix to laser interface which assumed intensity was provided
Fix to memory leaks in vectormap interface (mainly leaking geoms)
Proper error handling in C++ PlayerClient Peek
Mutex lock in VectorMapProxy GetLayerData
playerv vectormap rendering bug 



Index: vectormapproxy.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/vectormapproxy.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** vectormapproxy.cc   6 Dec 2007 22:41:46 -   1.4
--- vectormapproxy.cc   4 Feb 2008 18:59:43 -   1.5
***
*** 122,126 
--- 122,131 
  {
if (map_info_cached)
+   {
+ scoped_lock_t lock(mPc-mMutex);
  playerc_vectormap_get_layer_data(mDevice, layer_index);
+   }
+   else
+ PLAYER_ERROR(Map info not cached\n);
  }
  
***
*** 128,132 
  {
int layerCount = GetLayerCount();
!   if (layerCount  1)
  return -1;
  
--- 133,137 
  {
int layerCount = GetLayerCount();
!   if (layerCount = (int)layer_index)
  return -1;
  

Index: playerclient.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerclient.cc,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** playerclient.cc 26 Nov 2007 22:14:59 -  1.28
--- playerclient.cc 4 Feb 2008 18:59:43 -   1.29
***
*** 210,214 
ClientProxy::scoped_lock_t lock(mMutex);
//EVAL(playerc_client_peek(mClient, aTimeout));
!   return playerc_client_peek(mClient, aTimeout);
  }
  
--- 210,217 
ClientProxy::scoped_lock_t lock(mMutex);
//EVAL(playerc_client_peek(mClient, aTimeout));
!   int ret = playerc_client_peek(mClient, aTimeout);
!   if (ret  0)
! throw PlayerError(PlayerClient::Peek(), playerc_error_str());
!   return ret;
  }
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore player.h, 1.145, 1.146

2008-01-29 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv869/libplayercore

Modified Files:
player.h 
Log Message:
changed blackboard structure to have a group 


Index: player.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/player.h,v
retrieving revision 1.145
retrieving revision 1.146
diff -C2 -d -r1.145 -r1.146
*** player.h21 Jan 2008 02:58:45 -  1.145
--- player.h30 Jan 2008 02:06:46 -  1.146
***
*** 270,273 
--- 270,275 
/** Identifier for the entry. */
char* key;
+   /** Second identifier. */
+   uint32_t group_id;
/** Entry data type. */
uint16_t type;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc.i, 1.29, 1.30

2008-01-29 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv869/client_libs/libplayerc/bindings/python

Modified Files:
playerc.i 
Log Message:
changed blackboard structure to have a group 


Index: playerc.i
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** playerc.i   22 Jan 2008 20:03:29 -  1.29
--- playerc.i   30 Jan 2008 02:06:46 -  1.30
***
*** 428,439 
device-py_private = PyList_New(0);
}
!   
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry.key));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry.type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry.subtype));
PyDict_SetItem(dict, PyString_FromString(timestamp_sec), 
PyLong_FromLong(entry.timestamp_sec));
PyDict_SetItem(dict, PyString_FromString(timestamp_usec), 
PyLong_FromLong(entry.timestamp_usec));
! 
  switch(entry.subtype)
  {
--- 428,441 
device-py_private = PyList_New(0);
}
! 
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry.key));
+   PyDict_SetItem(dict, PyString_FromString(group_id), 
PyLong_FromLong(entry.group_id));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry.type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry.subtype));
PyDict_SetItem(dict, PyString_FromString(timestamp_sec), 
PyLong_FromLong(entry.timestamp_sec));
PyDict_SetItem(dict, PyString_FromString(timestamp_usec), 
PyLong_FromLong(entry.timestamp_usec));
!   
!   data = NULL;
  switch(entry.subtype)
  {
***
*** 463,469 
data = Py_None;
break;
-   
  }
! 
  PyDict_SetItem(dict, PyString_FromString(data), data);
  PyList_Append(device-py_private, dict);
--- 465,471 
data = Py_None;
break;
  }
! 
!   assert(data != NULL);
  PyDict_SetItem(dict, PyString_FromString(data), data);
  PyList_Append(device-py_private, dict);
***
*** 475,482 
PyObject *list, *copy;
int i;
if (self-py_private == NULL)
{
!   self-py_private = PyList_New(0);
!   return (PyObject*)self-py_private;
}
  
--- 477,484 
PyObject *list, *copy;
int i;
+ 
if (self-py_private == NULL)
{
!   return Py_BuildValue([]);
}
  
***
*** 493,516 
  }
  
!   PyObject * subscribe_to_key(const char *key)
{
!   char *str;
!   int i;
!   double d;
PyObject *data, *dict;
! player_blackboard_entry_t *entry;
  
assert(self);
! int result = playerc_blackboard_subscribe_to_key(self, key, entry);
! if (result != 0)
! {
!   return NULL;
! }
  
! assert(entry);
! assert(entry-key);
  
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry-key));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry-type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry-subtype));
--- 495,520 
  }
  
!   PyObject * subscribe_to_key(const char *key, int group_id)
{
!   char *str;
!   int i;
!   double d;
PyObject *data, *dict;
!   player_blackboard_entry_t *entry;
  
assert(self);
!   int result = playerc_blackboard_subscribe_to_key(self, key, group_id, 
entry);
!   if (result != 0)
!   {
!   return NULL;
!   }
  
!   assert(entry);
!   assert(entry-key);
!   assert(entry-key_count  0);
  
dict = PyDict_New();
PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry-key));
+   PyDict_SetItem(dict, PyString_FromString(group_id), 
PyLong_FromLong(entry-group_id));
PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry-type));
PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry-subtype));
***
*** 558,561 
--- 562,566 
{
PyObject *key;
+   PyObject *group_id;
PyObject *type;
PyObject *subtype;
***
*** 578,581 
--- 583,587 
  
  key = PyDict_GetItem(dict, PyString_FromString(key));
+ group_id = PyDict_GetItem(dict, PyString_FromString(group_id));
type = PyDict_GetItem(dict, PyString_FromString(type));
subtype = PyDict_GetItem(dict, PyString_FromString(subtype));
***
*** 

[Playerstage-commit] code/player/server/drivers/blackboard/localbb localbb.cpp, 1.5, 1.6

2008-01-29 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/blackboard/localbb
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv869/server/drivers/blackboard/localbb

Modified Files:
localbb.cpp 
Log Message:
changed blackboard structure to have a group 


Index: localbb.cpp
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blackboard/localbb/localbb.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** localbb.cpp 21 Jan 2008 02:58:45 -  1.5
--- localbb.cpp 30 Jan 2008 02:06:46 -  1.6
***
*** 103,111 
  typedef struct BlackBoardEntry
  {
!   /** Constructor. Sets key to an empty string. Data should be 
automatically set to empty values. */
!   BlackBoardEntry() { key = ; }
  
/** Entry label */
string key;
/** Entry data */
EntryData data;
--- 103,113 
  typedef struct BlackBoardEntry
  {
!   /** Constructor. Sets key to an empty string and group_id to 0. Data 
should be automatically set to empty values. */
!   BlackBoardEntry() { key = ; group_id = 0; }
  
/** Entry label */
string key;
+   /** Secondary identifier. */
+   uint32_t group_id;
/** Entry data */
EntryData data;
***
*** 129,132 
--- 131,136 
result.key = new char[result.key_count]; //strdup(entry.key.c_str());
memcpy(result.key, entry.key.c_str(), result.key_count);
+   assert(strlen(result.key)  0);
+   result.group_id = entry.group_id;
result.data_count = entry.data.data_count;
result.data = new uint8_t[result.data_count];
***
*** 144,147 
--- 148,152 
assert(entry.key != NULL);
result.key = string(entry.key);
+   result.group_id = entry.group_id;
result.data.data_count = entry.data_count;
result.data.data = new uint8_t[result.data.data_count];
***
*** 214,225 
/** @brief Add the key and queue combination to the listeners 
hash-map and return the entry for the key.
 * @param key Entry key.
 * @param resp_queue Player response queue of the subscriber. 
 */
!   BlackBoardEntry SubscribeKey(const string key, const 
QueuePointer resp_queue);
/** @brief Remove the key and queue combination from the 
listeners hash-map.
 * @param key Entry key.
 * @param qp Player response queue of the subscriber. 
 */
!   void UnsubscribeKey(const string key, const QueuePointer qp);
/** @brief Set the entry in the entries hashmap. *
 * @param entry BlackBoardEntry that must be put in the hashmap.
--- 219,232 
/** @brief Add the key and queue combination to the listeners 
hash-map and return the entry for the key.
 * @param key Entry key.
+* @param group_id Second identifier.
 * @param resp_queue Player response queue of the subscriber. 
 */
!   BlackBoardEntry SubscribeKey(const string key, uint32_t 
group_id, const QueuePointer resp_queue);
/** @brief Remove the key and queue combination from the 
listeners hash-map.
 * @param key Entry key.
+* @param group_id Second identifier.
 * @param qp Player response queue of the subscriber. 
 */
!   void UnsubscribeKey(const string key, uint32_t group_id, const 
QueuePointer qp);
/** @brief Set the entry in the entries hashmap. *
 * @param entry BlackBoardEntry that must be put in the hashmap.
***
*** 235,241 
// Internal blackboard data
/** Map of labels to entry data. */
!   mapstring, BlackBoardEntry entries;
/** Map of labels to listening queues. */
!   mapstring, vectorQueuePointer  listeners;
  };
  
--- 242,248 
// Internal blackboard data
/** Map of labels to entry data. */
!   mapuint32_t, mapstring, BlackBoardEntry  entries;
/** Map of labels to listening queues. */
!   mapuint32_t, mapstring, vectorQueuePointer   listeners;
  };
  
***
*** 317,321 
// Add the device to the listeners map
player_blackboard_entry_t *request = 
reinterpret_castplayer_blackboard_entry_t*(data);
!   BlackBoardEntry current_value = SubscribeKey(request-key , resp_queue);
  
// Get the entry for the given key
--- 324,328 
// Add the device to the listeners map
player_blackboard_entry_t *request = 
reinterpret_castplayer_blackboard_entry_t*(data);
!   BlackBoardEntry current_value = SubscribeKey(request-key, 
request-group_id, resp_queue);
  
// Get the entry for the given key
***
*** 354,358 
// 

[Playerstage-commit] code/player/server/drivers/camera/1394 camera1394.cc, 1.38, 1.39

2008-01-29 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15293/server/drivers/camera/1394

Modified Files:
camera1394.cc 
Log Message:
fixed build for version 1 API of camera1394

Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** camera1394.cc   28 Jan 2008 04:56:22 -  1.38
--- camera1394.cc   30 Jan 2008 07:00:52 -  1.39
***
*** 1207,1211 
frame_width = this-camera.frame_width;
frame_height = this-camera.frame_height;
!   capture_buffer = this-camera.capture_buffer;
  #endif
  
--- 1207,1211 
frame_width = this-camera.frame_width;
frame_height = this-camera.frame_height;
!   capture_buffer = (uint8_t *) this-camera.capture_buffer;
  #endif
  
***
*** 1216,1220 
//delete [] this-data.image;
//this-data.image = NULL;
!   int old_image_count = this-data.image_count;
switch (this-mode)
{
--- 1216,1220 
//delete [] this-data.image;
//this-data.image = NULL;
!   unsigned int old_image_count = this-data.image_count;
switch (this-mode)
{


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerv pv_dev_laser.c, 1.2, 1.3

2008-01-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4885/utils/playerv

Modified Files:
pv_dev_laser.c 
Log Message:
applied patch [ 1852769 ] PlayerV support changing Laser Config


Index: pv_dev_laser.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/pv_dev_laser.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pv_dev_laser.c  1 Nov 2007 22:16:23 -   1.2
--- pv_dev_laser.c  28 Jan 2008 02:08:36 -  1.3
***
*** 33,37 
  
  // Update the laser configuration
! //void laser_update_config(laser_t *laser);
  
  // Draw the laser scan
--- 33,37 
  
  // Update the laser configuration
! void laser_update_config(laser_t *laser);
  
  // Draw the laser scan
***
*** 60,72 
laser-subscribe_item = rtk_menuitem_create(laser-menu, Subscribe, 1);
laser-style_item = rtk_menuitem_create(laser-menu, Filled, 1);
  #if 0
laser-res025_item = rtk_menuitem_create(laser-menu, 0.25 deg 
resolution, 1);
laser-res050_item = rtk_menuitem_create(laser-menu, 0.50 deg 
resolution, 1);
laser-res100_item = rtk_menuitem_create(laser-menu, 1.00 deg 
resolution, 1);
! 
laser-range_mm_item = rtk_menuitem_create(laser-menu, mm Range 
Resolution,1);
laser-range_cm_item = rtk_menuitem_create(laser-menu, cm Range 
Resolution,1);
laser-range_dm_item = rtk_menuitem_create(laser-menu, dm Range 
Resolution,1);
- #endif
  
// Set the initial menu state
--- 60,72 
laser-subscribe_item = rtk_menuitem_create(laser-menu, Subscribe, 1);
laser-style_item = rtk_menuitem_create(laser-menu, Filled, 1);
+ 
  #if 0
laser-res025_item = rtk_menuitem_create(laser-menu, 0.25 deg 
resolution, 1);
laser-res050_item = rtk_menuitem_create(laser-menu, 0.50 deg 
resolution, 1);
laser-res100_item = rtk_menuitem_create(laser-menu, 1.00 deg 
resolution, 1);
! #endif
laser-range_mm_item = rtk_menuitem_create(laser-menu, mm Range 
Resolution,1);
laser-range_cm_item = rtk_menuitem_create(laser-menu, cm Range 
Resolution,1);
laser-range_dm_item = rtk_menuitem_create(laser-menu, dm Range 
Resolution,1);
  
// Set the initial menu state
***
*** 94,101 
rtk_menuitem_destroy(laser-res050_item);
rtk_menuitem_destroy(laser-res100_item);
rtk_menuitem_destroy(laser-range_mm_item);
rtk_menuitem_destroy(laser-range_cm_item);
rtk_menuitem_destroy(laser-range_dm_item);
- #endif
rtk_menuitem_destroy(laser-subscribe_item);
rtk_menuitem_destroy(laser-style_item);
--- 94,101 
rtk_menuitem_destroy(laser-res050_item);
rtk_menuitem_destroy(laser-res100_item);
+ #endif
rtk_menuitem_destroy(laser-range_mm_item);
rtk_menuitem_destroy(laser-range_cm_item);
rtk_menuitem_destroy(laser-range_dm_item);
rtk_menuitem_destroy(laser-subscribe_item);
rtk_menuitem_destroy(laser-style_item);
***
*** 127,130 
--- 127,131 
   laser-proxy-pose[1],
   laser-proxy-pose[2]);
+ 
  }
}
***
*** 138,146 
  
// Making config changes here causes X to go nuts.  Don't know why - BPG
- #if 0
// Update the configuration stuff
if (laser-proxy-info.subscribed)
  laser_update_config(laser);
- #endif

if (laser-proxy-info.subscribed)
--- 139,145 
***
*** 161,173 
  
  
- #if 0
  // Update the laser configuration
  void laser_update_config(laser_t *laser)
  {
int update;
!   double min, max;
!   int res, intensity, range_res;

update = 0;
if (rtk_menuitem_isactivated(laser-res025_item))
{
--- 160,179 
  
  
  // Update the laser configuration
  void laser_update_config(laser_t *laser)
  {
int update;
!   double min, max, range_res, res, scanning_frequency;
!   unsigned char  intensity;

+   min = laser-proxy-scan_start;
+   max = laser-proxy-scan_start + 
laser-proxy-scan_count*laser-proxy-scan_res;
+   range_res = laser-proxy-range_res;
+   res = laser-proxy-scan_res;
+   scanning_frequency = laser-proxy-scanning_frequency;
+   intensity = laser-proxy-intensity_on;
+ 
update = 0;
+ #if 0
if (rtk_menuitem_isactivated(laser-res025_item))
{
***
*** 182,196 
  res = 100; min = -M_PI/2; max = +M_PI/2; update = 1;
}
  
if (rtk_menuitem_isactivated(laser-range_mm_item)) {
! range_res = 1;
  update = 1;
}
if (rtk_menuitem_isactivated(laser-range_cm_item)) {
! range_res = 10;
  update = 1;
}
if (rtk_menuitem_isactivated(laser-range_dm_item)) {
! range_res = 100;
  update = 1;
}
--- 188,203 
  res = 100; min = -M_PI/2; max = +M_PI/2; update = 1;
}
+ #endif
  
if (rtk_menuitem_isactivated(laser-range_mm_item)) {
! range_res = .001;
  update = 1;
}
if 

[Playerstage-commit] code/player/server/drivers/blobfinder/cmvision P2CMV.cc, 1.32, 1.33

2008-01-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/blobfinder/cmvision
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11283/server/drivers/blobfinder/cmvision

Modified Files:
P2CMV.cc 
Log Message:
applied [ 1872307 ] problem with basic math in cmvision (Player 2.1.0-rc1)

Index: P2CMV.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blobfinder/cmvision/P2CMV.cc,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** P2CMV.cc3 Dec 2007 22:52:12 -   1.32
--- P2CMV.cc28 Jan 2008 02:26:32 -  1.33
***
*** 338,343 
  if (mData.blobs_count = allocated_blobs)
  {
-   mData.blobs = 
(player_blobfinder_blob_t*)realloc(mData.blobs,sizeof(mData.blobs[0])*mData.blobs_count+1);
allocated_blobs = mData.blobs_count+1;
  }
  
--- 338,343 
  if (mData.blobs_count = allocated_blobs)
  {
allocated_blobs = mData.blobs_count+1;
+   mData.blobs = 
(player_blobfinder_blob_t*)realloc(mData.blobs,sizeof(mData.blobs[0])*allocated_blobs);
  }
  
***
*** 370,381 
TestPattern();
  
- /* got the data. now publish it */
- uint32_t size = sizeof(mData) - sizeof(mData.blobs) +
- mData.blobs_count * sizeof(mData.blobs[0]);
- 
- 
  Publish(device_addr, 
PLAYER_MSGTYPE_DATA, PLAYER_BLOBFINDER_DATA_BLOBS,
!   reinterpret_castvoid*(mData), size, NULL);
  }
  
--- 370,376 
TestPattern();
  
  Publish(device_addr, 
PLAYER_MSGTYPE_DATA, PLAYER_BLOBFINDER_DATA_BLOBS,
!   reinterpret_castvoid*(mData));
  }
  


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/camera/1394 camera1394.cc, 1.37, 1.38

2008-01-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32041/server/drivers/camera/1394

Modified Files:
camera1394.cc 
Log Message:
Apllied patches
[ 1874354 ] camera1394 fixes and Mac OS X support
[ 1875070 ] camera1394: allow setting of ISO speed

Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** camera1394.cc   12 Dec 2007 19:15:59 -  1.37
--- camera1394.cc   28 Jan 2008 04:56:22 -  1.38
***
*** 141,144 
--- 141,148 
- Default: 4
- the number of DMA buffers to use
+ 
+ - iso_speed (unsigned int)
+   - Default: 400
+   - Sets the data rate of the 1394 bus. Valid rates are 100, 200, 400, 800, 
1600, 3200.
  @par Example 
  
***
*** 165,171 
  #include stddef.h   // for NULL
  #include unistd.h
! #include libraw1394/raw1394.h
  #if DC1394_DMA_SETUP_CAPTURE_ARGS == 20
  #include dc1394/control.h
  #else
  #include libdc1394/dc1394_control.h
--- 169,180 
  #include stddef.h   // for NULL
  #include unistd.h
! 
! #ifdef HAVE_LIBRAW1394
! #include libraw1394/raw1394.h
! #endif
! 
  #if DC1394_DMA_SETUP_CAPTURE_ARGS == 20
  #include dc1394/control.h
+ #define LIBDC1394_VERSION  0200
  #else
  #include libdc1394/dc1394_control.h
***
*** 180,185 
  
  
! // lots of defines are renames in v2 API, mask this so we dont ahve to modify 
all our code
! #if LIBDC1394_VERSION == 0200
  // Frame rate enum
  #define FRAMERATE_1_875 DC1394_FRAMERATE_1_875
--- 189,195 
  
  
! // lots of defines are renames in v2 API, mask this so we dont have to
! // modify all our code
! #if DC1394_DMA_SETUP_CAPTURE_ARGS == 20
  // Frame rate enum
  #define FRAMERATE_1_875 DC1394_FRAMERATE_1_875
***
*** 257,267 
  #define FEATURE_CAPTURE_QUALITY DC1394_FEATURE_CAPTURE_QUALITY
  
  // speed enumerations
! #define DC1394_SPEED_100 DC1394_ISO_SPEED_100
! #define DC1394_SPEED_200 DC1394_ISO_SPEED_200,
! #define DC1394_SPEED_400 DC1394_ISO_SPEED_400,
! #define DC1394_SPEED_800 DC1394_ISO_SPEED_800,
! #define DC1394_SPEED_1600 DC1394_ISO_SPEED_1600,
! #define DC1394_SPEED_3200 DC1394_ISO_SPEED_3200
  
  #endif
--- 267,279 
  #define FEATURE_CAPTURE_QUALITY DC1394_FEATURE_CAPTURE_QUALITY
  
+ #else
+ 
  // speed enumerations
! #define DC1394_ISO_SPEED_100 SPEED_100
! #define DC1394_ISO_SPEED_200 SPEED_200
! #define DC1394_ISO_SPEED_400 SPEED_400
! #define DC1394_ISO_SPEED_800 SPEED_800
! #define DC1394_ISO_SPEED_1600 SPEED_1600
! #define DC1394_ISO_SPEED_3200 SPEED_3200
  
  #endif
***
*** 289,293 
private: int GrabFrame();
  
!   private: unsigned char * resized;//[1280 * 960 * 3];
  
// Save a frame to disk
--- 301,305 
private: int GrabFrame();
  
!   private: uint8_t * resized;//[1280 * 960 * 3];
  
// Save a frame to disk
***
*** 300,304 
--- 312,320 
private: unsigned int port;
private: unsigned int node;
+ 
+ #ifdef HAVE_LIBRAW1394
private: raw1394handle_t handle;
+ #endif
+ 
  #if LIBDC1394_VERSION == 0200
private: dc1394camera_t * camera;
***
*** 322,329 
--- 338,347 
private: unsigned int format;
private: dc1394video_mode_t mode;
+   private: dc1394speed_t iso_speed;
  #else
private: unsigned int frameRate;
private: unsigned int format;
private: unsigned int mode;
+   private: unsigned int iso_speed;
  #endif
  
***
*** 383,387 
--- 401,407 
resized=NULL;
  
+ #ifdef HAVE_LIBRAW1394
this-handle = NULL;
+ #endif
this-method = methodNone;
  
***
*** 646,649 
--- 666,690 
this-num_dma_buffers = cf-ReadInt(section, dma_buffers, 
NUM_DMA_BUFFERS);
  
+   // ISO Speed?
+   switch(cf-ReadInt(section, iso_speed, 400)) {
+ case 100:
+   this-iso_speed = DC1394_ISO_SPEED_100;
+   break;
+ case 200:
+   this-iso_speed = DC1394_ISO_SPEED_200;
+   break;
+ case 400:
+   this-iso_speed = DC1394_ISO_SPEED_400;
+   break;
+ case 800:
+   this-iso_speed = DC1394_ISO_SPEED_800;
+   break;
+ case 1600:
+   this-iso_speed = DC1394_ISO_SPEED_1600;
+   break;
+ case 3200:
+   this-iso_speed = DC1394_ISO_SPEED_3200;
+   break;
+   }
this-data.compression = PLAYER_CAMERA_COMPRESS_RAW;

***
*** 661,665 
if (this-camera)
{
! dc1394_cleanup_iso_channels_and_bandwidth(camera);
  switch (this-method)
  {
--- 702,710 
if (this-camera)
{
! //dc1394_cleanup_iso_channels_and_bandwidth(camera);
! /* The above function has been removed from libdc1394 without a clear
!replacement...
!   

[Playerstage-commit] code/player acinclude.m4,1.150,1.151

2008-01-27 Thread Toby Collett
Update of /cvsroot/playerstage/code/player
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32041

Modified Files:
acinclude.m4 
Log Message:
Apllied patches
[ 1874354 ] camera1394 fixes and Mac OS X support
[ 1875070 ] camera1394: allow setting of ISO speed

Index: acinclude.m4
===
RCS file: /cvsroot/playerstage/code/player/acinclude.m4,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** acinclude.m418 Dec 2007 05:05:08 -  1.150
--- acinclude.m428 Jan 2008 04:56:22 -  1.151
***
*** 164,182 
  
  dnl Check to see if we have version 1 or 2 API for dc1394
! 
AC_CHECK_HEADER(dc1394/control.h,[PLAYER_ADD_DRIVER([camera1394],[yes],[libraw1394/raw1394.h
 dc1394/control.h],[],[-lraw1394 -ldc1394])],
!   [PLAYER_ADD_DRIVER([camera1394],[yes],[libraw1394/raw1394.h 
libdc1394/dc1394_control.h],[],[-lraw1394 -ldc1394_control])])
! 
! dnl libdc1394 has varying API's, depending on the version.  Do some checks
  dnl to see what the function signatures look like
! if test x$enable_camera1394 = xyes; then
! 
!   dc1394_dma_setup_args=0
! 
!   AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
! [[#include dc1394/control.h]],
! []),
! dc1394_dma_setup_args=20)
! 
!   AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
  [[#include libdc1394/dc1394_control.h]],
  [[dc1394_dma_setup_capture(NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL)]]),
--- 164,179 
  
  dnl Check to see if we have version 1 or 2 API for dc1394
! dnl libdc1394 v1 has varying API's, depending on the version.  So also do 
some checks
  dnl to see what the function signatures look like
! dc1394_dma_setup_args=0
! AC_CHECK_HEADER(dc1394/control.h,
!   [dc1394_dma_setup_args=20
! AC_CHECK_HEADER(
!   libraw1394/raw1394.h,
!   [PLAYER_ADD_DRIVER([camera1394],[yes],[libraw1394/raw1394.h 
dc1394/control.h],[],[-lraw1394 -ldc1394])],
!   
[PLAYER_ADD_DRIVER([camera1394],[yes],[dc1394/control.h],[],[-ldc1394])],
! )
!   ],
!   [AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
  [[#include libdc1394/dc1394_control.h]],
  [[dc1394_dma_setup_capture(NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL)]]),
***
*** 187,194 
  [[dc1394_dma_setup_capture(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 
NULL)]]),
  dc1394_dma_setup_args=12)
  
!   AC_DEFINE_UNQUOTED(DC1394_DMA_SETUP_CAPTURE_ARGS, $dc1394_dma_setup_args,
[arg count for dma capture function])
! fi
  
  PLAYER_ADD_DRIVER([cameracompress],[yes],[jpeglib.h],[],[-ljpeg])
--- 184,195 
  [[dc1394_dma_setup_capture(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 
NULL)]]),
  dc1394_dma_setup_args=12)
+   
+   
+   PLAYER_ADD_DRIVER([camera1394],[yes],[libraw1394/raw1394.h 
libdc1394/dc1394_control.h],[],[-lraw1394 -ldc1394_control])]
+ )
  
! AC_DEFINE_UNQUOTED(DC1394_DMA_SETUP_CAPTURE_ARGS, $dc1394_dma_setup_args,
[arg count for dma capture function])
! 
  
  PLAYER_ADD_DRIVER([cameracompress],[yes],[jpeglib.h],[],[-ljpeg])


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/rflex rflex.cc, 1.42, 1.43

2008-01-23 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/rflex
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28964/server/drivers/mixed/rflex

Modified Files:
rflex.cc 
Log Message:
added memory allocation for ir poses in rflex


Index: rflex.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex.cc,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** rflex.cc23 Jan 2008 03:43:59 -  1.42
--- rflex.cc23 Jan 2008 19:14:02 -  1.43
***
*** 750,753 
--- 750,755 
rflex_configs.ir_b=new double[pose_count];
rflex_configs.ir_poses.poses_count=pose_count;
+   rflex_configs.ir_poses.poses=(player_pose3d_t *)
+   malloc(rflex_configs.ir_poses.poses_count*sizeof(player_pose3d_t));
unsigned int RunningTotal = 0;
for(int i=0; i  rflex_configs.ir_bank_count; ++i)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/rflex rflex.cc, 1.41, 1.42

2008-01-22 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/rflex
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10920/server/drivers/mixed/rflex

Modified Files:
rflex.cc 
Log Message:
removed old asserts from rflex


Index: rflex.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex.cc,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** rflex.cc2 Dec 2007 09:11:13 -   1.41
--- rflex.cc23 Jan 2008 03:43:59 -  1.42
***
*** 360,369 
  {
assert(hdr);
-   assert(data);
  
if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_SONAR_REQ_POWER,
  sonar_id))
{
- assert(hdr-size == sizeof(player_sonar_power_config));
  Lock();
  if(reinterpret_castplayer_sonar_power_config_t * (data)-state==0)
--- 360,367 
***
*** 378,382 
  sonar_id_2))
{
- assert(hdr-size == sizeof(player_sonar_power_config));
  Lock();
  if(reinterpret_castplayer_sonar_power_config_t * (data)-state==0)
--- 376,379 
***
*** 391,396 
  sonar_id))
{
- assert(hdr-size == 0);
- 
  player_sonar_geom_t geom;
  Lock();
--- 388,391 
***
*** 409,414 
  sonar_id_2))
{
- assert(hdr-size == 0);
- 
  player_sonar_geom_t geom;
  Lock();
--- 404,407 
***
*** 427,432 
  bumper_id))
{
- assert(hdr-size == 0);
- 
  player_bumper_geom_t geom;
  Lock();
--- 420,423 
***
*** 451,455 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_IR_REQ_POWER, 
ir_id))
{
- assert(hdr-size == sizeof(player_ir_power_req_t));
  player_ir_power_req_t * req = reinterpret_castplayer_ir_power_req_t* 
(data);
  Lock();
--- 442,445 
***
*** 464,469 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_SET_ODOM, position_id))
{
- assert(hdr-size == sizeof(player_position2d_set_odom_req));
- 
  player_position2d_set_odom_req * set_odom_req = 
reinterpret_castplayer_position2d_set_odom_req* (data);
  Lock();
--- 454,457 
***
*** 475,480 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_MOTOR_POWER, position_id))
{
- assert(hdr-size == sizeof(player_position2d_power_config_t));
- 
  Lock();
  if(((player_position2d_power_config_t*)data)-state==0)
--- 463,466 
***
*** 488,492 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_VELOCITY_MODE, position_id))
{
- assert(hdr-size == sizeof(player_position2d_velocity_mode_config_t));
  // Does nothing, needs to be implemented
  Publish(position_id, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr-subtype);
--- 474,477 
***
*** 503,508 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_GET_GEOM, position_id))
{
- assert(hdr-size == 0);
- 
  player_position2d_geom_t geom={{0}};
  Lock();
--- 488,491 
***
*** 515,519 
else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_CMD, 
PLAYER_POSITION2D_CMD_VEL, position_id))
{
- assert(hdr-size == sizeof(player_position2d_cmd_vel_t));
  Lock();
  command = *reinterpret_castplayer_position2d_cmd_vel_t * (data);
--- 498,501 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ blackboardproxy.cc, 1.2, 1.3

2008-01-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/client_libs/libplayerc++

Modified Files:
blackboardproxy.cc 
Log Message:
changes to blackboard interface and client proxies


Index: blackboardproxy.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/blackboardproxy.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** blackboardproxy.cc  26 Nov 2007 22:14:59 -  1.2
--- blackboardproxy.cc  21 Jan 2008 02:58:45 -  1.3
***
*** 103,107 
player_blackboard_entry_t *result = new player_blackboard_entry_t;
memset(result, 0, sizeof(player_blackboard_entry_t));
-   result-interf = pointer-interf;
result-type = pointer-type;
result-subtype = pointer-subtype;
--- 103,106 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore player.h, 1.144, 1.145

2008-01-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/libplayercore

Modified Files:
player.h 
Log Message:
changes to blackboard interface and client proxies


Index: player.h
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/player.h,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** player.h6 Dec 2007 00:20:28 -   1.144
--- player.h21 Jan 2008 02:58:45 -  1.145
***
*** 270,279 
/** Identifier for the entry. */
char* key;
-   /** Entry interface type. */
-   uint16_t interf;
/** Entry data type. */
!   uint8_t type;
/** Entry data subtype. */
!   uint8_t subtype;
/** Entry data length. */
uint32_t data_count;
--- 270,277 
/** Identifier for the entry. */
char* key;
/** Entry data type. */
!   uint16_t type;
/** Entry data subtype. */
!   uint16_t subtype;
/** Entry data length. */
uint32_t data_count;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc dev_blackboard.c, 1.6, 1.7 playerc.h, 1.246, 1.247

2008-01-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/client_libs/libplayerc

Modified Files:
dev_blackboard.c playerc.h 
Log Message:
changes to blackboard interface and client proxies


Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.246
retrieving revision 1.247
diff -C2 -d -r1.246 -r1.247
*** playerc.h   17 Jan 2008 04:37:23 -  1.246
--- playerc.h   21 Jan 2008 02:58:45 -  1.247
***
*** 1120,1123 
--- 1120,1132 
  @{ */
  
+ #define PLAYERC_BLACKBOARD_DATA_TYPE_NONE   0
+ #define PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE 1
+ #define PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX2
+ 
+ #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_NONE0
+ #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING  1
+ #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT 2
+ #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_DOUBLE  3
+ 
  /** @brief BlackBoard proxy. */
  typedef struct
***
*** 1151,1155 
  int playerc_blackboard_set_entry(playerc_blackboard_t *device, 
player_blackboard_entry_t* entry);
  
! //player_blackboard_entry_t 
playerc_blackboard_subscribe_to_key2(playerc_blackboard_t *device, const char* 
key);
  
  /** @} */
--- 1160,1168 
  int playerc_blackboard_set_entry(playerc_blackboard_t *device, 
player_blackboard_entry_t* entry);
  
! int playerc_blackboard_set_string(playerc_blackboard_t *device, const char* 
key, const char* value);
! 
! int playerc_blackboard_set_int(playerc_blackboard_t *device, const char* key, 
const int value);
! 
! int playerc_blackboard_set_double(playerc_blackboard_t *device, const char* 
key, const double value);
  
  /** @} */

Index: dev_blackboard.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_blackboard.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dev_blackboard.c17 Jan 2008 04:37:23 -  1.6
--- dev_blackboard.c21 Jan 2008 02:58:45 -  1.7
***
*** 52,55 
--- 52,211 
  #include error.h
  #include libplayerxdr/playerxdr.h
+ #include sys/time.h
+ 
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, const char *str);
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_int(const char* key, 
const int i);
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_double(const char* 
key, const double d);
+ 
+ char *playerc_unpack_blackboard_entry_string(const player_blackboard_entry_t 
*entry);
+ int playerc_unpack_blackboard_entry_int(const player_blackboard_entry_t 
*entry);
+ double playerc_unpack_blackboard_entry_double(const player_blackboard_entry_t 
*entry);
+ 
+ int playerc_check_blackboard_entry_is_string(const player_blackboard_entry_t 
*entry);
+ int playerc_check_blackboard_entry_is_int(const player_blackboard_entry_t 
*entry);
+ int playerc_check_blackboard_entry_is_double(const player_blackboard_entry_t 
*entry);
+ 
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_string(const char* 
key, const char *str)
+ {
+   struct timeval tv;
+   player_blackboard_entry_t *entry = 
malloc(sizeof(player_blackboard_entry_t));
+   assert(entry);
+   memset(entry, 0, sizeof(entry));
+ 
+   entry-type = PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX;
+   entry-subtype = PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING;
+ 
+   entry-key_count = strlen(key) + 1;
+   entry-key = malloc(entry-key_count);
+   memcpy(entry-key, key, entry-key_count);
+ 
+   entry-data_count = strlen(str) + 1;
+   entry-data = malloc(sizeof(int)*entry-data_count);
+   memcpy(entry-data, str, entry-data_count);
+ 
+   gettimeofday(tv, NULL);
+   entry-timestamp_sec = tv.tv_sec;
+   entry-timestamp_usec = tv.tv_usec;
+ 
+   return entry;
+ }
+ 
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_int(const char* key, 
const int i)
+ {
+   struct timeval tv;
+   player_blackboard_entry_t *entry = 
malloc(sizeof(player_blackboard_entry_t));
+   assert(entry);
+   memset(entry, 0, sizeof(entry));
+ 
+   entry-type = PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE;
+   entry-subtype = PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT;
+ 
+   entry-key_count = strlen(key) + 1;
+   entry-key = malloc(entry-key_count);
+   memcpy(entry-key, key, entry-key_count);
+ 
+   entry-data_count = sizeof(int);
+   entry-data = malloc(sizeof(int)*entry-data_count);
+   memcpy(entry-data, i, entry-data_count);
+ 
+   gettimeofday(tv, NULL);
+   entry-timestamp_sec = tv.tv_sec;
+   entry-timestamp_usec = tv.tv_usec;
+ 
+   return entry;
+ }
+ 
+ player_blackboard_entry_t *playerc_pack_blackboard_entry_double(const char* 
key, const double d)
+ {
+   struct timeval tv;
+   player_blackboard_entry_t *entry = 
malloc(sizeof(player_blackboard_entry_t));
+   assert(entry);
+   memset(entry, 0, sizeof(entry));
+ 

[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc.i, 1.27, 1.28

2008-01-20 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/client_libs/libplayerc/bindings/python

Modified Files:
playerc.i 
Log Message:
changes to blackboard interface and client proxies


Index: playerc.i
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** playerc.i   17 Jan 2008 04:37:23 -  1.27
--- playerc.i   21 Jan 2008 02:58:45 -  1.28
***
*** 56,61 
  
  
- // Special rules for functions that return multiple results via pointers
- 
  // For playerc_simulation_get_pose2d()
  %apply double *OUTPUT { double *x, double *y, double *a };
--- 56,59 
***
*** 416,417 
--- 414,530 
  };
  }
+ 
+ %extend playerc_blackboard
+ {
+   PyObject * subscribe_to_key(const char *key)
+   {
+   char *str = NULL;
+   int i = 0;
+   double d = 0.0;
+   PyObject *data;
+ PyObject *dict = PyDict_New();
+ player_blackboard_entry_t **out;
+ player_blackboard_entry_t *entry;
+ entry = NULL;
+ int result = playerc_blackboard_subscribe_to_key(self, key, out);
+ if (result != 0)
+ {
+   return NULL;
+ }
+ assert(out);
+ entry = *out;
+ assert(entry);
+ assert(entry-key);
+ /*printf(key=%s\n,entry-key);
+ printf(type=%d\n,entry-type);
+ printf(subtype=%d\n,entry-subtype);
+ printf(timestamp_sec=%d\n,entry-timestamp_sec);
+ printf(timestamp_usec=%d\n,entry-timestamp_usec);*/
+   PyDict_SetItem(dict, PyString_FromString(key), 
PyString_FromString(entry-key));
+   PyDict_SetItem(dict, PyString_FromString(type), 
PyLong_FromLong(entry-type));
+   PyDict_SetItem(dict, PyString_FromString(subtype), 
PyLong_FromLong(entry-subtype));
+   PyDict_SetItem(dict, PyString_FromString(timestamp_sec), 
PyLong_FromLong(entry-timestamp_sec));
+   PyDict_SetItem(dict, PyString_FromString(timestamp_usec), 
PyLong_FromLong(entry-timestamp_usec));
+ 
+ switch(entry-subtype)
+ {
+   case PLAYERC_BLACKBOARD_DATA_SUBTYPE_NONE:
+   data = Py_None;
+   printf(data = Py_None\n);
+   break;
+   case PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING:
+   assert(entry-type == PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX);
+   assert(entry-subtype == 
PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING);
+   str = malloc(entry-data_count);
+   assert(str);
+   memcpy(str, entry-data, entry-data_count);
+   /*printf(data = %s\n, str);*/
+   data = PyString_FromString(str);
+   free(str);
+   break;
+   case PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT:
+   assert(entry-type == PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE);
+   assert(entry-subtype == 
PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT);
+   i = 0;
+   memcpy(i, entry-data, entry-data_count);
+   /*printf(data = %d\n, i);*/
+   data = PyLong_FromLong(i);
+   break;
+   case PLAYERC_BLACKBOARD_DATA_SUBTYPE_DOUBLE:
+   assert(entry-type == PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE);
+   assert(entry-subtype == 
PLAYERC_BLACKBOARD_DATA_SUBTYPE_DOUBLE);
+   d = 0.0;
+   memcpy(d, entry-data, entry-data_count);
+   /*printf(data = %f\n,d);*/
+   data = PyFloat_FromDouble(d);
+   break;
+   default:
+   /*printf(data = defaulted to Py_None\n);*/
+   data = Py_None;
+   break;
+   
+ }
+ 
+ PyDict_SetItem(dict, PyString_FromString(data), data);
+ 
+ return dict;
+   }
+   
+   PyObject *set_entry(const char* str_key, PyObject *dict)
+   {
+   PyObject *key;
+   PyObject *type;
+   PyObject *subtype;
+   PyObject *timestamp_sec;
+   PyObject *timestamp_usec;
+ 
+ player_blackboard_entry_t entry;
+ memset(entry, 0, sizeof(player_blackboard_entry_t));
+ 
+ key = PyDict_GetItem(dict, PyString_FromString(key));
+   type = PyDict_GetItem(dict, PyString_FromString(type));
+   subtype = PyDict_GetItem(dict, PyString_FromString(subtype));
+   timestamp_sec = PyDict_GetItem(dict, 
PyString_FromString(timestamp_sec));
+   timestamp_usec = PyDict_GetItem(dict, 
PyString_FromString(timestamp_usec));
+   
+   entry.type = PyInt_AsLong(type);
+   entry.subtype = PyInt_AsLong(subtype);
+   entry.timestamp_sec = PyInt_AsLong(timestamp_sec);
+   entry.timestamp_usec = PyInt_AsLong(timestamp_usec);
+ 
+ /*printf(key=%s\n,entry.key);
+ printf(type=%d\n,entry.type);
+ printf(subtype=%d\n,entry.subtype);

[Playerstage-commit] code/player/server/drivers/blackboard/localbb localbb.cpp, 1.4, 1.5

2008-01-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/blackboard/localbb
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2884/server/drivers/blackboard/localbb

Modified Files:
localbb.cpp 
Log Message:
changes to blackboard interface and client proxies


Index: localbb.cpp
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/blackboard/localbb/localbb.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** localbb.cpp 6 Dec 2007 00:20:28 -   1.4
--- localbb.cpp 21 Jan 2008 02:58:45 -  1.5
***
*** 76,92 
  #include iostream
  
! /[EMAIL PROTECTED] Custom blackboard-entry data representation used 
internally by the driver. */
  typedef struct EntryData
  {
/** Constructor. Sets all members to 0 or NULL. */
!   EntryData() { interf = 0; type = 0; subtype = 0; data_count = 0; data = 
NULL; timestamp_sec = 0; timestamp_usec = 0; }
//~EntryData() { if (data != NULL) delete [] data; } Why doesn't it like 
this?
!   
!   /** Player interface */
!   uint16_t interf;
/** Message type */
!   uint8_t type;
/** Message sub-type */
!   uint8_t subtype;
  
/** Data size */
--- 76,91 
  #include iostream
  
! /[EMAIL PROTECTED] EntryData
!  * @brief Custom blackboard-entry data representation used internally by the 
driver. */
  typedef struct EntryData
  {
/** Constructor. Sets all members to 0 or NULL. */
!   EntryData() { type = 0; subtype = 0; data_count = 0; data = NULL; 
timestamp_sec = 0; timestamp_usec = 0; }
//~EntryData() { if (data != NULL) delete [] data; } Why doesn't it like 
this?
! 
/** Message type */
!   uint16_t type;
/** Message sub-type */
!   uint16_t subtype;
  
/** Data size */
***
*** 94,103 
/** Data */
uint8_t* data;
!   /** Time entry created */
uint32_t timestamp_sec;
uint32_t timestamp_usec;
  } EntryData;
  
! /[EMAIL PROTECTED] Custom blackboard entry representation used internally by 
the driver.*/
  typedef struct BlackBoardEntry
  {
--- 93,104 
/** Data */
uint8_t* data;
!   /** Time entry created. Seconds since epoch. */
uint32_t timestamp_sec;
+   /** Time entry created. Microseconds field. */
uint32_t timestamp_usec;
  } EntryData;
  
! /[EMAIL PROTECTED] BlackBoardEntry
!  * @brief Custom blackboard entry representation used internally by the 
driver.*/
  typedef struct BlackBoardEntry
  {
***
*** 113,128 
  
  // Function prototypes
! /** Convienience function to convert from the internal blackboard entry 
representation to the player format. The user must clean-up the player 
blackboard entry. */
  player_blackboard_entry_t ToPlayerBlackBoardEntry(const BlackBoardEntry 
entry);
  
! /** Convienience function to convert from the player blackboard entry to the 
internal representation. */
  BlackBoardEntry FromPlayerBlackBoardEntry(const player_blackboard_entry_t 
entry);
  
- // Remember to clean-up the entry afterwards. Delete the key and data.
  player_blackboard_entry_t ToPlayerBlackBoardEntry(const BlackBoardEntry 
entry)
  {
player_blackboard_entry_t result;
memset(result, 0, sizeof(player_blackboard_entry_t));
-   result.interf = entry.data.interf;
result.type = entry.data.type;
result.subtype = entry.data.subtype;
--- 114,127 
  
  // Function prototypes
! /** @brief Convienience function to convert from the internal blackboard 
entry representation to the player format. The user must clean-up the player 
blackboard entry. Delete the key and data. */
  player_blackboard_entry_t ToPlayerBlackBoardEntry(const BlackBoardEntry 
entry);
  
! /** @brief Convienience function to convert from the player blackboard entry 
to the internal representation. This entry will be cleaned-up automatically by 
the destructor.*/
  BlackBoardEntry FromPlayerBlackBoardEntry(const player_blackboard_entry_t 
entry);
  
  player_blackboard_entry_t ToPlayerBlackBoardEntry(const BlackBoardEntry 
entry)
  {
player_blackboard_entry_t result;
memset(result, 0, sizeof(player_blackboard_entry_t));
result.type = entry.data.type;
result.subtype = entry.data.subtype;
***
*** 137,146 
return result;
  }
! 
! // This entry will be cleaned-up automatically by the destructor.
  BlackBoardEntry FromPlayerBlackBoardEntry(const player_blackboard_entry_t 
entry)
  {
BlackBoardEntry result;
-   result.data.interf = entry.interf;
result.data.type = entry.type;
result.data.subtype = entry.subtype;
--- 136,143 
return result;
  }
!  
  BlackBoardEntry FromPlayerBlackBoardEntry(const player_blackboard_entry_t 
entry)
  {
BlackBoardEntry result;
result.data.type = entry.type;
result.data.subtype = entry.subtype;
***
*** 156,194 
  
  

! /** Local memory blackboard driver. 

[Playerstage-commit] code/player/client_libs/libplayerc/bindings/python playerc.i, 1.26, 1.27

2008-01-16 Thread Toby Collett
Update of 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040/client_libs/libplayerc/bindings/python

Modified Files:
playerc.i 
Log Message:
fixed error handling in read so it can timeout/exit properly on disconnection.
fixed a couple of warnings
added accessor for range data in libplayerc


Index: playerc.i
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/bindings/python/playerc.i,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** playerc.i   21 Nov 2007 09:30:31 -  1.26
--- playerc.i   17 Jan 2008 04:37:23 -  1.27
***
*** 408,409 
--- 408,417 
  // This file is created by running ../parse_header.py
  %include playerc_oo.i
+ 
+ %extend playerc_laser
+ {
+ double get_range (int index)
+ {
+   return $self-ranges[index];
+ };
+ }


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc client.c, 1.92, 1.93 dev_blackboard.c, 1.5, 1.6 dev_laser.c, 1.47, 1.48 mclient.c, 1.10, 1.11 playerc.h, 1.245, 1.246

2008-01-16 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040/client_libs/libplayerc

Modified Files:
client.c dev_blackboard.c dev_laser.c mclient.c playerc.h 
Log Message:
fixed error handling in read so it can timeout/exit properly on disconnection.
fixed a couple of warnings
added accessor for range data in libplayerc


Index: mclient.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/mclient.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** mclient.c   7 Dec 2007 01:50:14 -   1.10
--- mclient.c   17 Jan 2008 04:37:23 -  1.11
***
*** 156,160 
 (mclient-pollfd[i].revents  POLLIN)  0)
  {
!   if(playerc_client_read_nonblock(mclient-client[i]))
{
  // cache the latest timestamp
--- 156,160 
 (mclient-pollfd[i].revents  POLLIN)  0)
  {
!   if(playerc_client_read_nonblock(mclient-client[i])0)
{
  // cache the latest timestamp

Index: client.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/client.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** client.c15 Jan 2008 23:50:52 -  1.92
--- client.c17 Jan 2008 04:37:23 -  1.93
***
*** 577,581 
  void *playerc_client_read(playerc_client_t *client)
  {
!   void* ret;  
// 10ms delay
struct timespec sleeptime = {0,1000};
--- 577,582 
  void *playerc_client_read(playerc_client_t *client)
  {
!   void* ret_proxy;
!   int ret;
// 10ms delay
struct timespec sleeptime = {0,1000};
***
*** 586,601 
  if(playerc_client_requestdata(client)  0)
return NULL;
! ret = playerc_client_read_nonblock(client);
! if((ret != NULL) || (client-sock  0))
!   break;
  nanosleep(sleeptime,NULL);
}  
-   return(ret);
  }
  
  // Read and process a packet (nonblocking)
! void *playerc_client_read_nonblock(playerc_client_t *client)
  {
player_msghdr_t header;
  
while (true)
--- 587,613 
  if(playerc_client_requestdata(client)  0)
return NULL;
! ret = playerc_client_read_nonblock_withproxy(client, ret_proxy);
! if((ret  0) || (client-sock  0))
!   return ret_proxy;
! if (ret  0)
!   return NULL;
  nanosleep(sleeptime,NULL);
}  
  }
  
+ 
  // Read and process a packet (nonblocking)
! // returns 0 if no data recieved, 1 if data recieved and -1 on error
! int playerc_client_read_nonblock(playerc_client_t *client)
! {
!   return playerc_client_read_nonblock_withproxy(client, NULL);
! }
! 
! // Read and process a packet (nonblocking), fills in pointer to proxy that 
got data
! // returns 0 if no data recieved, 1 if data recieved and -1 on error
! int playerc_client_read_nonblock_withproxy(playerc_client_t *client, void ** 
proxy)
  {
player_msghdr_t header;
+   int ret;
  
while (true)
***
*** 605,613 
  {
// If there is no queued data, peek at the socket
!   if(playerc_client_internal_peek(client,0) = 0)
! return NULL;
// There's data on the socket, so read a packet (blocking).
!   if(playerc_client_readpacket (client, header, client-data)  0)
! return NULL;
  }
  
--- 617,625 
  {
// If there is no queued data, peek at the socket
!   if((ret = playerc_client_internal_peek(client,0)) = 0)
! return ret;
// There's data on the socket, so read a packet (blocking).
!   if((ret = playerc_client_readpacket (client, header, client-data))  
0)
! return ret;
  }
  
***
*** 624,632 
  {
PLAYERC_WARN (No data recieved with SYNC);
!   return NULL;
  }
  else
  {
!   return client-id;
  }
case PLAYER_MSGTYPE_DATA:
--- 636,646 
  {
PLAYERC_WARN (No data recieved with SYNC);
!   return -1;
  }
  else
  {
!   if (proxy)
! *proxy = client-id;
!   return 1;
  }
case PLAYER_MSGTYPE_DATA:
***
*** 639,643 
// Need to ensure that any dynamic data made during unpacking is 
cleaned up
playerxdr_cleanup_message(client-data, header.addr.interf, 
header.type, header.subtype);
!   return result;
  }
  else  // PULL mode, so keep on going
--- 653,659 
// Need to ensure that any dynamic data made during unpacking is 
cleaned up
playerxdr_cleanup_message(client-data, header.addr.interf, 
header.type, header.subtype);
!   if (proxy)
! *proxy = result;
!   return 1;
  }
  else  // PULL mode, so 

[Playerstage-commit] code/player/client_libs/libplayerc++ playerclient.h, 1.26, 1.27

2008-01-16 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19040/client_libs/libplayerc++

Modified Files:
playerclient.h 
Log Message:
fixed error handling in read so it can timeout/exit properly on disconnection.
fixed a couple of warnings
added accessor for range data in libplayerc


Index: playerclient.h
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerclient.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** playerclient.h  26 Nov 2007 22:14:59 -  1.26
--- playerclient.h  17 Jan 2008 04:37:23 -  1.27
***
*** 183,186 
--- 183,190 
  //bool Peek2(uint32_t timeout=0);
  
+ /// @brief Set the timeout for client requests
+ void SetRequestTimeout(uint32_t seconds) { 
playerc_client_set_request_timeout(this-mClient,seconds); }
+ 
+ 
  /// @brief Set connection retry limit, which is the number of times
  /// that we'll try to reconnect to the server after a socket error.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/exampleinterface .cvsignore, 1.2, 1.3

2008-01-15 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/exampleinterface
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv387/examples/plugins/exampleinterface

Modified Files:
.cvsignore 
Log Message:
added generated interface files to cvs ignore

Index: .cvsignore
===
RCS file: 
/cvsroot/playerstage/code/player/examples/plugins/exampleinterface/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:52 -  1.2
--- .cvsignore  16 Jan 2008 05:05:00 -  1.3
***
*** 6,7 
--- 6,11 
  .libs
  example_client
+ example_functiontable.c
+ example_interface.h
+ example_xdr.c
+ example_xdr.h


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc dev_actarray.c, 1.13, 1.14 playerc.h, 1.244, 1.245

2008-01-09 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28058/client_libs/libplayerc

Modified Files:
dev_actarray.c playerc.h 
Log Message:
added actarray support to playerv


Index: dev_actarray.c
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_actarray.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** dev_actarray.c  1 Nov 2007 22:16:16 -   1.13
--- dev_actarray.c  9 Jan 2008 11:45:36 -   1.14
***
*** 113,119 
PLAYER_ACTARRAY_REQ_GET_GEOM, NULL, (void*)geom))  0)
  return result;
! 
!   device-actuators_geom = 
realloc(device-actuators_geom,device-actuators_count*sizeof(device-actuators_geom[0]));
!   for (ii = 0; ii  device-actuators_count; ii++)
{
  device-actuators_geom[ii] = geom-actuators[ii];
--- 113,119 
PLAYER_ACTARRAY_REQ_GET_GEOM, NULL, (void*)geom))  0)
  return result;
!   device-actuators_geom_count = geom-actuators_count;
!   device-actuators_geom = 
realloc(device-actuators_geom,device-actuators_geom_count*sizeof(device-actuators_geom[0]));
!   for (ii = 0; ii  device-actuators_geom_count; ii++)
{
  device-actuators_geom[ii] = geom-actuators[ii];

Index: playerc.h
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.244
retrieving revision 1.245
diff -C2 -d -r1.244 -r1.245
*** playerc.h   5 Dec 2007 21:43:50 -   1.244
--- playerc.h   9 Jan 2008 11:45:36 -   1.245
***
*** 949,952 
--- 949,954 
/** The actuator data, geometry and motor state. */
player_actarray_actuator_t *actuators_data;
+   /** The number of actuators we have geometry for. */
+   uint32_t actuators_geom_count;
player_actarray_actuatorgeom_t *actuators_geom;
/** Reports if the actuators are off (0) or on (1) */


-
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerv pv_dev_actarray.c, NONE, 1.1 Makefile.am, 1.47, 1.48 playerv.c, 1.54, 1.55 playerv.h, 1.52, 1.53 pv_dev_ptz.c, 1.1, 1.2 registry.c, 1.30, 1.31

2008-01-09 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28058/utils/playerv

Modified Files:
Makefile.am playerv.c playerv.h pv_dev_ptz.c registry.c 
Added Files:
pv_dev_actarray.c 
Log Message:
added actarray support to playerv


Index: registry.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/registry.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** registry.c  21 Nov 2007 09:34:19 -  1.30
--- registry.c  9 Jan 2008 11:45:37 -   1.31
***
*** 32,35 
--- 32,44 
switch (device-addr.interf)
{
+ case PLAYER_ACTARRAY_CODE:
+   device-proxy = actarray_create(mainwnd, opt, client,
+ device-addr.index,
+ device-drivername,
+ device-subscribe);
+   device-fndestroy = (fndestroy_t) actarray_destroy;
+   device-fnupdate = (fnupdate_t) actarray_update;
+   break;
+ 
  case PLAYER_AIO_CODE:
device-proxy = aio_create(mainwnd, opt, client,

Index: playerv.h
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/playerv.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** playerv.h   21 Nov 2007 09:34:19 -  1.52
--- playerv.h   9 Jan 2008 11:45:37 -   1.53
***
*** 48,51 
--- 48,53 
  #define COLOR_GRID_MINOR 0xE0E0E0
  #define COLOR_AIO0x00
+ #define COLOR_ACTARRAY_DATA  0x00C000
+ #define COLOR_ACTARRAY_CMD   0xC0
  #define COLOR_DIO0x00
  #define COLOR_LASER  0xC0
***
*** 172,175 
--- 174,218 
  
   /***
+   * ActArray device
+   ***/
+ 
+  // ActArray device info
+  typedef struct
+  {
+// Driver name
+char *drivername;
+ 
+// Menu stuff
+rtk_menu_t *menu;
+rtk_menuitem_t *subscribe_item;
+rtk_menuitem_t *command_item;
+ 
+// Figures for drawing the actarray
+rtk_fig_t **actuator_fig;
+rtk_fig_t **actuator_fig_cmd;
+double * lastvalue;
+int fig_count;
+mainwnd_t *mainwnd;
+ 
+// ActArray device proxy
+playerc_actarray_t *proxy;
+ 
+// Timestamp on most recent data
+double datatime;
+ 
+  } actarray_t;
+ 
+  // Create a actarray device
+  actarray_t *actarray_create(mainwnd_t *mainwnd, opt_t *opt, playerc_client_t 
*client,
+int index,  const char *drivername, int subscribe);
+ 
+  // Destroy a actarray device
+  void actarray_destroy(actarray_t *actarray);
+ 
+  // Update a actarray device
+  void actarray_update(actarray_t *actarray);
+ 
+ 
+  /***
* Bumper device
***/

--- NEW FILE: pv_dev_actarray.c ---
/* 
 *  PlayerViewer
 *  Copyright (C) Andrew Howard 2002
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
/***
 * Desc: PTZ device interface
 * Author: Andrew Howard
 * Date: 26 May 2002
 * CVS: $Id: pv_dev_actarray.c,v 1.1 2008/01/09 11:45:37 thjc Exp $
 ***/

#include assert.h
#include math.h
#include stdlib.h
#include string.h
#include playerv.h

void actarray_draw(actarray_t *actarray);
void actarray_move(actarray_t *actarray);
void actarray_allocate(actarray_t *actarray, int size);
void actarray_deallocate(actarray_t *actarray);

#define ARRAY_SPACING 1
#define ARRAY_X_OFFSET 2


// Create a actarray device
actarray_t *actarray_create(mainwnd_t *mainwnd, opt_t *opt, playerc_client_t 
*client,
  int index, const char *drivername, int subscribe)
{
  char section[64];
  char label[64];
  actarray_t *actarray;
  
  actarray = malloc(sizeof(actarray_t));
  actarray-datatime = 0;
  actarray-drivername = 

[Playerstage-commit] code/player/utils/playerjoy playerjoy.cc, 1.37, 1.38

2008-01-09 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerjoy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21090/utils/playerjoy

Modified Files:
playerjoy.cc 
Log Message:
added carlike command option to playerjoy


Index: playerjoy.cc
===
RCS file: /cvsroot/playerstage/code/player/utils/playerjoy/playerjoy.cc,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** playerjoy.cc20 Sep 2006 22:55:04 -  1.37
--- playerjoy.cc10 Jan 2008 02:26:28 -  1.38
***
*** 39,42 
--- 39,43 
  - -k   : use keyboard control
  - -p   : print out speeds on the console
+ - -a   : send car like commands (velocity and steering angle)
  - -udp : use UDP instead of TCP (deprecated, currently disabled)
  - -speed : maximum linear speed (m/sec)
***
*** 162,165 
--- 163,169 
  bool use_keyboard = false;
  
+ // send carlike commands
+ bool use_car = false;
+ 
  // create a gripper proxy and keys to control it?
  bool use_gripper = false;
***
*** 541,548 
  
// send the speed commands
!   if(!threed)
! pp-SetSpeed(cont-speed, cont-turnrate);
!   else
  pp3-SetSpeed(cont-speed, cont-turnrate);
  }
  else
--- 545,554 
  
// send the speed commands
!   if(threed)
  pp3-SetSpeed(cont-speed, cont-turnrate);
+   if(use_car)
+ pp-SetCarlike(cont-speed, cont-turnrate);
+   else
+ pp-SetSpeed(cont-speed, cont-turnrate);
  }
  else
***
*** 562,569 
  if(print_speeds)
printf(%5.3f %5.3f\n, cont-speed, RTOD(cont-turnrate));
! if(!threed)
!   pp-SetSpeed(0,0);
  else
!   pp3-SetSpeed(0,0);
}
else
--- 568,577 
  if(print_speeds)
printf(%5.3f %5.3f\n, cont-speed, RTOD(cont-turnrate));
! if(threed)
!   pp3-SetSpeed(cont-speed, cont-turnrate);
! if(use_car)
!   pp-SetCarlike(cont-speed, cont-turnrate);
  else
!   pp-SetSpeed(cont-speed, cont-turnrate);
}
else
***
*** 616,619 
--- 624,629 
  else if( strcmp( argv[i], -g ) == 0 )
use_gripper = true;
+ else if( strcmp( argv[i], -a ) == 0 )
+   use_car = true;
  else if( strcmp( argv[i], -speed ) == 0 )
{


-
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore/interfaces 004_position2d.def, 1.2, 1.3

2008-01-08 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore/interfaces
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1688/libplayercore/interfaces

Modified Files:
004_position2d.def 
Log Message:
fixed duplicate command subtypes
added some comments to structures so they show up in docs


Index: 004_position2d.def
===
RCS file: 
/cvsroot/playerstage/code/player/libplayercore/interfaces/004_position2d.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** 004_position2d.def  13 Dec 2007 20:23:03 -  1.2
--- 004_position2d.def  8 Jan 2008 22:29:52 -   1.3
***
*** 8,11 
--- 8,12 
  // interface data structures
  
+ /** position2d data */
  typedef struct player_position2d_data
  {
***
*** 18,22 
  } player_position2d_data_t;
  
! 
  typedef struct player_position2d_cmd_vel
  {
--- 19,23 
  } player_position2d_data_t;
  
! /** position 2d velocity command */
  typedef struct player_position2d_cmd_vel
  {
***
*** 27,31 
  } player_position2d_cmd_vel_t;
  
! 
  typedef struct player_position2d_cmd_pos
  {
--- 28,32 
  } player_position2d_cmd_vel_t;
  
! /** position2d position command */
  typedef struct player_position2d_cmd_pos
  {
***
*** 38,42 
  } player_position2d_cmd_pos_t;
  
! 
  typedef struct player_position2d_cmd_car
  {
--- 39,43 
  } player_position2d_cmd_pos_t;
  
! /** position2d command setting velocity and steering angle */
  typedef struct player_position2d_cmd_car
  {
***
*** 47,50 
--- 48,52 
  } player_position2d_cmd_car_t;
  
+ /** position2d command setting velocity and heading */
  typedef struct player_position2d_cmd_vel_head
  {
***
*** 55,58 
--- 57,61 
  } player_position2d_cmd_vel_head_t;
  
+ /** position2d geom */
  typedef struct player_position2d_geom
  {
***
*** 63,67 
  } player_position2d_geom_t;
  
! 
  typedef struct player_position2d_power_config
  {
--- 66,70 
  } player_position2d_geom_t;
  
! /** position2d power config */
  typedef struct player_position2d_power_config
  {
***
*** 70,74 
  } player_position2d_power_config_t;
  
! 
  typedef struct player_position2d_velocity_mode_config
  {
--- 73,77 
  } player_position2d_power_config_t;
  
! /** position2d velocity mode config */
  typedef struct player_position2d_velocity_mode_config
  {
***
*** 78,82 
  
  
! 
  typedef struct player_position2d_position_mode_req
  {
--- 81,85 
  
  
! /** position2d position mode request */
  typedef struct player_position2d_position_mode_req
  {
***
*** 85,89 
  } player_position2d_position_mode_req_t;
  
! 
  typedef struct player_position2d_set_odom_req
  {
--- 88,92 
  } player_position2d_position_mode_req_t;
  
! /** set odometry */
  typedef struct player_position2d_set_odom_req
  {
***
*** 92,96 
  } player_position2d_set_odom_req_t;
  
! 
  typedef struct player_position2d_speed_pid_req
  {
--- 95,99 
  } player_position2d_set_odom_req_t;
  
! /** position2d speed PID req */
  typedef struct player_position2d_speed_pid_req
  {
***
*** 103,107 
  } player_position2d_speed_pid_req_t;
  
! 
  typedef struct player_position2d_position_pid_req
  {
--- 106,110 
  } player_position2d_speed_pid_req_t;
  
! /** position2d position pid req */
  typedef struct player_position2d_position_pid_req
  {
***
*** 114,118 
  } player_position2d_position_pid_req_t;
  
! 
  typedef struct player_position2d_speed_prof_req
  {
--- 117,121 
  } player_position2d_position_pid_req_t;
  
! /** speed prof req */
  typedef struct player_position2d_speed_prof_req
  {
***
*** 242,246 
The @p position interface accepts carlike translational velocity + constant 
turn commands (speed and turning angle)
for the robot's motors (only supported by some drivers). */
!   message { CMD, CAR, 2, player_position2d_cmd_car_t };
  
  
--- 245,249 
The @p position interface accepts carlike translational velocity + constant 
turn commands (speed and turning angle)
for the robot's motors (only supported by some drivers). */
!   message { CMD, CAR, 3, player_position2d_cmd_car_t };
  
  
***
*** 248,250 
  
The @p position interface accepts translational velocity + absolute heading 
commands (speed and angular position) for the robot's motors (only supported by 
some drivers). */
!   message { CMD, VEL_HEAD , 3, player_position2d_cmd_vel_head_t };
--- 251,253 
  
The @p position interface accepts translational velocity + absolute heading 
commands (speed and angular position) for the robot's motors (only supported by 
some drivers). */
!   message { CMD, VEL_HEAD , 4, player_position2d_cmd_vel_head_t };


-
Check 

[Playerstage-commit] code/player/utils/playerprint playerprint.cc, 1.28, 1.29

2008-01-07 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerprint
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19320/utils/playerprint

Modified Files:
playerprint.cc 
Log Message:
fixed seg fault in actarray print statement
added request geom for playerprint actarray


Index: playerprint.cc
===
RCS file: /cvsroot/playerstage/code/player/utils/playerprint/playerprint.cc,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** playerprint.cc  3 Dec 2007 04:30:01 -   1.28
--- playerprint.cc  8 Jan 2008 03:53:38 -   1.29
***
*** 187,190 
--- 187,195 
  case PLAYER_ACTARRAY_CODE:
cp = (ClientProxy*)new ActArrayProxy(client,g_index);
+   try 
+   {
+ reinterpret_castActArrayProxy* (cp)-RequestGeometry();
+   }
+   catch (...) {}
break;
  case PLAYER_AIO_CODE:
***
*** 220,224 
  case PLAYER_LIMB_CODE:
cp = (ClientProxy*)new LimbProxy(client,g_index);
! reinterpret_castLimbProxy* (cp)-RequestGeometry();
break;
  case PLAYER_LOCALIZE_CODE:
--- 225,229 
  case PLAYER_LIMB_CODE:
cp = (ClientProxy*)new LimbProxy(client,g_index);
!   reinterpret_castLimbProxy* (cp)-RequestGeometry();
break;
  case PLAYER_LOCALIZE_CODE:


-
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ actarrayproxy.cc, 1.14, 1.15

2008-01-07 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19320/client_libs/libplayerc++

Modified Files:
actarrayproxy.cc 
Log Message:
fixed seg fault in actarray print statement
added request geom for playerprint actarray


Index: actarrayproxy.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/actarrayproxy.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** actarrayproxy.cc1 Nov 2007 22:16:16 -   1.14
--- actarrayproxy.cc8 Jan 2008 03:53:38 -   1.15
***
*** 243,247 
if (aJoint  mDevice-actuators_count)
{
- scoped_lock_t lock(mPc-mMutex);
  player_actarray_actuator_t empty;
  memset(empty, 0, sizeof(player_actarray_actuator_t));
--- 243,246 
***
*** 255,261 
  player_actarray_actuatorgeom_t ActArrayProxy::GetActuatorGeom(uint32_t 
aJoint) const
  {
!   if (aJoint  mDevice-actuators_count)
{
- scoped_lock_t lock(mPc-mMutex);
  player_actarray_actuatorgeom_t empty;
  memset(empty, 0, sizeof(player_actarray_actuatorgeom_t));
--- 254,259 
  player_actarray_actuatorgeom_t ActArrayProxy::GetActuatorGeom(uint32_t 
aJoint) const
  {
!   if (mDevice-actuators_geom == NULL || aJoint  mDevice-actuators_count)
{
  player_actarray_actuatorgeom_t empty;
  memset(empty, 0, sizeof(player_actarray_actuatorgeom_t));


-
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/planner/wavefront wavefront.cc, 1.63, 1.64

2008-01-02 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/planner/wavefront
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18555/server/drivers/planner/wavefront

Modified Files:
wavefront.cc 
Log Message:
fix for unintialised pointer


Index: wavefront.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/planner/wavefront/wavefront.cc,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** wavefront.cc11 Dec 2007 01:58:01 -  1.63
--- wavefront.cc2 Jan 2008 22:40:12 -   1.64
***
*** 405,408 
--- 405,409 
  
this-waypoint_count = 0;
+   this-waypoints = NULL;
this-waypoints_allocated = 0;
  
***
*** 440,443 
--- 441,446 
if(this-plan)
  plan_free(this-plan);
+   free(this-waypoints);
+   this-waypoints = NULL;
  
ShutdownPosition();


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/mixed/mricp/src mricp_driver.cpp, 1.1, 1.2

2007-12-21 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/mixed/mricp/src
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30027/server/drivers/mixed/mricp/src

Modified Files:
mricp_driver.cpp 
Log Message:
bug fixes for mricp driver


Index: mricp_driver.cpp
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/mricp/src/mricp_driver.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mricp_driver.cpp21 Nov 2007 10:51:56 -  1.1
--- mricp_driver.cpp21 Dec 2007 23:45:13 -  1.2
***
*** 22,26 
  
  /*
!  * Mricp.cc, v3.0 15/05/2006 
   * This is a Map Reference ICP plugin Driver for real time Map building and 
   * Localization using Iterative Closest Point laser scan matching and 
--- 22,26 
  
  /*
!  * mricp_driver.cpp, v3.0 21/12/2007 
   * This is a Map Reference ICP plugin Driver for real time Map building and 
[...994 lines suppressed...]
***
*** 1413,1420 
// Perform the ICP on Next Laser Scan
laser_set_1 = laser_set_2;
!   if(this-position_device)   pose_1 = pose_2;
  };
  
! void MrIcpDriver::ConnectPatches()
  {
int patch_number=0;
--- 1373,1381 
// Perform the ICP on Next Laser Scan
laser_set_1 = laser_set_2;
!   if(this-position_device)   
!   pose_1 = pose_2;
  };
  
! void MrIcp::ConnectPatches()
  {
int patch_number=0;


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/position/nav200 sicknav200.cc, 1.11, 1.12

2007-12-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/position/nav200
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11204/server/drivers/position/nav200

Modified Files:
sicknav200.cc 
Log Message:
added pose setting for nav200
added option to invert s300/s3000 laser data


Index: sicknav200.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nav200/sicknav200.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** sicknav200.cc   18 Dec 2007 05:05:09 -  1.11
--- sicknav200.cc   20 Dec 2007 23:28:27 -  1.12
***
*** 518,525 
  if(Laser.GetPositionAuto(Reading))
  {
!   data_packet.pos.px = static_castdouble (Reading.pos.x)/1000;
!   data_packet.pos.py = static_castdouble (Reading.pos.y)/1000;
!   double angle = M_PI + Reading.orientation/32768.0*M_PI;
!   data_packet.pos.pa = atan2(sin(angle), cos(angle));
if(Reading.quality==0xFF || Reading.quality==0xFE || 
Reading.quality==0x00)
{
--- 518,529 
  if(Laser.GetPositionAuto(Reading))
  {
!   double angle = M_PI + Reading.orientation/32768.0*M_PI - pose[2];
!   double dx = sin(angle);
!   double dy = cos(angle);
!   double rx = sin(angle + M_PI/2.0);
!   double ry = cos(angle + M_PI/2.0);
!   data_packet.pos.pa = atan2(dx, dy);
!   data_packet.pos.px = static_castdouble (Reading.pos.x)/1000 - dx * 
pose[1] - rx * pose[0];
!   data_packet.pos.py = static_castdouble (Reading.pos.y)/1000 - dy * 
pose[1] - ry * pose[0];
if(Reading.quality==0xFF || Reading.quality==0xFE || 
Reading.quality==0x00)
{


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/laser sicks3000.cc, 1.9, 1.10

2007-12-20 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/laser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11204/server/drivers/laser

Modified Files:
sicks3000.cc 
Log Message:
added pose setting for nav200
added option to invert s300/s3000 laser data


Index: sicks3000.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/laser/sicks3000.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** sicks3000.cc18 Dec 2007 05:05:08 -  1.9
--- sicks3000.cc20 Dec 2007 23:28:27 -  1.10
***
*** 167,170 
--- 167,172 
  int scan_min_segment, scan_max_segment;
  
+ IntProperty mirror;
+ 
  bool recognisedScanner;
  
***
*** 211,215 
  // Constructor
  SickS3000::SickS3000(ConfigFile* cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN, 
PLAYER_LASER_CODE)
  {
  
--- 213,217 
  // Constructor
  SickS3000::SickS3000(ConfigFile* cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN, 
PLAYER_LASER_CODE), mirror(mirror, 0, 0)
  {
  
***
*** 220,226 
assert(rx_buffer);

recognisedScanner = false;

-   // Assume s300
memset(data_packet,0,sizeof(data_packet));
data_packet.min_angle = DTOR(-135);
--- 222,229 
assert(rx_buffer);

+   this-RegisterProperty (mirror, this-mirror, cf, section);
+   
recognisedScanner = false;

memset(data_packet,0,sizeof(data_packet));
data_packet.min_angle = DTOR(-135);
***
*** 483,487 
  Distance_CM = 0x1fff; // remove status bits
  double distance_m = static_castdouble(Distance_CM)/100.0;
! data_packet.ranges[ii] = distance_m;
}

--- 486,493 
  Distance_CM = 0x1fff; // remove status bits
  double distance_m = static_castdouble(Distance_CM)/100.0;
! if (mirror == 1)
!   data_packet.ranges[data_count - ii - 1] = distance_m; // 
Reverse order.
! else
!   data_packet.ranges[ii] = distance_m;
}



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/libplayercore driver.cc, 1.34, 1.35 playerinterfacegen.py, 1.4, 1.5 plugins.cc, 1.8, 1.9

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7260/libplayercore

Modified Files:
driver.cc playerinterfacegen.py plugins.cc 
Log Message:
fixes to for pluggable interfaces
modified python tools to allow easier pluggable interface definition
change example to generate more files automatically


Index: playerinterfacegen.py
===
RCS file: /cvsroot/playerstage/code/player/libplayercore/playerinterfacegen.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** playerinterfacegen.py   21 Sep 2007 03:31:50 -  1.4
--- playerinterfacegen.py   18 Dec 2007 02:10:42 -  1.5
***
*** 11,15 
  UTILS_MODE = --utils
  
! USAGE = USAGE: playerinterfacegen.py [%s | %s | %s]  [interface 
file|interface dir] % (HEADER_MODE, FUNCTIONTABLE_MODE, UTILS_MODE)
  
  class msg:
--- 11,17 
  UTILS_MODE = --utils
  
! PLUGIN_MODE = --plugin
! 
! USAGE = USAGE: playerinterfacegen.py [%s | %s | %s] [%s] [interface 
file|interface dir] % (HEADER_MODE, FUNCTIONTABLE_MODE, UTILS_MODE, 
PLUGIN_MODE)
  
  class msg:
***
*** 23,27 
return (interface_code, interface_name)
  
! def processfile(mode, filename):
interface_code, interface_name = get_interface(filename)
interface_def = PLAYER_%s_CODE % interface_name.upper()
--- 25,29 
return (interface_code, interface_name)
  
! def processfile(mode, filename, plugin):
interface_code, interface_name = get_interface(filename)
interface_def = PLAYER_%s_CODE % interface_name.upper()
***
*** 77,80 
--- 79,90 
  #define %(string)s %(code)d
   % {comment: m.comment, string: m.msg_subtype_string, code: 
m.msg_subtype_code}
+ 
+ ifndefsymbol = '_' + interface_name.upper() + '_INTERFACE_H_'
+ if plugin:
+   print '#ifndef ' + ifndefsymbol
+   print '#define ' + ifndefsymbol + '\n'
+   
+   print #include libplayercore/player.h
+ 
  
  print 
***
*** 109,118 
interface_types : interface_types,  
interface_comment : interface_comment}  
! 
elif mode == FUNCTIONTABLE_MODE:
  print \n  /* %s messages */ % interface_name
  for m in interface_messages:
print   {, interface_def, ,, m.msg_type, ,, m.msg_subtype_string, 
,
print (player_pack_fn_t)%(dt_base)s_pack, 
(player_copy_fn_t)%(dt)s_copy, 
(player_cleanup_fn_t)%(dt)s_cleanup,(player_clone_fn_t)%(dt)s_clone,(player_free_fn_t)%(dt)s_free,(player_sizeof_fn_t)%(dt)s_sizeof},
 % { dt_base: m.datatype[:-2], dt: m.datatype}
  
  def process_for_utils(targetfile):
--- 119,150 
interface_types : interface_types,  
interface_comment : interface_comment}  
! if plugin:
!   print #endif //  + ifndefsymbol
elif mode == FUNCTIONTABLE_MODE:
+ if plugin:
+   print 
+ #include %(interface_name)s_interface.h
+ #include %(interface_name)s_xdr.h
+ 
+ // Function table for this interface
+ static playerxdr_function_t %(interface_name)s_ftable[] =
+ {
+  % {interface_name: interface_name}
  print \n  /* %s messages */ % interface_name
  for m in interface_messages:
print   {, interface_def, ,, m.msg_type, ,, m.msg_subtype_string, 
,
print (player_pack_fn_t)%(dt_base)s_pack, 
(player_copy_fn_t)%(dt)s_copy, 
(player_cleanup_fn_t)%(dt)s_cleanup,(player_clone_fn_t)%(dt)s_clone,(player_free_fn_t)%(dt)s_free,(player_sizeof_fn_t)%(dt)s_sizeof},
 % { dt_base: m.datatype[:-2], dt: m.datatype}
+ if plugin:
+   print 
+   /* This NULL element signals the end of the list */
+   {0,0,0,NULL,NULL,NULL}
+ };
+ 
+ playerxdr_function_t* player_plugininterf_gettable (void)
+ {
+ return %(interface_name)s_ftable;
+ }
+  % {interface_name: interface_name}
+ 
  
  def process_for_utils(targetfile):
***
*** 146,149 
--- 178,182 
mode = HEADER_MODE
targetfile = interfaces
+   plugin = False
  
for option in sys.argv[1:]:
***
*** 153,162 
  elif option == HEADER_MODE or option == FUNCTIONTABLE_MODE or option == 
UTILS_MODE:
mode = option
  else:
targetfile = option

print /* START OF AUTOGENERATED CODE */
!   print /* This file or section was automatically generated by 
playerinterfacegen.py
!   print To modify the interfaces in this file please edit their interface 
definition in libplayercore/interfaces/ */
  
if mode == UTILS_MODE:
--- 186,200 
  elif option == HEADER_MODE or option == FUNCTIONTABLE_MODE or option == 
UTILS_MODE:
mode = option
+ elif option == PLUGIN_MODE:
+   plugin = True
  else:
targetfile = option

print /* START OF AUTOGENERATED CODE */
!   if plugin:
! print /* This file or section was automatically generated by 
playerinterfacegen.py */
!   else:
! print /* This file or section was automatically generated 

[Playerstage-commit] code/player/libplayerxdr playerxdrgen.py, 1.16, 1.17

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/libplayerxdr
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7260/libplayerxdr

Modified Files:
playerxdrgen.py 
Log Message:
fixes to for pluggable interfaces
modified python tools to allow easier pluggable interface definition
change example to generate more files automatically


Index: playerxdrgen.py
===
RCS file: /cvsroot/playerstage/code/player/libplayerxdr/playerxdrgen.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** playerxdrgen.py 21 Sep 2007 03:31:50 -  1.16
--- playerxdrgen.py 18 Dec 2007 02:10:42 -  1.17
***
*** 9,12 
--- 9,13 
  import string
  import sys
+ import os
  
  USAGE = 'USAGE: playerxdrgen.y [-distro] interface-spec.h 
[extra_interface-spec.h] pack.c pack.h'
***
*** 524,538 
   % {headerfilename:headerfilename})
else:
! ifndefsymbol = '_'
! for i in range(0,len(string.split(infilenames[0],'.')[0])):
!   ifndefsymbol += string.capitalize(infilenames[0][i])
! ifndefsymbol += '_'
! headerfile.write('#ifndef ' + ifndefsymbol + '\n\n')
  headerfile.write('#include libplayerxdr/playerxdr.h\n\n')
! headerfile.write('#include ' + infilenames[0] + '\n\n')
  headerfile.write('#ifdef __cplusplus\nextern C {\n#endif\n\n')
  sourcefile.write('#include rpc/types.h\n')
  sourcefile.write('#include rpc/xdr.h\n\n')
! sourcefile.write('#include ' + headerfilename + '\n')
  sourcefile.write('#include string.h\n')
  sourcefile.write('#include stdlib.h\n\n')
--- 525,538 
   % {headerfilename:headerfilename})
else:
! ifndefsymbol = '_' + 
infilenames[0].replace('.','_').replace('/','_').upper() + '_XDR_'
! headerfile.write('#ifndef ' + ifndefsymbol + '\n')
! headerfile.write('#define ' + ifndefsymbol + '\n\n')
  headerfile.write('#include libplayerxdr/playerxdr.h\n\n')
! headerfile.write('#include ' + os.path.split(infilenames[0])[-1] + 
'\n\n')
  headerfile.write('#ifdef __cplusplus\nextern C {\n#endif\n\n')
+ 
  sourcefile.write('#include rpc/types.h\n')
  sourcefile.write('#include rpc/xdr.h\n\n')
! sourcefile.write('#include ' + os.path.split(headerfilename)[-1] + '\n')
  sourcefile.write('#include string.h\n')
  sourcefile.write('#include stdlib.h\n\n')


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/exampleinterface 128_example.def, NONE, 1.1

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/exampleinterface
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16675

Added Files:
128_example.def 
Log Message:
added new interface definition


--- NEW FILE: 128_example.def ---
description {
 * The new interface is declared in this file. It consists of a few parts:
 *
 * #define'd interface code and name string
 *
 * These are used throughout the interface. Be careful not to conflict with
 * existing Player interfaces when setting them.
 *
 * Message subtype codes
 *
 * These are used by both the client and the server to differentiate between
 * different messages within the same type group (e.g. different types of data
 * message).
 *
 * Message structures
 *
 * Each message structure defines the layout of data in the body of a message.
 * One message structure can be used by multiple types and subtypes.
 *
 * Exported plugin interface function
}

/** Example data */
message { DATA, EXAMPLE, 1, player_eginterf_data_t };
/** Example Request */
message { REQ, EXAMPLE, 1, player_eginterf_req_t };
/** Example Command */
message { CMD, EXAMPLE, 1, player_eginterf_cmd_t };

typedef struct player_eginterf_data
{
uint32_t stuff_count;
double *stuff;
} player_eginterf_data_t;

typedef struct player_eginterf_req
{
int value;
} player_eginterf_req_t;

typedef struct player_eginterf_cmd
{
char doStuff;
} player_eginterf_cmd_t;



-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/exampleinterface eginterf.c, 1.3, NONE eginterf.h, 1.1, NONE eginterf_xdr.c, 1.3, NONE eginterf_xdr.h, 1.5, NONE

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/exampleinterface
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17085

Removed Files:
eginterf.c eginterf.h eginterf_xdr.c eginterf_xdr.h 
Log Message:
removed files that are now auto generated


--- eginterf.h DELETED ---

--- eginterf.c DELETED ---

--- eginterf_xdr.c DELETED ---

--- eginterf_xdr.h DELETED ---


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/utils/playerv pv_dev_vectormap.c, 1.1, 1.2

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/utils/playerv

Modified Files:
pv_dev_vectormap.c 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: pv_dev_vectormap.c
===
RCS file: /cvsroot/playerstage/code/player/utils/playerv/pv_dev_vectormap.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pv_dev_vectormap.c  17 Sep 2007 02:18:50 -  1.1
--- pv_dev_vectormap.c  18 Dec 2007 05:05:09 -  1.2
***
*** 185,189 
GEOSCoordSeq_getX(seq, 00, x);
GEOSCoordSeq_getY(seq, 00, y);
!   rtk_fig_point( map-fig, x, y );
break;
  case GEOS_LINESTRING:
--- 185,190 
GEOSCoordSeq_getX(seq, 00, x);
GEOSCoordSeq_getY(seq, 00, y);
!   rtk_fig_line( map-fig, x-0.1, y ,x+0.1, y);
!   rtk_fig_line( map-fig, x, y-0.1 ,x, y+0.1);
break;
  case GEOS_LINESTRING:


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/laser sicks3000.cc, 1.8, 1.9

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/laser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/server/drivers/laser

Modified Files:
sicks3000.cc 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: sicks3000.cc
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/laser/sicks3000.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sicks3000.cc6 Dec 2007 19:12:39 -   1.8
--- sicks3000.cc18 Dec 2007 05:05:08 -  1.9
***
*** 148,151 
--- 148,152 
  int64_t GetTime();
  
+ void SetScannerParams(int data_count);
  
protected:
***
*** 166,169 
--- 167,172 
  int scan_min_segment, scan_max_segment;
  
+ bool recognisedScanner;
+ 
  // Opaque Driver info
  Device *opaque;
***
*** 217,220 
--- 220,226 
assert(rx_buffer);

+   recognisedScanner = false;
+   
+   // Assume s300
memset(data_packet,0,sizeof(data_packet));
data_packet.min_angle = DTOR(-135);
***
*** 255,258 
--- 261,283 
  }
  
+ 

+ // Set up scanner parameters based on number of results per scan
+ void SickS3000::SetScannerParams(int data_count)
+ {
+   if (data_count == 761) // sicks3000
+   {
+   data_packet.min_angle = DTOR(-95);
+   data_packet.max_angle = DTOR(95);
+   data_packet.resolution = DTOR(0.25);
+   data_packet.max_range = 49;
+   
+   config_packet.min_angle = DTOR(-95);
+   config_packet.max_angle = DTOR(95);
+   config_packet.resolution = DTOR(0.25);
+   config_packet.max_range = 49;
+   
+   recognisedScanner = true;
+   }
+ }
  
  

***
*** 314,317 
--- 339,343 
{
  player_opaque_data_t * recv = reinterpret_castplayer_opaque_data_t *  
(data);
+ unsigned int messageOffset = rx_count;
  rx_count += recv-data_count;
  if (rx_count  rx_buffer_size)
***
*** 322,326 
  else
  {
!   memmove(rx_buffer[rx_count], recv-data, recv-data_count);
ProcessLaserData();
  }
--- 348,352 
  else
  {
!   memcpy(rx_buffer[messageOffset], recv-data, recv-data_count);
ProcessLaserData();
  }
***
*** 448,451 
--- 474,479 
  {
int data_count = (size - 22) / 2;
+   if (!recognisedScanner)
+ SetScannerParams(data_count); // Set up parameters based on 
number of results.
data_packet.ranges_count = data_count;
data_packet.ranges = new float [data_count];


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ playerc++.h, 1.105, 1.106

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/client_libs/libplayerc++

Modified Files:
playerc++.h 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: playerc++.h
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/playerc++.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** playerc++.h 5 Dec 2007 21:43:50 -   1.105
--- playerc++.h 18 Dec 2007 05:05:08 -  1.106
***
*** 1044,1048 
  {
scoped_lock_t lock(mPc-mMutex);
!   return mDevice-scan_start + mDevice-scan_count*mDevice-scan_res;
  };
  
--- 1044,1048 
  {
scoped_lock_t lock(mPc-mMutex);
!   return mDevice-scan_start + (mDevice-scan_count - 
1)*mDevice-scan_res;
  };
  


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/libplayerdrivers driverregistry.cc, 1.51, 1.52

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/libplayerdrivers
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/server/libplayerdrivers

Modified Files:
driverregistry.cc 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: driverregistry.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/libplayerdrivers/driverregistry.cc,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** driverregistry.cc   6 Dec 2007 02:35:36 -   1.51
--- driverregistry.cc   18 Dec 2007 05:05:09 -  1.52
***
*** 165,168 
--- 165,173 
  #endif
  
+ #ifdef INCLUDE_TCPSTREAM
+ void TCPStream_Register(DriverTable* table);
+ #endif
+ 
+ 
  #ifdef INCLUDE_WBR914
  void wbr914_Register(DriverTable* table);
***
*** 616,619 
--- 621,628 
SerialStream_Register(driverTable);
  #endif
+ 
+ #ifdef INCLUDE_TCPSTREAM
+   TCPStream_Register(driverTable);
+ #endif

  #ifdef INCLUDE_WBR914


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/position/nav200 sicknav200.cc, 1.10, 1.11

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/position/nav200
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/server/drivers/position/nav200

Modified Files:
sicknav200.cc 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: sicknav200.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nav200/sicknav200.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** sicknav200.cc   14 Dec 2007 00:19:55 -  1.10
--- sicknav200.cc   18 Dec 2007 05:05:09 -  1.11
***
*** 461,466 
{
PLAYER_ERROR1(Unrecognised mode: %s, mode.GetValue());
}
!   
return 0;
}
--- 461,473 
{
PLAYER_ERROR1(Unrecognised mode: %s, mode.GetValue());
+   this-Publish(hdr-addr,
+   resp_queue,
+   PLAYER_MSGTYPE_RESP_NACK,
+   PLAYER_SET_STRPROP_REQ);
}
!   this-Publish(hdr-addr,
!   resp_queue,
!   PLAYER_MSGTYPE_RESP_ACK,
!   PLAYER_SET_STRPROP_REQ);
return 0;
}


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers Makefile.am, 1.54, 1.55

2007-12-17 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4151/server/drivers

Modified Files:
Makefile.am 
Log Message:
made acinclude driver list alphabetical again
added tcpstream driver
bug fixes for s3000 and nav200 drivers
made point features more visible in playerv vector map display


Index: Makefile.am
===
RCS file: /cvsroot/playerstage/code/player/server/drivers/Makefile.am,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** Makefile.am 6 Dec 2007 02:35:36 -   1.54
--- Makefile.am 18 Dec 2007 05:05:08 -  1.55
***
*** 28,30 
  ranger \
  vectormap \
! blackboard
--- 28,30 
  ranger \
  vectormap \
! blackboard 


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc dev_laser.c, 1.46, 1.47

2007-12-16 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12994/client_libs/libplayerc

Modified Files:
dev_laser.c 
Log Message:
fixed segfault in laser set config repsonse


Index: dev_laser.c
===
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/dev_laser.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** dev_laser.c 5 Dec 2007 21:43:50 -   1.46
--- dev_laser.c 16 Dec 2007 20:50:47 -  1.47
***
*** 220,233 
if(playerc_client_request(device-info.client, device-info,
  PLAYER_LASER_REQ_SET_CONFIG,
! (void*)config, (void**)resp)  0)
  return -1;
  
!   // copy them locally
!   device-scan_start = resp-min_angle;
!   device-scan_res = resp-resolution;
!   device-range_res = resp-range_res;
!   device-intensity_on = resp-intensity;
!   device-scanning_frequency = resp-scanning_frequency;
!   player_laser_config_t_free(resp);
  
return 0;
--- 220,232 
if(playerc_client_request(device-info.client, device-info,
  PLAYER_LASER_REQ_SET_CONFIG,
! (void*)config, NULL)  0)
  return -1;
  
!   // if the set suceeded copy them locally
!   device-scan_start = config.min_angle;
!   device-scan_res = config.resolution;
!   device-range_res = config.range_res;
!   device-intensity_on = config.intensity;
!   device-scanning_frequency = config.scanning_frequency;
  
return 0;


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/examples/plugins/multidriver multidriver.cc, 1.12, 1.13

2007-12-13 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/examples/plugins/multidriver
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24692/examples/plugins/multidriver

Modified Files:
multidriver.cc 
Log Message:
fixed provides parsing in driver examples
serial stream fixes
added mapping capability to nav200 driver, and other bug fixes
added vectormap to playerprop utility


Index: multidriver.cc
===
RCS file: 
/cvsroot/playerstage/code/player/examples/plugins/multidriver/multidriver.cc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** multidriver.cc  23 Aug 2007 19:58:41 -  1.12
--- multidriver.cc  14 Dec 2007 00:19:55 -  1.13
***
*** 118,122 
// Create my position interface
if (cf-ReadDeviceAddr((this-m_position_addr), section, 
!  provides, PLAYER_POSITION2D_CODE, 0, NULL) != 0)
{
  this-SetError(-1);
--- 118,122 
// Create my position interface
if (cf-ReadDeviceAddr((this-m_position_addr), section, 
!  provides, PLAYER_POSITION2D_CODE, -1, NULL) != 0)
{
  this-SetError(-1);
***
*** 131,135 
// Create my laser interface
if (cf-ReadDeviceAddr((this-m_laser_addr), section, 
!  provides, PLAYER_LASER_CODE, 0, NULL) != 0)
{
  this-SetError(-1);
--- 131,135 
// Create my laser interface
if (cf-ReadDeviceAddr((this-m_laser_addr), section, 
!  provides, PLAYER_LASER_CODE, -1, NULL) != 0)
{
  this-SetError(-1);
***
*** 144,148 
// Find out which laser I'll subscribe to
if (cf-ReadDeviceAddr((this-laser_addr), section, 
!  requires, PLAYER_LASER_CODE, 0, NULL) != 0)
{
  this-SetError(-1);
--- 144,148 
// Find out which laser I'll subscribe to
if (cf-ReadDeviceAddr((this-laser_addr), section, 
!  requires, PLAYER_LASER_CODE, -1, NULL) != 0)
{
  this-SetError(-1);


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/server/drivers/camera/1394 camera1394.cc, 1.36, 1.37

2007-12-12 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/server/drivers/camera/1394
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10951/server/drivers/camera/1394

Modified Files:
camera1394.cc 
Log Message:
applied patch [ 1849475 ] camera1394 DMA bus cleanup patch for libdc1394 v2.0


Index: camera1394.cc
===
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/1394/camera1394.cc,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** camera1394.cc   1 Nov 2007 22:16:18 -   1.36
--- camera1394.cc   12 Dec 2007 19:15:59 -  1.37
***
*** 1019,1023 
// Stop transmitting camera data
  #if LIBDC1394_VERSION == 0200
!   if (DC1394_SUCCESS != dc1394_video_set_transmission(this-camera, 
DC1394_OFF))
  #else
if (dc1394_stop_iso_transmission(this-handle, this-camera.node) != 
DC1394_SUCCESS) 
--- 1019,1024 
// Stop transmitting camera data
  #if LIBDC1394_VERSION == 0200
!   if (DC1394_SUCCESS != dc1394_video_set_transmission(this-camera, 
DC1394_OFF)
!   || DC1394_SUCCESS != dc1394_capture_stop(this-camera))
  #else
if (dc1394_stop_iso_transmission(this-handle, this-camera.node) != 
DC1394_SUCCESS) 


-
SF.Net email is sponsored by:
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
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit


[Playerstage-commit] code/player/client_libs/libplayerc++ opaqueproxy.cc, 1.6, 1.7

2007-12-09 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17498/client_libs/libplayerc++

Modified Files:
opaqueproxy.cc 
Log Message:
fix to opaqueproxy print output


Index: opaqueproxy.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/opaqueproxy.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** opaqueproxy.cc  6 Dec 2007 02:35:36 -   1.6
--- opaqueproxy.cc  10 Dec 2007 04:44:15 -  1.7
***
*** 118,124 
data = new uint8_t[4096];
c.GetData(data);
!   for(int i = 0; i  c.GetCount(); i++)
{
!   os  hex  setw(2)  setfill('0')  data[i];
}
return os;
--- 118,124 
data = new uint8_t[4096];
c.GetData(data);
!   for(unsigned int i = 0; i  c.GetCount(); i++)
{
!   os  hex  setw(2)  setfill('0')  static_castunsigned 
int (data[i]);
}
return os;


-
SF.Net email is sponsored by:
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


[Playerstage-commit] code/player/client_libs/libplayerc++ vectormapproxy.cc, 1.3, 1.4

2007-12-06 Thread Toby Collett
Update of /cvsroot/playerstage/code/player/client_libs/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8133/client_libs/libplayerc++

Modified Files:
vectormapproxy.cc 
Log Message:
moved lock to prevent double lock call


Index: vectormapproxy.cc
===
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/vectormapproxy.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** vectormapproxy.cc   24 Oct 2007 22:32:03 -  1.3
--- vectormapproxy.cc   6 Dec 2007 22:41:46 -   1.4
***
*** 104,108 
  vectorstring VectorMapProxy::GetLayerNames() const
  {
-   scoped_lock_t lock(mPc-mMutex);
vectorstring names;
int layerCount = GetLayerCount();
--- 104,107 
***
*** 110,113 
--- 109,114 
  return names;
  
+   // this lock needs to come after GetLayerCount which locks as well
+   scoped_lock_t lock(mPc-mMutex);
for (int i=0; ilayerCount; ++i)
{


-
SF.Net email is sponsored by:
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


  1   2   3   4   5   6   >