# Universal Robot, RTDE interface connecting with python

**URL:** <https://forum.universal-robots.com/t/universal-robot-rtde-interface-connecting-with-python/23788>\
**Category:** Robot Communication\
**Created:** [September 12, 2022, 2:21pm UTC](https://forum.universal-robots.com/t/universal-robot-rtde-interface-connecting-with-python/23788 "2022-09-12T14:21:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon83714941](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@anon83714941](https://forum.universal-robots.com/u/anon83714941)\
**Post date:** [September 12, 2022, 2:21pm UTC](https://forum.universal-robots.com/t/universal-robot-rtde-interface-connecting-with-python/23788/1 "2022-09-12T14:21:44Z")

</div>

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.
