Hello,
I’m trying to record a trajectory in real time using the UrCaps Sample “getRobotRealTimeData”.
The problem is that it seems that reading a snapshot from the Real Time Client at every update (I’ve tried several schedule, 500ms,400ms,etc …) is taking too much ressources to process quickly enough.
I wanted to know if it was possible to restrain the Data read from the real time client.
Thank you.
Edit : i’m using sdk 1.2.41 and i’m limited to this one.
Hi,
in the example URCap getRobotData with every request the socket is opened and then closed again. This is suitable for the scope of the example, but would take too much time for record a trajectory in the needed precision. You could let the recording run on a daemon process to save the data continuously.
But for acquiring real time data I would recommend using the RTDE-Interface. This is a more modern protocol for reading from/writing on the UR. The corresponding support article can be found here: https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/
You can try implementing the example in a separate python daemon on your URCap and communicate via XML-RPC with the robot program. The MyDaemonSwing URCap example can give you a basis for this.
Thank you very much, indeed the way I worked wasn’t suitable for my purpose.
I’ll examinate the communication with xml-rpc and daemon.