-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpublisher.py
46 lines (30 loc) · 1.08 KB
/
publisher.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
import time
from ur3robot import UR3Robot
from tests import *
def run():
# Set host and port of mqtt broker
#broker = 'localhost'
broker = 'urpi.local'
port = 1883
# Create new client
robot = UR3Robot(broker, port)
# Start client thread for network traffic ("start sending commands and receiving data")
robot.start()
# ------------------------------
# START of programming movements
# Test to move robo to a given position with a given orientation, blending, velocity and acceleration
# robot.move_j_pose([0.21, -0.18, 0.50, 1.57, 0.13, 0.01], blend_radius=0.03, velocity=0.5, acceleration=0.2)
#robot.move_j_joints([0.21, -0.18, 0.50, 1.57, 0.13, 0.01])
test_set_upright(robot)
# run test function
test_line(robot)
time.sleep(3)
robot.evaluate_timing()
# END of programming movements
# ------------------------------
# our_client.pause()
# our_client.continue_after_pause()
# Stop client thread for network traffic before closing the program
robot.stop()
if __name__ == '__main__':
run()