How can I update speedl() parameters

Hi there.
At the moment, I have an application that sends the speed (in the form of a six-dimensional vector) via RTDE several times per second and a robot receives the signal and uses the data as a parameter for speedl. I need to get smooth movement of the robot without stopping.
However, the speedl command is executed completely with the initial parameters,
ignoring new ones. How can I start the new speedl before the old one completes or update the parameters in the old speedl without having to stop the robot?

Hey there,

How did you solve this problem? I have the same problem getting a smooth move over RTDE. After each moveJ it hits the breake.

hello @robert.kristof
You can send continuos updates to the robot with rtde by running a program that checks the registers and then calling the servoJ() command.
Like this:

def realtime_control():
    
    
    while (True):
        
        new_pose = p[read_input_float_register(0),
                    read_input_float_register(1),
                    read_input_float_register(2),
                    read_input_float_register(3),
                    read_input_float_register(4),
                    read_input_float_register(5)]
           
        servoj(get_inverse_kin(new_pose), t=0.2, lookahead_time= 0.1, gain=350)
            
        sync()
    end
end

You will have to set the registers via the RTDE interface or alternatively via MODBUS.
The robot will continually read the registers and update its position smoothly.
See this project for reference UR_Facetracking github video

Hello @robin_gdwl

am using the standard code provided by UR
(GitHub - UniversalRobots/RTDE_Python_Client_Library: RTDE client library and examples)

I want to move the robot in real time based on the mouse position, so I modified the python script to send just setp1 like this:>

x, y = pyautogui.position()
setp1 = [-x0.5/2000, -0.74822, y0.5/2000, -0.02607, -3.14017, 0.01985]

I send that data at 500Hz from Python.

on the UR instead of MoveL → setp1 I used
servoj(get_inverse_kin(setp1]), 0,0,0.002,0.2,2000)
stopj(2)

The movement is jagged. I tried adjusting the parameters but still looks awful.

Can you help ? How can I make the movement smooth?