My robot system uses a 3D mouse to teleoperate the robotic arm's TCP. The robot returns its TCP's position every 10-20 milliseconds to the remote PC. The remote PC returns the new destination based on the current position and an input from the 3D mouse (new destination = current position + delta input from the mouse).
The problem is that the communication between the robot and the remote PC has delay around 100 milliseconds. Because of this condition, the robot can't generate a smooth trajectory, but it goes back and forth (jittered motion), or it repeats stop and start to move. I understand that this is because the current position is not updated in real-time and that leads to generating a wrong destination (even backward when the robot moves forward).
One thing I already tried was to filter out the target if the length between it and the current position was smaller than the one between the previous destination and the current position. However, I couldn't succeed because the robot requires the target update every 10-20 msec, and if not sending (or if sending the previous destination again), the robot stopped to move. So, this solution didn't work.
Does anyone know how to calculate/update the new destination every cycle in this condition? Do I need to forecast the new destination based on the past trajectory?