sr_bottle_example.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 from sr_robot_commander.sr_arm_commander import SrArmCommander
00005 from sr_robot_commander.sr_hand_commander import SrHandCommander
00006 
00007 
00008 rospy.init_node("grab_bottle_examples", anonymous=True)
00009 
00010 hand_commander = SrHandCommander()
00011 arm_commander = SrArmCommander()
00012 
00013 #start a bit higher
00014 #arm_commander.move_to_named_target("gamma", True)
00015 
00016 #approach
00017 hand_commander.move_to_named_target("open_bottle", False)
00018 arm_commander.move_to_named_target("approach_bottle", True)
00019 
00020 #grab
00021 arm_commander.move_to_named_target("hold_bottle", True)
00022 hand_commander.move_to_named_target("hold_bottle", True)
00023 
00024 #pour
00025 arm_commander.move_to_named_target("pour_bottle", True)
00026 
00027 #release
00028 arm_commander.move_to_named_target("hold_bottle", True)
00029 hand_commander.move_to_named_target("open_bottle", True)
00030 
00031 #and move back
00032 arm_commander.move_to_named_target("approach_bottle", True)
00033 
00034 arm_commander.move_to_named_target("victory")
00035 hand_commander.move_to_named_target("victory")
00036 


sr_example
Author(s): Ugo Cupcic
autogenerated on Fri Aug 21 2015 12:25:43