Universal Robots Forum

URCap servoj xml-rpc c++ realtime pose

Hello, I want to use the current position of the robot and some other values to calculate a position through my algorithm and send it to the robot. These points should be dense trajectories. What should I do in URCaps? Is XMl-RPC C++ Can it meet the 125HZ of communication? Or is there any other method to ensure real-time performance, I look forward to your reply

1 Like

As the picture shows, should I use communication such as UDP to send the values of other devices to the dashboard, and then send them to the control box through the primary and secondary interfaces to control the movement of the robot?

1 Like

Hi @warnerking ,

You’re right with the servoj part execute dense trajectories, but XMLRPC will not be able to keep up at 125Hz. You should use the general purpose RTDE registers to feed your targets into the robot program instead.

Here’s an example from @dalvarez

This example is using python, if you need to use C++ then you could look into this 3rd party library:

Thank you very much for your reply, but I have some other questions. I want to encapsulate this function into a URCap, so how can Java be combined with RTDE? Can RTDE functions be used in URCapAPI? What should i do, my god

I concluded that I am about to complete the URCap with this function: a target position can be calculated by an algorithm based on the real-time value of the external sensor and the real-time position of the robot and sent to the robot, and the servoj can be used to control the movement of the robot, and it can be completed within 125HZ , Can you point me to a feasible way to complete this URCap?

Hi @warnerking , I would do all of the trajectory calculations in a python daemon and write into the RTDE from there. You could just make a few simple GUI elements in Java to allow control of your underlying daemon.

Some of our articles like this one might help you get started:


Thank you very much. According to what you said, after reading the basic structure of URCap, combined with my needs, I have new questions:

  1. According to what you said, use RTDE in myDaemon to send the calculated target position to the register, and then the controller runs the urp program to read the value of the register to make the robot move. Is this correct understanding?
  2. Since I want to encapsulate into a URCap, I must ensure that the real-time position is within 125HZ every time from the acquisition of the real-time position to the delivery target position. Can this method ensure the real-time performance of the final URCap running in polyscope??
  3. When I installed according to the RTDE tutorial, the error as shown in the figure appeared strange.

Finally, thank you very much for your guidance, all this is to complete a qualified contribution URCap

I really look forward to hearing from you, my god!

Hi @warnerking ,

  1. Yes this is correct.
  2. Yes the RTDE can ensure that new values will be synchronised at 125Hz.
  3. I’m afraid this is a 3rd party library that I have never used. Issues can be posted here:

Hello, I may have encountered a problem, can you please guide me?Here is my question link.