Discussion

Left ArrowBack to discussions page
ThibaudThibaud Posts: 1 Recruit
Hi everyone,

So I'm trying to have an UR3 moving through RTDE + URScript.

Here is my URScript:
def rtde_servoj():
  global setp=[0, d2r(-90),0,d2r(-90),0,0]
  movej(setp, 1.4, 1.05, 0, 0)
  thread Thread_1():
    while (True):
      global setp=[0, d2r(-90),0,d2r(-90),0,0]
  global tmp=[0, d2r (-90),0,d2r(-90),0,0]
      while (True):
        tmp[0] = read_input_float_register(0)
        tmp[1] = read_input_float_register(1)
        tmp[2] = read_input_float_register(2)
        tmp[3] = read_input_float_register(3)
        tmp[4] = read_input_float_register(4)
        tmp[5] = read_input_float_register(5)
        if (tmp != [0,0,0,0,0,0]):
          global setp=tmp
        end
        sync()
      end
    end
  end
  threadId_Thread_1 = run Thread_1()
  while (True):
      servoj(setp, 0, 0, 0.03, 0.12, 100)
  end
end

I'm updating read_input_float_register_X approximately every 0,03 seconds.

With this, I'm having some shuttering in the movement, and we can hear a humming.
We don't have this comportement when using movej instead of servoj, so I'm guessing it's not ideal.

Can you point me in the right direction to solve this issue?

Thanks !

Comments

Sign In or Register to comment.
Left ArrowBack to discussions page