Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Delay between input and executed kuka movements

I am trying to real-time control a kuka using a spacemouse. I can move the kuka using the mouse, but i get delays, over 1s! I am wondering why, and how i can fix this. All of this is done in the simulation, so i expect extra delay when executing it on the robotic arm, which would make this even worse. 

from robolink import *
from robodk import *
import pyspacemouse

RDK = Robolink()

kuka = RDK.Item('', ITEM_TYPE_ROBOT)
kuka.setSpeed(speed_linear=10, speed_joints=10, accel_joints=1, accel_linear=1)

mouse =

move_speed = 1

while 1:
data =
xyzinputs = [round(data.y, 1), round(-1*data.x, 1), 0]

if norm(xyzinputs) <= 0:

xyz_move = mult3(xyzinputs, move_speed)

joints = kuka.Joints()

position = kuka.SolveFK(joints)

config = kuka.JointsConfig(joints)

new_position = transl(xyz_move) * position

new_joints = kuka.SolveIK(new_position)
if len(new_joints.tolist()) < 6:
   print('no solution')

new_config = kuka.JointsConfig(new_joints)



it's based on an example that uses keyboard inputs. 
I have not worked with roboDK in combination with Python before, so I might be missing something obvious. 
Could it have something to do with the advance that Kuka uses to precalculate movements? and this seems to work from PTP, moving just tiny steps at a time, but would there be a way to continually move?
You can find a similar example with an Xbox Controller here:

The move steps are incremental, we do not use the joystick for proportional speed.
However, you can increase the move step.
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.

Users browsing this thread:
1 Guest(s)