Revision: 7526
http://playerstage.svn.sourceforge.net/playerstage/?rev=7526&view=rev
Author: natepak
Date: 2009-03-17 22:21:43 +0000 (Tue, 17 Mar 2009)
Log Message:
-----------
Updates
Modified Paths:
--------------
code/branches/federation/gazebo/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
Modified:
code/branches/federation/gazebo/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
===================================================================
---
code/branches/federation/gazebo/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
2009-03-17 02:11:36 UTC (rev 7525)
+++
code/branches/federation/gazebo/server/controllers/gripper/pioneer2/Pioneer2_Gripper.cc
2009-03-17 22:21:43 UTC (rev 7526)
@@ -208,6 +208,37 @@
this->joints[RIGHT]->SetParam(dParamFMax, **(this->forcesP[RIGHT]));
this->joints[LIFT]->SetParam(dParamFMax, **(this->forcesP[LIFT]));
+
+ /*printf("Left Pos[%f] High[%f]
Low[%f]\n",this->joints[LEFT]->GetPosition(),
this->joints[LEFT]->GetHighStop(),this->joints[LEFT]->GetLowStop() );
+ printf("Right Pos[%f] High[%f]
Low[%f]\n",this->joints[RIGHT]->GetPosition(),
this->joints[RIGHT]->GetHighStop(),this->joints[RIGHT]->GetLowStop() );
+ */
+
+ // Set the state of the paddles
+ if (fabs(this->joints[LEFT]->GetPosition() -
+ this->joints[LEFT]->GetHighStop()) < 0.01 &&
+ fabs(this->joints[RIGHT]->GetPosition() -
+ this->joints[RIGHT]->GetLowStop()) < 0.01)
+ {
+ this->myIface->state = GAZEBO_GRIPPER_CLOSED;
+ this->myIface->left_paddle_open = 0;
+ this->myIface->right_paddle_open = 0;
+ }
+ else if (fabs(this->joints[LEFT]->GetPosition() -
+ this->joints[LEFT]->GetLowStop()) < 0.01 &&
+ fabs(this->joints[RIGHT]->GetPosition() -
+ this->joints[RIGHT]->GetHighStop()) < 0.01)
+ {
+ this->myIface->state = GAZEBO_GRIPPER_OPEN;
+ this->myIface->left_paddle_open = 1;
+ this->myIface->right_paddle_open = 1;
+ }
+ else
+ {
+ this->myIface->state = GAZEBO_GRIPPER_MOVING;
+ this->myIface->left_paddle_open = 0;
+ this->myIface->right_paddle_open = 0;
+ }
+
this->myIface->Unlock();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit