Go to the documentation of this file.00001
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
00014
00015
00016
00017 hand_commander.move_to_named_target("open_bottle", False)
00018 arm_commander.move_to_named_target("approach_bottle", True)
00019
00020
00021 arm_commander.move_to_named_target("hold_bottle", True)
00022 hand_commander.move_to_named_target("hold_bottle", True)
00023
00024
00025 arm_commander.move_to_named_target("pour_bottle", True)
00026
00027
00028 arm_commander.move_to_named_target("hold_bottle", True)
00029 hand_commander.move_to_named_target("open_bottle", True)
00030
00031
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