Skip to content

Entering negative x, y, z values for move j results in TimeOut #122

@n-conq

Description

@n-conq

Trying to movej in a negative z direction results in the error below. Does anyone know why or how to fix it?

from urx import Robot
from time import sleep
import math3d as m3d

rob = Robot("169.254.1.2")

#tool center point (tcp) in (x,y,z,rx,ry,rz)
rob.set_tcp((0, 0, 0.1, 0, 0, 0))
#payload in (kg, (center of gravity x, cog y, cog z))
rob.set_payload(0.85, (0, 0, 0.1))
sleep(0.5)
x, y, z = 0, 0, -0.1
rx, ry, rz = 0, 0, 0
a, v = 0.1, 0.1
rob.movej((x, y, z, rx, ry, rz), a, v, relative= True, wait=True)

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
Traceback (most recent call last):
File "c:\Users\Sophie\OneDrive\Desktop\Promotion\CryoTec\UR5_control", line 6, in
rob = Robot("169.254.1.2")
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\robot.py", line 27, in init
URRobot.init(self, host, use_rt, use_simulation)
self.run()
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\ursecmon.py", line 291, in run
data = self._get_data()
^^^^^^^^^^^^^^^^
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\ursecmon.py", line 338, in _get_data
tmp = self._s_secondary.recv(1024)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\urrobot.py", line 38, in init
self.secmon = ursecmon.SecondaryMonitor(self.host, use_simulation) # data from robot at 10Hz
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\ursecmon.py", line 257, in init
self.wait() # make sure we got some data before someone calls us
^^^^^^^^^^^
File "C:\Users\Sophie\AppData\Local\Programs\Python\Python312\Lib\site-packages\urx\ursecmon.py", line 349, in wait
raise TimeoutException("Did not receive a valid data packet from robot in {}".format(timeout))
urx.ursecmon.TimeoutException: Did not receive a valid data packet from robot in 0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions