Hi, I’m trying to teach a path to my UR10 moving it by hand in freedrive mode.
These are the steps I follow:
- connect at TCP server 30002.
- I acquire the vectors joint position (“JointActualPosition”) while manually moving the robot in freemode.
- stop freedrive mode.
- write back via tcp socket each vectors joint position with “servoj” command. One send for each vector, like this:
var command = “servoj([0.4, 0.4, 0.4, 0, 0, 0], 0, 0, 0.1, 0.1, 100)\n”;
SendCommand(command); // send over tcp 30002
Thread.Sleep(100); // ms
Result: the robot trajectory is snappy.
How to improve it? I need to use the real time communication at port 30003? “servoj” command is the right way?
Including all the servoj commands in a “def myprogram():” now the tracking of the path is much better.
You’re right, putting them within a function is a much better approach. If you send the commands individually over the client interface, each command is executed soon as it is received, regardless of whether the previous one has completed. Putting them within a function allows them to be executed in sequence.
The Secondary interface 30002 runs at 10Hz where as the realtime interface 30003 runs at 125Hz, so switching to that will also potentially bring a performance improvement.