20 from sr_robot_commander.sr_arm_commander
import SrArmCommander
21 from sr_robot_commander.sr_hand_commander
import SrHandCommander
24 rospy.init_node(
"grab_bottle_example", anonymous=
True)
26 hand_commander = SrHandCommander()
27 arm_commander = SrArmCommander()
29 print(
"Executing moves:")
35 print(
"Approach bottle")
36 hand_commander.move_to_named_target(
"open_bottle",
False)
37 arm_commander.move_to_named_target(
"approach_bottle",
True)
41 arm_commander.move_to_named_target(
"hold_bottle",
True)
42 hand_commander.move_to_named_target(
"hold_bottle",
True)
46 arm_commander.move_to_named_target(
"pour_bottle",
True)
49 print(
"Release bottle")
50 arm_commander.move_to_named_target(
"hold_bottle",
True)
51 hand_commander.move_to_named_target(
"open_bottle",
True)
55 arm_commander.move_to_named_target(
"approach_bottle",
True)
59 arm_commander.move_to_named_target(
"victory")
60 hand_commander.move_to_named_target(
"victory")