Chapter 3: Architecture of RTDE and ur_rtde

About this chapter

When controlling Universal Robots, it is necessary to distinguish between the official Universal Robots RTDE and SDU Robotics ur_rtde.

RTDE is an official bidirectional data interface provided by the UR controller. By contrast, RTDEControlInterface, RTDEReceiveInterface, and RTDEIOInterface, which are used in this documentation, are APIs of the third-party open-source ur_rtde library developed by SDU Robotics.

This chapter explains how the two relate to each other and how responsibilities are divided in the current implementation, including the Dashboard Server and the Primary / Secondary Interfaces.


3.1 Official Universal Robots RTDE

RTDE (Real-Time Data Exchange) is an official Universal Robots protocol for reading and writing data fields exposed by the controller between an external application and the UR controller.

In addition to reading state, it can write controller-exposed input values such as I/O, the speed slider, and general-purpose input registers.

However, the RTDE protocol itself does not define URScript motion commands such as movej, movel, or servoj. Writing a value to the controller through RTDE and interpreting that value as robot motion are separate responsibilities.


3.2 SDU Robotics ur_rtde

The ur_rtde library used by the current Python implementation is not an official Universal Robots SDK. It is a third-party open-source library developed by SDU Robotics.

ur_rtde mainly provides the following interfaces, separated by responsibility:

  • RTDEControlInterface: motion control

  • RTDEReceiveInterface: retrieving controller state

  • RTDEIOInterface: I/O operations

These interfaces use the official Universal Robots RTDE protocol, but the motion API called RTDEControlInterface is not itself part of that official protocol.


3.3 What RTDEControlInterface Actually Does

RTDEControlInterface provides a motion-control interface that allows a PC to call methods such as moveJ(), moveL(), and servoJ().

Its implementation coordinates the PC-side RTDEControlInterface with an SDU control URScript running on the robot. The PC side uses registers in the official Universal Robots RTDE protocol to pass commands and parameters to the controller. The control URScript reads those values and executes URScript motion commands such as movej, movel, and servoj.

Consequently, RTDEControlInterface.moveJ() must not be understood as an API that directly invokes a MoveJ command defined by the official RTDE protocol.


3.4 RTDEReceiveInterface

RTDEReceiveInterface is the state-retrieval interface of SDU Robotics ur_rtde. It uses output data from the official Universal Robots RTDE protocol and exposes convenient PC-side APIs for values such as current joint angles, TCP pose, robot mode, and safety mode.

It does not provide motion commands.


3.5 RTDEIOInterface

RTDEIOInterface is the I/O interface of SDU Robotics ur_rtde. It uses writable fields in the official Universal Robots RTDE protocol to operate Standard Digital Outputs, Tool Digital Outputs, Analog Outputs, and similar signals.


3.6 Dashboard Server

The Dashboard Server is an official Universal Robots management TCP interface, separate from both the RTDE protocol and SDU Robotics ur_rtde.

It handles controller operation management, including Power On / Off, Brake Release, program load / play / pause / stop, and recovery from a Protective Stop.


3.7 Primary / Secondary Interface

The Primary / Secondary Interfaces are also official Universal Robots interfaces. They are used to retrieve controller information and send URScript, among other tasks.

Parts of the current implementation use the Primary Interface to retrieve controller messages and errors.


3.8 Division of Responsibilities in URCtrl

URCtrl brings these different interfaces together under a higher-level common API.

Function

Main implementation currently used

Motion control

SDU RTDEControlInterface

State retrieval

SDU RTDEReceiveInterface

I/O

SDU RTDEIOInterface

Operation management

Universal Robots Dashboard Server

Controller messages / errors

Universal Robots Primary Interface

Users normally access these functions through URCtrl rather than operating each interface individually.


Summary

The official Universal Robots RTDE is a protocol for reading and writing controller data fields.

The SDU Robotics ur_rtde library currently in use is third-party open-source software that uses this official RTDE protocol. RTDEControlInterface additionally combines it with a robot-side control URScript to implement its motion API.

Therefore, the official RTDE protocol, SDU Robotics ur_rtde, URScript, Dashboard Server, and Primary / Secondary Interfaces must be treated as layers with distinct responsibilities.