duaro_demo.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 
5 from moveit_commander import MoveGroupCommander
6 
7 if __name__ == '__main__':
8 
9  #init_node()
10  group = MoveGroupCommander("botharms")
11  sleep_time = 0.2
12  exec_vel = 1.0
13 
14  while True:
15  # home
16  group.set_max_velocity_scaling_factor(exec_vel*0.2)
17  group.set_joint_value_target([-0.78, 0.78, 0.14, 0.0, 0.78, -0.78, 0.14, 0.0])
18  group.go()
19  rospy.sleep(sleep_time)
20 
21  group.set_max_velocity_scaling_factor(exec_vel)
22  group.set_joint_value_target([-1.5, 1.5, 0.14, 0.0, 1.5, -1.5, 0.14, 0.0])
23  group.go()
24  rospy.sleep(sleep_time)
25 
26  num = 0
27  while num < 5:
28  group.set_max_velocity_scaling_factor(exec_vel*0.2)
29  group.set_joint_value_target([-1.5, 1.5, 0.06, 0.0, 1.5, -1.5, 0.06, 0.0])
30  group.go()
31  group.set_max_velocity_scaling_factor(exec_vel*0.2)
32  group.set_joint_value_target([-1.5, 1.5, 0.14, 0.0, 1.5, -1.5, 0.14, 0.0])
33  group.go()
34  num += 1
35 
36  #group.set_max_velocity_scaling_factor(exec_vel)
37  #group.set_joint_value_target([-0.6, 0.78, 0.0, 0.0, 0.6, -0.78, 0.0, 0.0])
38  #group.go()
39  #rospy.sleep(sleep_time)
40 
41  group.set_max_velocity_scaling_factor(exec_vel)
42  group.set_joint_value_target([-0.6, 0.78, 0.06, 0.0, 1.5, -1.5, 0.06, 0.0])
43  group.go()
44  group.set_max_velocity_scaling_factor(exec_vel)
45  group.set_joint_value_target([-0.6, 0.78, 0.06, 0.0, 0.6, -0.78, 0.06, 0.0])
46  group.go()
47  rospy.sleep(sleep_time)
48 
49  group.set_max_velocity_scaling_factor(exec_vel)
50  group.set_joint_value_target([-0.78, 0.78, 0.06, 0.0, 0.78, -0.78, 0.06, 0.0])
51  group.go()
52  rospy.sleep(sleep_time)


khi_duaro_moveit_config
Author(s): matsui_hiro
autogenerated on Fri Mar 26 2021 02:34:19