UniversalRobots / RTDE_Python_Client_Library

RTDE client library and examples
BSD 3-Clause "New" or "Revised" License
100 stars 35 forks source link

Infinite "Unknown package command: x" error #10

Open sri331 opened 1 year ago

sri331 commented 1 year ago

Hi team,

I am using latest RTDE version and running a program which moves the robot head to 165 different positions in a cylindrical pattern with a time delay of 10 seconds after moving to each position. I am using a thread that sends the watchdog for every second to make the connection active. The program is randomly going to infinite loop with the below error.

What could be the possible cause for the infinite loop ?Are we loosing the connection to the controller ? In that case can it be restored automatically ?

“Unknown package command: 0”

File "C:path\RTDE_Python_Client_Library-main\examples\interopTest_CircleTest.py", line 251, in move_to_exHandle(con, setp, topCenter) File "C:path\RTDE_Python_Client_Library-main\examples\interopTest_CircleTest.py", line 72, in move_to_exHandle move_to(con, setp, new_setp) File "C:path\RTDE_Python_Client_Library-main\examples\interopTest_CircleTest.py", line 85, in move_to Cur_state = con.receive() File "C:path\RTDE_Python_Client_Library-main\rtde\rtde.py", line 218, in receive return self.recv(Command.RTDE_DATA_PACKAGE, binary) File "C:path\RTDE_Python_Client_Library-main\rtde\rtde.py", line 320, in recv data = self.on_packet(packet_header.command, packet) File "C:path\RTDE_Python_Client_Library-main\rtde\rtde.py", line 273, in on_packet _log.error("Unknown package command: " + str(cmd)) File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging__init.py", line 1506, in error self._log(ERROR, msg, args, **kwargs) File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging__init__.py", line 1624, in _log self.handle(record) File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging\init.py", line 1634, in handle self.callHandlers(record) File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging\init.py", line 1704, in callHandlers lastResort.handle(record) File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging\init.py", line 966, in handle self.acquire() File "C:\userPath\AppData\Local\Programs\Python\Python310\lib\logging\init__.py", line 917, in acquire self.lock.acquire()

michal-milkowski commented 11 months ago

hey @sri331 it's long time since it was reported, but I'd need more details. How often is receive called? What frequency do you set when initializing connection? What version of robot software are you using? Looks like corrupted data sent by robot.