-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.py
More file actions
33 lines (33 loc) · 1.26 KB
/
Copy pathtest_script.py
File metadata and controls
33 lines (33 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from robot_api import move_robot_joints, home_robot, delay_robot, get_robot_joint_angles, control_pneumatic_gripper,get_robot_pose, control_electric_gripper, move_robot_pose,move_robot_cartesian,get_electric_gripper_status,get_robot_io
import time
print("Homing robot...")
time.sleep(2)
control_electric_gripper(action = "calibrate")
time.sleep(2)
control_electric_gripper(action='move', position=100, speed=150, current = 200)
time.sleep(2)
control_electric_gripper(action='move', position=200, speed=150, current = 200)
time.sleep(2)
print(get_robot_joint_angles())
print(get_robot_pose())
print("Moving to new position...")
control_pneumatic_gripper("open",1)
time.sleep(0.3)
control_pneumatic_gripper("close",1)
time.sleep(0.3)
control_pneumatic_gripper("open",1)
time.sleep(0.3)
control_pneumatic_gripper("close",1)
time.sleep(0.3)
move_robot_joints([90, -90, 160, 12, 12, 180], duration=5.5)
time.sleep(6)
move_robot_joints([50, -60, 180, -12, 32, 0], duration=5.5)
time.sleep(6)
move_robot_joints([90, -90, 160, 12, 12, 180], duration=5.5)
time.sleep(6)
move_robot_pose([7, 250, 200, -100, 0, -90], duration=5.5)
time.sleep(6)
move_robot_cartesian([7, 250, 150, -100, 0, -90], speed_percentage=50)
delay_robot(0.2)
print(get_electric_gripper_status())
print(get_robot_io())