Update of /cvsroot/playerstage/code/player/server/drivers/mixed/rflex
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1338/server/drivers/mixed/rflex

Modified Files:
        rflex.cc rflex_configs.h 
Log Message:
applied patch 1749747 to transition to 3d pose structures

Index: rflex.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex.cc,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** rflex.cc    30 May 2006 22:57:52 -0000      1.35
--- rflex.cc    9 Jul 2007 17:18:01 -0000       1.36
***************
*** 498,505 ****
      assert(hdr->size == 0);
  
!     player_position2d_geom_t geom;
!     geom.pose.px = 0;
!     geom.pose.py = 0;
!     geom.pose.pa = 0;
      Lock();
      geom.size.sl = rflex_configs.m_length;
--- 498,502 ----
      assert(hdr->size == 0);
  
!     player_position2d_geom_t geom={{0}};
      Lock();
      geom.size.sl = rflex_configs.m_length;
***************
*** 740,744 ****
    rflex_configs.sonar_set_delay=
            cf->ReadInt(section, "sonar_set_delay", 0);
!   rflex_configs.mrad_sonar_poses=(player_pose_t *) 
malloc(rflex_configs.num_sonars*sizeof(player_pose_t));
    for(x=0;x<rflex_configs.num_sonars;x++)
    {
--- 737,741 ----
    rflex_configs.sonar_set_delay=
            cf->ReadInt(section, "sonar_set_delay", 0);
!   rflex_configs.mrad_sonar_poses=(player_pose3d_t *) 
malloc(rflex_configs.num_sonars*sizeof(player_pose3d_t));
    for(x=0;x<rflex_configs.num_sonars;x++)
    {
***************
*** 747,751 ****
      rflex_configs.mrad_sonar_poses[x].py=
              cf->ReadTupleFloat(section, "mrad_sonar_poses",3*x+2,0.0);
!     rflex_configs.mrad_sonar_poses[x].pa=
              cf->ReadTupleFloat(section, "mrad_sonar_poses",3*x,0.0);
    }
--- 744,748 ----
      rflex_configs.mrad_sonar_poses[x].py=
              cf->ReadTupleFloat(section, "mrad_sonar_poses",3*x+2,0.0);
!     rflex_configs.mrad_sonar_poses[x].pyaw=
              cf->ReadTupleFloat(section, "mrad_sonar_poses",3*x,0.0);
    }
***************
*** 780,784 ****
      rflex_configs.ir_poses.poses[i].px= cf->ReadTupleFloat(section, 
"poses",i*3,0);
      rflex_configs.ir_poses.poses[i].py= cf->ReadTupleFloat(section, 
"poses",i*3+1,0);
!     rflex_configs.ir_poses.poses[i].pa= cf->ReadTupleFloat(section, 
"poses",i*3+2,0);
  
      // Calibration parameters for ir in form range=(a*voltage)^b
--- 777,781 ----
      rflex_configs.ir_poses.poses[i].px= cf->ReadTupleFloat(section, 
"poses",i*3,0);
      rflex_configs.ir_poses.poses[i].py= cf->ReadTupleFloat(section, 
"poses",i*3+1,0);
!     rflex_configs.ir_poses.poses[i].pyaw= cf->ReadTupleFloat(section, 
"poses",i*3+2,0);
  
      // Calibration parameters for ir in form range=(a*voltage)^b
***************
*** 795,799 ****
      rflex_configs.bumper_def[x].pose.px =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x,0)); //m
      rflex_configs.bumper_def[x].pose.py =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+1,0)); //m
!     rflex_configs.bumper_def[x].pose.pa =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+2,0)); //rad
      rflex_configs.bumper_def[x].length =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+3,0)); //m
      rflex_configs.bumper_def[x].radius =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+4,0));  //m
--- 792,796 ----
      rflex_configs.bumper_def[x].pose.px =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x,0)); //m
      rflex_configs.bumper_def[x].pose.py =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+1,0)); //m
!     rflex_configs.bumper_def[x].pose.pyaw =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+2,0)); //rad
      rflex_configs.bumper_def[x].length =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+3,0)); //m
      rflex_configs.bumper_def[x].radius =  (cf->ReadTupleFloat(section, 
"bumper_def",5*x+4,0));  //m
***************
*** 1076,1080 ****
      /* Get data from robot */
    static float LastYaw = 0;
!     player_rflex_data_t rflex_data = {0};
  
    Lock();
--- 1073,1077 ----
      /* Get data from robot */
    static float LastYaw = 0;
!     player_rflex_data_t rflex_data = {{{0}}};
  
    Lock();
***************
*** 1109,1116 ****
          for (i = 0; i < rflex_configs.num_sonars - 
rflex_configs.sonar_2nd_bank_start; i++)
          {
!       SonarRotate(rad_odo_theta, 
rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].px,rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].py,rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].pa,NewGeom,&NewGeom[1],&NewGeom[2]);
            geom.poses[i].px = NewGeom[0];
            geom.poses[i].py = NewGeom[1];
!           geom.poses[i].pa = NewGeom[2];
          }
          Unlock();
--- 1106,1113 ----
          for (i = 0; i < rflex_configs.num_sonars - 
rflex_configs.sonar_2nd_bank_start; i++)
          {
!       SonarRotate(rad_odo_theta, 
rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].px,rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].py,rflex_configs.mrad_sonar_poses[i+rflex_configs.sonar_2nd_bank_start].pyaw,NewGeom,&NewGeom[1],&NewGeom[2]);
            geom.poses[i].px = NewGeom[0];
            geom.poses[i].py = NewGeom[1];
!           geom.poses[i].pyaw = NewGeom[2];
          }
          Unlock();

Index: rflex_configs.h
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex_configs.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** rflex_configs.h     20 Jan 2006 01:12:56 -0000      1.13
--- rflex_configs.h     9 Jul 2007 17:18:01 -0000       1.14
***************
*** 71,75 ****
    // pose of each sonar on the robot (x,y,t) in rad and mm
    // note i is forwards, j is left
!   player_pose_t *mrad_sonar_poses;
    //not sure what these do yet actually
    long sonar_echo_delay;
--- 71,75 ----
    // pose of each sonar on the robot (x,y,t) in rad and mm
    // note i is forwards, j is left
!   player_pose3d_t *mrad_sonar_poses;
    //not sure what these do yet actually
    long sonar_echo_delay;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to