Dynamically updating move waypoint using RTDE

Hello,

I am working on an application where I am streaming points from a vision system to the robot. I am using RTDE and python as my communication and programming interfaces.

I was curious if it was possible to dynamically update the waypoint while the robot is currently moving. Often, my move target will change before the robot has finished moving to the requested point and dynamically updating the waypoint would potentially smooth transitions between moves.

From reading, it seems like best practice is to use servoj (Universal Robots - Trajectory improvements for servoj()) and the following snippet to convert from Cartesian to joints:
q = get_inverse_kin(x)
servoj(q, lookahead_time=0.05, gain=500)

(reference Universal Robots - ServoJ command)

Is this currently the recommended method to stream points to the robot for smooth movement?

How much do the path change?
If only a little I would suggest the path offset functionality.
Servoj tends to suffer from overshoot in my experience, so if the final point needs to be very precise I would probably avoid it.

Another way might be to used a urscript thread to call stopl or stopj, to stop a movement early and change the direction afterwards.

The path only changes by a couple of mm at most, and it happens fairly slowly. I will look into path offset - that seems like a good approach. Thank you for the suggestion.