Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
n-conq opened this issue Apr 10, 2024 · 0 comments
Open

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

n-conq opened this issue Apr 10, 2024 · 0 comments

Comments

@n-conq
Copy link

n-conq commented Apr 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant