Universal Robots RTDE C++/Python Interface

ur_rtde

A C++ interface that uses the Real-Time Data Exchange (RTDE) interface of the robot for sending and receiving data. The interface can also by used with python, through the provided python bindings.

Motivation

No widely available C++ interface that utilizes the RTDE of the UR’s exists or have been made public yet. Most of the available ROS interfaces lacks a lot of features or are very restricted in terms of control and has poor support for the new e-Series. This interface is meant to be usable with various robot frameworks, which is why the receive and control interface relies only on STL datatypes. One can choose to convert to STL types or simply rewrite the control and receive interfaces to the desired datatypes to avoid any overhead. The interface aims to make all the functions on the controller available externally in C++ and Python with bindings. Finally the plan is to make a more complete ROS1/ROS2 interface based on this project. However, I am aware of the effort towards making a new ROS interface mentioned here and perhaps this project could serve as an inspiration.

You can find project here: SDU Robotics / ur_rtde · GitLab

Documentation with examples and API resides at:
Universal Robots RTDE C++ Interface — ur_rtde 1.5.5 documentation.

Let me know what you think and feel free to contribute!

7 Likes

Thanks for sharing! Sounds like a useful tool, I’m looking forward to checking it out!

Hello, every example file includes rtde_export header but its not anywhere - where do I get it?

Hi Peter

Please post issues specifically related to ur_rtde on the issues page of ur_rtde here then its easier for me to help you. With that being said, the rtde_export header is generated by CMake, when you compile the project. Did you follow the instructions given in the documentation?

Best regards
Anders

1 Like

Hello, I try to use ur_ Does rtde need to install any ur cap on the teaching pendant to control the ur5e robot?

import rtde_control
import rtde_receive
import time
rtde_c = rtde_control.RTDEControlInterface(“172.16.17.6”)
rtde_c.moveL([-0.143, -0.435, 0.20, 0, 2.22, -2.22], 0.5, 0.3)

error: rtde_c = rtde_control.RTDEControlInterface(“172.16.17.6”)
RuntimeError: ur_rtde: Please enable remote control on the robot!

Hello, I tried one of the examples with ur_rtde interface in python using virtual machine and it worked, but i wanted to know is it possible to get the robot’s position in real time as I want to use it with reinforcement learning.

As I went through documentation I did not see many commands. Is it possible with the interface to get tcp position in real time or after its finished moving??

Hi Adarsh

You can get the robot position or pose in real-time through the RTDEReceiveInterface with the function getActualTCPPose()

1 Like

Hello,
I am trying build a DLL out of this library so that it can be used in LabVIEW, but for that all the header files are needed and I have found all of them except one which is “rtde_export.h” please can you help me by sharing this file or letting me know where I can find this header file?

To get “rtde_export.h”, you’ll need to build the project using CMake. This part of the ur_rtde documentation should help guide you in the right direction.

This project can be built in the windows OS as well, right?