Hey everyone,
I would like to learn how to use the RTDE protocol. I am currently using an eSeries robot.
I know how to use primary & secondary interface and real time. I know that the best / most optimal solution is to use RTDE.
I have read a little about this interface but I can not quite understand it.
The second problem is that I would like to connect the UR eSeries robot via RTDE with the LABVIEW environment on my computer.
What I am doing:
Connect to port 30004.
Then I send a string (using the big-endian form), for example:
Then I go on to the continuous reading of information that should come via RTDE from the robot to my application.
Unfortunately, all the time I get the information: jM Parse Error: package type is not supported or package invalid, package type: data: <? Xml version = “1.0”
Is there anything else he should do to read the timestamp correctly?
Maybe someone has already worked with RTDE and LabVIEW?
Thanks in advance for time and help!
Hey everyone,
Can anyone have similar feedback from RTDE?
Or if someone is able to provide some other important information that should be kept in mind when using RTDE communication?
Thanks!
RTDE uses binary protocol. Recipe files, are read by python examples, and used for constructing binary messages sent to controller.
Example sequence would be: RTDE_REQUEST_PROTOCOL_VERSION - request controller to use latest protocol version (2 is latest at this moment) RTDE_CONTROL_PACKAGE_SETUP_OUTPUTS - output variables that you need RTDE_CONTROL_PACKAGE_START - request controller to start sending data
poll socket for data packets continuously RTDE_CONTROL_PACKAGE_PAUSE - let controller know that you’re about to terminate your program
To get better overview, you can look into python RTDE client library, or use protocol sniffer (wireshark, etc…).
Thank you for your response.
As soon as I have the opportunity I will test what you have suggested and I will write what I managed to achieve in this topic
I’ve also been working to get something working in LabVIEW with RTDE and had some trouble getting things started. I ended up digging through the python code and using wireshark to see exactly what is being sent and it turns out it has nothing to do with xml. That is just the way that the python example stores the information of what variable it wants. I found it easier to follow the protocol outlined here: Real-Time Data Exchange (RTDE) Guide - 22229
I’ve attached a VI that I use in order to format command to configure outputs. The resulting string is what you would send over TCP to the RTDE interface. If we were trying to setup the RTDE in the same way as Mirosalv, we want to configure the RTDE output to give us the timestamp. The first thing we need to do is determine the package type according the the protocol I linked above. Around the middle of the page it says that the package type to configure an output is 79 (in U8 representation). To configure the outputs you have to send an update frequency in hertz (a double typecast to HEX) and a comma separated list of the variables you want returned using the exact naming shown in that link.
So if you wanted to know the timestamp and target joint positions at a rate of 125 Hz, you’d wire 79 into the command ID input, 125 into the Output Freq. input and an array containing “timestamp” and “target_q” as the requested outputs. It’ll convert the command ID and frequency into Hex, format the array into the comma separated list and then prepend the packet size (represented as a U16 in hex) to the front of that. Note that it adds 2 to the size because the packet size includes the bytes used to indicate the size. The defaults in the VI would configure the RTDE to return essentially all of the possible variables.
I found your post during my research for the RTDE communication. Thanks to this I got a better understanding of the rtde examples at the bottom of the RTDE Guide that you also linked.
I have a similar task where I have to implement a simple read + write communication with the UR10e in Simulink. Due to this, I have to understand the messaging between the remote computer and the robot in general.
I somehow don’t understand the guide at it’s full extend, since I am not actually a software developer/programmer and/or versatile with remote control or communication.
I know that you have to first initialize the rtde by setting commands and later on send read/write messages.
You post made it look like you understood the communication pretty well, which is why I would like to ask if you could post a few message (not how you generate them) that you send to the UR to achieve something and explain the structure and the usage.
Is it in ASCII, Hex or something else?
When to name what? First the (e.g.) 79 for setting outputs, or name this at the end?
I have never used LabView before and therefore sadly can not simply reverse engineer your solution.