clenup fakerobot script
This commit is contained in:
parent
d6f1408c2c
commit
54d6a312cf
@ -41,12 +41,11 @@ class Server(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
||||
self.shutdown()
|
||||
|
||||
|
||||
class FakeRobot(object):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Port 0 means to select an arbitrary unused port
|
||||
host, port = "localhost", 30002 # this is the standard secondary port for a UR robot
|
||||
|
||||
def run(self):
|
||||
host = "localhost"
|
||||
port = 30002
|
||||
server = Server((host, port), RequestHandler)
|
||||
server.init()
|
||||
server_thread = threading.Thread(target=server.serve_forever)
|
||||
@ -64,3 +63,11 @@ if __name__ == "__main__":
|
||||
finally:
|
||||
print("Shutting down server")
|
||||
server.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
r = FakeRobot()
|
||||
r.run()
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user