Beginner help for UR RTDE

Hello, I have been learning to program a UR10 (I simulate the robot in Visual Components, and post process the program to create a script file), and using the data available, when running the script from the controller to do some analysis. I am relatively new to robot communications and coding. At the moment I am trying to understand RTDE, inputs and outputs and what all can be done. I am wondering if anyone could share their knowledge/experience so I can understand this all a bit more.

I am using the UR10 cb3 series – I am aware I am limited to the frequency of 125Hz. I am using python 2, and Spyder 3 to execute scripts.

I downloaded the rtde zip file available from : Real-Time Data Exchange (RTDE) Guide - 22229

From my laptop, I use a script that sends my script file to the robot (which is on the same network as the robot) from this link. For some reason I only use from “HOST”. It seems to work ok. I use port 30003.

I run the ‘record.py’ file, when running through a program. From what I understand, it imports and uses code from the ‘rtde’ folder. I am not entirely sure how everything works in the scripts in the rtde file, but from the CSV file that the ‘record’ script populates that the data is coming in at 125Hz, i.e. one row of data every 0.008seconds.

I have ‘parser.add_argument(‘–port’, type=int, default=30004, help=‘port number (30004)’)’.

So I think this data is being received from the 30004 port?

I can understand the data being output, like temperature in each joint, until I get to terms like ‘standard_analog_’, ‘output_bit_registers’. Outside the output terms on the page Real-Time Data Exchange (RTDE) Guide - 22229 I am not really sure what the rest the information is telling me. I am assuming this is because I am unfamiliar with ‘communication’ field.

What I would primarily like to understand and use is ‘ROBOT CONTROLLER INPUTS’. Is it correct that this is information you can send to the robot? Can anyone help me with understanding these inputs, as a beginner I thought the only thing you could send to a robot was the script, i.e. robot positions, speed etc.! I am not sure what would happen if I sent this, and how this information is actually sent. Is it through the ‘control_loop.py’ file? I am also unfamiliar with the terms in this such as ‘recipe’ and ‘register’.

I have also come across the python package ur-rtde, has anyone used this or know how it differs from the scripts provided by UR? Introduction — ur_rtde 1.5.5 documentation

I would really appreciate any help/advice on my questions that will help me understand this topic more.

Thanks in advance! Lauren

1 Like

Hello lmcgarry05,

Welcome to UR community!

I will try to summarize the main things about communication interfaces available in UR robots.

First of all, I will encourage you to take a look to this article, where there is an overview to all client interfaces:
https://www.universal-robots.com/articles/ur/interface-communication/overview-of-client-interfaces/

You also have this article, where there is a useful summary table of the different options to control the robot via TCP/IP:
https://www.universal-robots.com/articles/ur/interface-communication/remote-control-via-tcpip/

As you can see in the previous article, there are 4 main ports to communicate with: 30001 to 30004, and each one of them behaves differently regarding frequency, received data or sent data. For example, primary interface (port 30001) will accept URScript commands directly (same as you are doing with 30003), and will transmit a full message at 10 Hz frequency (10 times per second). This message that you will receive when connecting to 30001 is fixed (not configurable by user), and it’s described in detail in the excel file at the bottom of the article.

However, RTDE works a bit differently: you will not be able to send URScrip commands directly to 30004 port. Instead, there is a big map of input and output registers available, and you will be able to choose which of them you would like to read or write. In the RTDE article you have the complete list of registers available, and the type of data each one contains. A lot of them are basically read-only information about robot status (joint positions, joint velocities, TCP pose, TCP speed, joint temperatures… and a lot more). And there are also a bunch of empty registers available for you to write whatever data you need on them. Well, not whatever: basically bits, integers, or floats. Those are called General purpose registers.

And unlike the rest of the interfaces, in RTDE you will be able to choose which registers from that big list you would like to exchange, and how frequently you would like to do it (up to 500 Hz in eSeries, 125 Hz in CB3). The file that will allow you to choose which registers will you RTDE message contain is what we call ‘recipe’.

The record.py file that you mentioned will serve you to record the message received in a csv file, but if what you want to do is to not only read but also write on those registers, maybe you would need to use something more similar to the other one (control loop). For this, a program needs to be running in the robot controller to handle this data (read it or write it). From the robot side, you can access this data from PolyScope I/O Setup in the Installation Tab (Bit, Integer and Float Registers) or using the script codes associated.

I hope this helps you get started.
Guillermo

2 Likes

On top of great summary made by @ggcr I can add that there is also ROS driver for UR robots: GitHub - UniversalRobots/Universal_Robots_ROS_Driver: Universal Robots ROS driver supporting CB3 and e-Series
Under the hood ROS driver is using all public interfaces.

If you still want to use RTDE directly, then you can think of “inputs” as a mean of communicating with a script running on a robot from outside world (PLC for example). “outputs” report various robot parameters in real time.

General purpose registers are easy way to pass arbitrary values between running program and external application.
On URScript side (manual can be downloaded UR Download | Support Site | Universal Robots) you can use read_input...register() and write_output...register() functions.

ur_rtde is another great project similar to ROS driver, however it’s not directly supported by UR.

Hi,
I have implemented a connection to the Dashboard Server of the UR from a Siemens S7-1510 PLC using TCP/IP. Right now, the command list from the dashboard server, provides triggers for loading program, pausing, playing, stopping etc., which works nicely. But in order to do some coordinate transformation from base to create a new plane, I couldn’t find commands or methods via the dashboard server.

Is there any method to create feature planes, trigger poses or pass transformed points to the robot using a PLC?

It would be of great help if you could support on this topic.

You could look into using Universal Robots - Interpreter mode
Planes can’t be created in the program (possibly they can be added though URCap Java API), but existing planes can be transformed using script functions. Global plane variables can even be modified by a program.

1 Like

can anyone please help me about the interface with MATLAB and ur5e in detail

  1. Ip address is pinged of ur5e to computer and its working.
  2. Matlab has no errors and it is telling it is connected .
  3. but robot is not moving

please please help

Here are som info on how to setup RTDE (not programming, but computer, network,etc.)

thankyou for the answer i will try and get back to you

hi sir,

Boost is too horrible itis not working what can i do please help me

Yes, I also had a lot of problems installing Boost

In the “How To RTDE” document you will find a walk-around to install release 1.82.0

You could also try to ask on Discord HELP forum if somebody here have a better advise on how to install Boost

This fake b2.exe file will be found and deleted by the bat program and then it will build the real b2.exe program. Stupid error but this fix solves the problem. Now we can run the b2 program to install Boost.

in this fake b2.exe is done and next what to do please reply

After you have installed Boost you must also add the path to the PATH environment in Windows (see the description in How To RTDE)

If you also have Python and Cmake installed you are ready to install “ur_rtde” in Python. Just follow the description in the How To RTDE document

Ps: Make sure you Windows will let you install programs under Python. See the first part of the How To RTDE document

I am Just starting with UR robot 10e. i wanted to control robot through laptop how can i establish a connection. Is there any step by step procedure avialable for connection.


I am getting this error on 3rd step. Is there any remedy for me

There is a walk around to this problem in the “How to RTDE” document
Link above

this dont work go with python it will work

1 Like