Hi, I am new in this field and trying to remotely control universal robot with primary and rtde interface. I don’t need much information so we don’t want to use some big libraries or frameworks.
For primary interface code worked perfectly:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 30001))
s.send(movej(p[-0.175,-0.607,0.092,1.211,-1.215,1.113], a=1,v=0.25)" + “\n”.encode())
s.close()
Robot moves, but with rtde I have some problems. Code looks like this:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 30004))
s.send(movej( ‘get_actual_tcp_pose()’".encode())
tcp = s.recv(77)
print(tcp)
s.close()
it prints empty byte object (b""), decoding it also gives empty string. I think problem is with incorrectly using socket. Please help me how to get actual data.