The arbotix_controllers package has several gripper controllers. The one you're looking for is the parallel_gripper_controller.py. Here is a snippet of the launch file I use for my robot, Maxwell:
<node name="gripper_controller" pkg="arbotix_controllers" type="parallel_gripper_controller.py">
<param name="pad_width" value="0.0381" />
<param name="finger_length" value="0.08255" />
<param name="center_left" value="0.18" />
<param name="center_right" value="0.18" />
<param name="invert_left" value="True" />
</node>
The controller basically assumes that the base and opening of the fingers form the sides of a parallelogram. The pad_width is the distance between the two servo horn centers. The finger length is the distance from the servo horn to the "grasping point" on the finger (this may not be the end of the fingers). The "center" parameters then set the radian values for each servo when the fingers are parallel. Finally, you can use the invert_x parameter to reverse a particular servo.
Originally posted by fergs with karma: 13902 on 2012-07-08
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Scott on 2012-07-10:
Thanks for the reply Michael. Can't wait to try it. btw I am a huge Maxwell fan and hope to build a Maxwell of my own in the not too distant future.