19 import moveit_commander
21 from std_msgs.msg
import UInt8
28 print(
"PID Gain Preset. No." + str(pid_gain_no))
30 preset_no.data = pid_gain_no
31 pub_preset.publish(preset_no)
37 rospy.init_node(
"preset_pid_gain_example")
38 arm = moveit_commander.MoveGroupCommander(
"r_arm_group")
39 arm.set_max_velocity_scaling_factor(0.1)
47 print(
"set named target : r_arm_init_pose")
48 arm.set_named_target(
"r_arm_init_pose")
60 for i
in range(sleep_seconds):
61 print( str(sleep_seconds-i) +
" counts left.")
65 arm.set_pose_target(arm.get_current_pose())
72 print(
"set named target : r_arm_init_pose")
73 arm.set_named_target(
"r_arm_init_pose")
79 if __name__ ==
'__main__':
82 pub_preset = rospy.Publisher(
"preset_gain_no", UInt8, queue_size=1)
85 if not rospy.is_shutdown():
87 except rospy.ROSInterruptException: