open_gripper.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import roslib
00004 roslib.load_manifest('pr2_plugs_actions')
00005 
00006 import rospy
00007 from pr2_plugs_msgs.msg import *
00008 from pr2_controllers_msgs.msg import *
00009 import actionlib
00010 
00011 
00012 def main():
00013   rospy.init_node("open_gripper_test")
00014 
00015   # Open gripper goal
00016   open_gripper_goal = Pr2GripperCommandGoal()
00017   open_gripper_goal.command.position = 0.07
00018   open_gripper_goal.command.max_effort = 99999
00019 
00020   # publisher for commands
00021   client = actionlib.SimpleActionClient('r_gripper_controller/gripper_action', Pr2GripperCommandAction)
00022   client.wait_for_server(rospy.Duration(3.0))
00023   client.send_goal(open_gripper_goal)
00024 
00025   client.wait_for_result()
00026 
00027   print client.get_result()
00028 
00029 if __name__ == "__main__":
00030   main()
00031 


pr2_plugs_actions
Author(s): Jon Bohren, Patrick Mihelich, Wim Meeussen, and Melonee Wise
autogenerated on Thu Nov 28 2013 11:47:13