Universal Robots Forum

I control ur5e through socket. Where is the current TCP coordinate of the robot and the hand grip closing width of the robot?

I control ur5e through socket. Where is the current TCP coordinate of the robot and the hand grip closing width of the robot?

self.tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.tcp_socket.connect((self.tcp_host_ip, self.tcp_port))
state_data = self.tcp_socket.recv(2048)

Like this, state_ Which section of the data returned by data is the current TCP coordinate and which section is the joint coordinate?

My ur version is 5.10

You can read the robot position, and access other variables through the Real Time Data Exchange, check out the python examples at the bottom of this article:

https://www.universal-robots.cn/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/

Thank you.
But according to the work requirements, how can I get this information through socket?