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

Modified Files:
        p2os.h p2os.cc 
Log Message:
Added support for position and orientation info of the actarray


Index: p2os.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/p2os/p2os.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** p2os.h      4 Apr 2006 21:31:37 -0000       1.30
--- p2os.h      22 Jun 2006 22:18:36 -0000      1.31
***************
*** 227,230 ****
--- 227,235 ----
      /////////////////
      // Actarray stuff
+     double aaOffsets[6];
+     double aaOrients[18];
+     double aaAxes[18];
+     player_point_3d_t aaBasePos;
+     player_orientation_3d_t aaBaseOrient;
      inline double TicksToDegrees (int joint, unsigned char ticks);
      inline unsigned char DegreesToTicks (int joint, double degrees);

Index: p2os.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/p2os/p2os.cc,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** p2os.cc     12 Apr 2006 22:01:42 -0000      1.68
--- p2os.cc     22 Jun 2006 22:18:36 -0000      1.69
***************
*** 89,92 ****
--- 89,97 ----
    - The approach vector is forward along the gripper with the orientation
      vector up from the gripper's centre.
+   - The kinematics calculator is based on the analytical method by Gan et al. 
See:
+     J.Q. Gan, E. Oyama, E.M. Rosales, and H. Hu, "A complete analytical
+     solution to the inverse kinematics of the Pioneer 2 robotic arm,"
+     Robotica, vol.23, no.1, pp.123-129, 2005.
+ 
  
  - @ref interface_bumper
***************
*** 225,228 ****
--- 230,254 ----
    - Default: 0
    - Use velocity bands
+ - aa_basepos (3 floats)
+   - Default: 0, 0, 0
+   - Position of the base of the arm from the robot centre in metres.
+ - aa_baseorient (3 floats)
+   - Default: 0, 0, 0
+   - Orientation of the base of the arm from the robot centre in radians.
+ - aa_offsets (6 floats)
+   - Default: all zero TODO: measure them
+   - Offsets for the actarray.  Taken from previous actuator to current 
actuator
+     (first should be from the actarray's base position). Each offset is a
+     straight line, not measured per axis.
+ - aa_orients (3x6 floats)
+   - Default: all zero TODO: measure them
+   - Orientation of each actuator when it is at 0. Measured by taking a line 
from
+     this actuator to the next and measuring its angles about the 3 axes of the
+     previous actuator's coordinate space.
+   - Each set of three values is a single orientation.
+ - aa_axes (3x6 floats)
+   - Default: all zero TODO: measure them
+   - The axis of rotation for each joint in the actarray.
+   - Each set of three values is a vector along the axis of rotation.
  - limb_pos (3 floats)
    - Default: 0, 0, 0
***************
*** 235,239 ****
    - Default: 0, 0, 0, 0, 0
    - Angular offset of each joint from desired position to actual position 
(calibration data).
!   - Taken by commanding joints to 0rad with actarray interface, then 
measuring their actual angle.
  
  
--- 261,266 ----
    - Default: 0, 0, 0, 0, 0
    - Angular offset of each joint from desired position to actual position 
(calibration data).
!   - Possibly taken by commanding joints to 0rad with actarray interface, then 
measuring
!     their actual angle.
  
  
***************
*** 504,507 ****
--- 531,550 ----
    this->use_vel_band = cf->ReadInt(section, "use_vel_band", 0);
  
+   // Actarray configuration
+   for (int ii = 0; ii < 6; ii++)
+   {
+     aaOffsets[ii] = cf->ReadTupleFloat(section, "aa_offsets", ii, 0.0f);
+   }
+   for (int ii = 0; ii < 18; ii++)
+   {
+     aaOrients[ii] = cf->ReadTupleFloat(section, "aa_orients", ii, 0.0f);
+     aaAxes[ii] = cf->ReadTupleFloat(section, "aa_axes", ii, 0.0f);
+   }
+   aaBasePos.px = cf->ReadTupleFloat(section, "aa_basepos", 0, 0.0f);
+   aaBasePos.py = cf->ReadTupleFloat(section, "aa_basepos", 1, 0.0f);
+   aaBasePos.pz = cf->ReadTupleFloat(section, "aa_basepos", 2, 0.0f);
+   aaBaseOrient.proll = cf->ReadTupleFloat(section, "aa_baseorient", 0, 0.0f);
+   aaBaseOrient.ppitch = cf->ReadTupleFloat(section, "aa_baseorient", 1, 0.0f);
+   aaBaseOrient.pyaw = cf->ReadTupleFloat(section, "aa_baseorient", 2, 0.0f);
    // Limb configuration
    if(kineCalc)
***************
*** 2170,2173 ****
--- 2213,2223 ----
      {
        aaGeom.actuators[ii].type = PLAYER_ACTARRAY_TYPE_ROTARY;
+       aaGeom.actuators[ii].offset = aaOffsets[ii];
+       aaGeom.actuators[ii].orientation.proll = aaOrients[ii * 3];
+       aaGeom.actuators[ii].orientation.ppitch = aaOrients[ii * 3 + 1];
+       aaGeom.actuators[ii].orientation.pyaw = aaOrients[ii * 3 + 2];
+       aaGeom.actuators[ii].axis.px = aaAxes[ii * 3];
+       aaGeom.actuators[ii].axis.py = aaAxes[ii * 3 + 1];
+       aaGeom.actuators[ii].axis.pz = aaAxes[ii * 3 + 2];
        aaGeom.actuators[ii].min = static_cast<float> (TicksToRadians (ii, 
sippacket->armJoints[ii].min));
        aaGeom.actuators[ii].centre = static_cast<float> (TicksToRadians (ii, 
sippacket->armJoints[ii].centre));
***************
*** 2178,2181 ****
--- 2228,2238 ----
      }
  
+     aaGeom.base_pos.px = aaBasePos.px;
+     aaGeom.base_pos.py = aaBasePos.py;
+     aaGeom.base_pos.pz = aaBasePos.pz;
+     aaGeom.base_orientation.proll = aaBaseOrient.proll;
+     aaGeom.base_orientation.ppitch = aaBaseOrient.ppitch;
+     aaGeom.base_orientation.pyaw = aaBaseOrient.pyaw;
+ 
      this->Publish(this->actarray_id, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_ACTARRAY_GET_GEOM_REQ, &aaGeom, sizeof (aaGeom), NULL);
      return 0;


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to