Good morning @wojciech.goral,
Thank you for testing the code! This reply is a bit long so if you want me to shorten it, I’ll be happy to! When I ran the above code, I get the following error:
runfile('C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples/test.py', wdir='C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples')
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 68
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 1092
tried 11 times to find a packet in data, advertised packet size: -2, type: 3
Data length: 1539
Traceback (most recent call last):
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\public\documents\rtde_readdata\rtde_python_client_library-main\rtde_python_client_library-main\examples\test.py:10
rob.movej([0.0,0,0,0,0,0], 0.5, 1.0)
File C:\ProgramData\anaconda3\Lib\site-packages\urx\urrobot.py:277 in movej
self._wait_for_move(joints[:6], threshold=threshold, joints=True)
File C:\ProgramData\anaconda3\Lib\site-packages\urx\urrobot.py:217 in _wait_for_move
raise RobotException("Robot stopped")
RobotException: Robot stopped
Then, when I searched online, I saw someone modified the code to be the following. I’m not sure what the additional two inputs are supposed to mean.
rob.movej([0.0,0,0,0,0,0], 0.5, 1.0, 0, 0)
After doing that, I sometimes get one of two different error messages.
This is the first type:
runfile('C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples/test.py', wdir='C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples')
Exception in thread Thread-26:
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py", line 286, in run
Traceback (most recent call last):
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\public\documents\rtde_readdata\rtde_python_client_library-main\rtde_python_client_library-main\examples\test.py:6
rob = urx.Robot("172.22.22.2")
File C:\ProgramData\anaconda3\Lib\site-packages\urx\robot.py:27 in __init__
URRobot.__init__(self, host, use_rt)
File C:\ProgramData\anaconda3\Lib\site-packages\urx\urrobot.py:38 in __init__
self.secmon = ursecmon.SecondaryMonitor(self.host) # data from robot at 10Hz
File C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py:252 in __init__
self.wait() # make sure we got some data before someone calls us
File C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py:344 in wait
raise TimeoutException("Did not receive a valid data packet from robot in {}".format(timeout))
TimeoutException: Did not receive a valid data packet from robot in 0.5
data = self._get_data()
^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py", line 333, in _get_data
tmp = self._s_secondary.recv(1024)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
and this is the second type:
runfile('C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples/test.py', wdir='C:/Users/Public/Documents/RTDE_ReadData/RTDE_Python_Client_Library-main/RTDE_Python_Client_Library-main/examples')
Exception in thread Thread-31:
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py", line 286, in run
data = self._get_data()
^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py", line 333, in _get_data
tmp = self._s_secondary.recv(1024)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
Traceback (most recent call last):
File C:\ProgramData\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\public\documents\rtde_readdata\rtde_python_client_library-main\rtde_python_client_library-main\examples\test.py:6
rob = urx.Robot("172.22.22.2")
File C:\ProgramData\anaconda3\Lib\site-packages\urx\robot.py:27 in __init__
URRobot.__init__(self, host, use_rt)
File C:\ProgramData\anaconda3\Lib\site-packages\urx\urrobot.py:38 in __init__
self.secmon = ursecmon.SecondaryMonitor(self.host) # data from robot at 10Hz
File C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py:252 in __init__
self.wait() # make sure we got some data before someone calls us
File C:\ProgramData\anaconda3\Lib\site-packages\urx\ursecmon.py:344 in wait
raise TimeoutException("Did not receive a valid data packet from robot in {}".format(timeout))
TimeoutException: Did not receive a valid data packet from robot in 0.5
Does this mean the connection is bad? I am using an Ethernet cable to connect from my Windows computer directly to the control box. On the Windows computer, I am using a USB-to-Ethernet adapter because the ethernet port is taken up by another ethernet connection. Thank you so much again for your time!