ur_rtdeSearching for Universal Robots RTDE often produces a mixture of results for Universal Robots’ official RTDE Client and SDU Robotics’ ur_rtde. Their names are very similar and easily confused, but they are not the same library.
RTDE (Real-Time Data Exchange) is an official communication interface implemented in the Universal Robots controller. An RTDE client on an external PC connects to the UR controller via TCP/IP and reads and writes controller variables selected in a recipe.
The official Universal Robots RTDE Guide lists robot, joint, tool, safety, I/O, and general-purpose registers among its outputs, and defines digital / analog outputs and general-purpose input registers among its inputs. RTDE is therefore not merely a monitoring interface for reading controller state. A PC can also modify input values exposed by the controller.
However, the RTDE protocol itself does not contain URScript motion commands such as movej or movel. RTDE handles data fields exposed by the controller. Writing a value through RTDE from an external PC and determining how that value is interpreted as robot motion are separate matters.
Universal Robots itself primarily characterizes RTDE as a protocol for monitoring and modifying registers. Its description of client libraries for external monitoring and control explicitly introduces the Universal Robots RTDE Client Library and UR RTDE, developed at the University of Southern Denmark, as distinct libraries.
Universal Robots publishes RTDE_Python_Client_Library in its official GitHub organization. It is the official Python reference implementation of the Universal Robots RTDE protocol and is open source under BSD-3-Clause.
The library handles RTDE connections, recipes, and the sending and receiving of data packages. The official documentation describes example_control_loop.py as a control loop that configures input / output recipes on the RTDE server, processes values read from the controller, and then sends updated values back to it.
In the robot-motion example, rtde_control_loop.urp is executed on the robot alongside the PC-side Python program. The .urp program is not communicating in place of RTDE. The RTDE client already communicates directly with the controller. The robot-side program contains controller-side logic that converts the values received through RTDE into robot motion.
This distinction makes the responsibilities clear: official RTDE provides the bidirectional data interface to the controller, while the robot-side program gives that data meaning as robot motion.
ur_rtdeThe ur_rtde currently used in SUSANOO is not an official Universal Robots SDK. It is a third-party open-source library developed by SDU Robotics, associated with the University of Southern Denmark.
This does not mean it is an obscure library of unknown provenance. Universal Robots’ own developer pages introduce it separately from the official RTDE Client Library as “UR RTDE — a library developed at the University of Southern Denmark.” Nevertheless, its developer is not Universal Robots, so it should not be called an official manufacturer SDK.
SDU ur_rtde uses Universal Robots’ official RTDE protocol while providing high-level APIs named RTDEControlInterface, RTDEReceiveInterface, and RTDEIOInterface. Receive and IO can readily be understood as wrappers around RTDE data fields, but Control goes a step further.
SDU’s official documentation states that RTDEControlInterface requires a control script to run on the robot and that this script is uploaded automatically by default. Thus RTDEControlInterface.moveJ() does not work because the official Universal Robots RTDE protocol contains a moveJ packet.
On the PC side, RTDEControlInterface writes commands and parameters to controller registers via RTDE. SDU’s control URScript running on the robot reads those values and executes URScript motion commands such as movej, movel, and servoj. URControl executes that URScript just as it would an ordinary robot program, moving the physical Robot Arm.
The substance of SDU RTDEControlInterface is therefore a PC-side motion API built by using official Universal Robots RTDE as the communication channel and combining it with controller-side URScript supplied by SDU.
ur_rtdeThe distinction does not mean “official RTDE is genuine and SDU is fake.” The RTDE used for communication by SDU ur_rtde is the very same official Universal Robots RTDE.
The difference lies in how much responsibility each library takes on.
The official Universal Robots RTDE Client Library implements a client for the RTDE protocol, reading and writing controller data fields. If those fields are to be used for robot motion, the controller-side program must define what the motion means.
SDU ur_rtde takes responsibility for the next step as well. It supplies the control URScript and PC-side API together, making it appear to the user that moveJ, moveL, servoJ, and other motion operations can be called directly. In other words, in addition to an “RTDE protocol wrapper,” it implements its own “motion-command layer using RTDE registers and URScript.”
Since Universal Robots’ official RTDE motion example also combines RTDE with a controller-side program, SDU has not invented some peculiar approach. It is more accurate to understand SDU as having generalized that architecture and packaged preparation of the controller-side script and the PC-side API into one library.
The current SUSANOO UR control code uses SDU Robotics’ ur_rtde. Accordingly, its moveJ(), moveL(), servoJ(), and related calls are APIs of SDU RTDEControlInterface, not APIs of Universal Robots’ official RTDE Client Library.
Motion control uses RTDEControlInterface, behind which SDU’s control URScript runs on the controller. State acquisition uses RTDEReceiveInterface, and I/O uses RTDEIOInterface. In addition, the Dashboard Server is used separately for power, brake release, program management, and related operations, while the Primary Interface is used to retrieve controller messages / errors.
It would therefore be imprecise to describe the current implementation simply as “controlling UR via RTDE.” More precisely, it combines the control / receive / IO layers of SDU Robotics’ ur_rtde, built on official Universal Robots RTDE, with Universal Robots’ official Dashboard / Primary Interface.
This distinction also matters when reviewing the control code in the future. To decide whether to continue using SDU ur_rtde or switch to Universal Robots’ official client library or another official-family driver, the “RTDE protocol” and the “motion API built on top of it by SDU” must first be treated as separate layers.