I am trying to program a trajectory in a UR5e robot using URScript in PolyScope. I program the trajectory using movej giving the points at every 5ms.
The code is something similar to (there is only variations in the second and sixth joint angles)
movej([0.000,-4.294,0.000,-3.142,4.712,-1.745],t=0.005,r=0)
movej([0.000,-4.293,0.000,-3.142,4.712,-1.745],t=0.005,r=0)
movej([0.000,-4.293,0.000,-3.142,4.713,-1.745],t=0.005,r=0)
movej([0.000,-4.292,0.000,-3.142,4.713,-1.746],t=0.005,r=0)
movej([0.000,-4.292,0.000,-3.142,4.714,-1.746],t=0.005,r=0)
movej([0.000,-4.291,0.000,-3.142,4.714,-1.746],t=0.005,r=0)
movej([0.000,-4.291,0.000,-3.142,4.715,-1.746],t=0.005,r=0)
…
there are about 500 lines.
When I run the code in simulation mode the program runs correctly. But when I run the code in the robot (with the emergency stop button ready) the robot moves very slow and with a lot of vibrations that move even its table and I have to stop it. It seems that at every movement the robot start and stop and not join all the movements.
Is there any way of making a smooth movement with all the points?