Revision: 7692
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7692&view=rev
Author:   hsujohnhsu
Date:     2009-05-19 03:47:34 +0000 (Tue, 19 May 2009)

Log Message:
-----------
anchorVec from Gazebo body reference rather than CoM location (ODE).

Modified Paths:
--------------
    code/gazebo/trunk/server/physics/Joint.cc

Modified: code/gazebo/trunk/server/physics/Joint.cc
===================================================================
--- code/gazebo/trunk/server/physics/Joint.cc   2009-05-19 03:46:26 UTC (rev 
7691)
+++ code/gazebo/trunk/server/physics/Joint.cc   2009-05-19 03:47:34 UTC (rev 
7692)
@@ -115,7 +115,13 @@
   if (!body2)
     gzthrow("Couldn't Find Body[" + node->GetString("body2","",1));
 
-  Vector3 anchorVec = anchorBody->GetPosition() + **(this->anchorOffsetP);
+  Pose3d tmpPose = 
anchorBody->GetCoMPose().CoordPoseSolve(anchorBody->GetPose());
+  // std::cout << "anchor body  " << anchorBody->GetName()
+  //           << " ab pos " <<  tmpPose
+  //           << " com pos " <<  anchorBody->GetCoMPose()
+  //           << " off " << **(this->anchorOffsetP)
+  //           << std::endl;
+  Vector3 anchorVec = tmpPose.pos + **(this->anchorOffsetP);
 
   double h = World::Instance()->GetPhysicsEngine()->GetStepTime();
   double stopErp = h * (**this->stopKpP) / (h * (**this->stopKpP) + 
(**this->stopKdP));


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to