Hello,
I’m trying to perform movements using the servoj command, with very bad results so far. And I don’t really understand the reason of the results. This is what I’ve done.
First fo all, I’m using a UR5e robot with PolyScope 5.8 installed on it.
First, I program a simple Polyscope program in which and squared movement is done using moveP and 4 waypoints. This movement is done at 50mm/s.
While performing the movement, I connect a PC to the robot using RTDE protocol in order to obtain joint position samples at 500Hz frequency.
Later on, I’m trying to reproduce this movement using servoJ commands. The program is very simple, it moves to the initial pose using a MoveJ movement and, once arrived, new joint positions are sent to the robot through RTDE protocol at a frequency of 500Hz, using the ones I previously recorded. The movement is reproduced using:
servoj(new_joint_goal, 0.05, 2000)
I’ve played around with the parameters in that function, but the result is always similar. The arm moves really slow, and, after around 1 second, the joint error has increased too much like if the arm was not able to arrive to each new goal, and the arm makes a weird sound which I don’t like at all. If I don’t stop it soon enough, normally a too high current error pops.
I understand the how the gain value works. Lookahead time is a bit less clear to me but anyway, I get this behaviour no matter which parameters I use.
After that, I decided I would slow down when I send new goals, so, instead of a new goal every new RTDE protocol cycle, I’d slow the to one every 4 or 10 cycles. This slows the appearance of the problem, but does not solve it. Anyway, the problem cannot be that I’m asking the arm to move too fast, since it was able to perform the movement before using moveP, and 50mm/s is definitively not fast for the arm.
Then, I tried something else, in the PC, I have compared the last sent joints goal to the actual joint positions of the arm, and I would only send a new goal if the total error was smaller than a certain value. As before, this allows the program to work for a longer time, but the same error appears.
Finally, if I use the same program to reproduce the goals, but using moveJ instead of servoJ, the movement is performed but the arm makes a lot of start-stop movements, while I’m looking for a smooth reproduction of the path.
I would appreciate any ideas on what is going on or on what to try.
I have the feeling that each new goal I send might be too close to the actual joint pose, and therefore the error is not large enough even is I use a gain=3000, but I would expect this would not be a problem since I send new goals every cycle.
Best,