SintefManufacturing / python-urx

Python library to control a robot from 'Universal Robots' http://www.universal-robots.com/
GNU Lesser General Public License v3.0
526 stars 275 forks source link

How to kill the socket connection #108

Open Wang-Ruohan opened 2 years ago

Wang-Ruohan commented 2 years ago

Hi, I met a problem with killing the connection to the robot. I use the following statement to connect to the robot, rob = urx.Robot("192.168.0.100") However, when this program runs out and i end this program with ctrl+c, but not close the terminal. When i try to run the same program on the terminal i used before. It said: urx.ursecmon.TimeoutException: Did not receive a valid data packet from robot in 0.5 it seems that i did not fully kill the connection, the previous connection occupied the socket i want to connect. So, how can i fully kill it?

alvcap commented 1 year ago

have you tried executing rob.close() ?