I’d like to develop an URCap plugin which is moving the robot with speedj URScript command.
Is it possible to use speedj directly with the deamon or should I set registers to apply speedj in the URscript ?
Thanks in advance,
you can use daemons to control the robot by using xmlrpc commands which call a script section from the daemon on robot program runtime e.g. if you like to use external C or python libraries to calculate paths or waypoints. It should also be possible to control the robot from the daemon by connecting it to the real time interface with localhost adress which is strange and i won’t recommend doing so… maybe there is a much simpler solution for your task?
Thanks for your answser.
Actually it is sevoj() commands that I’d like to use, not speedj(). I need to send a computed joint speed setpoint at high rate : 500 Hz. I am using only e-series robots.
Is xmlrpc fast enough for my required 500 Hz ?
i tested this with a weaving algorithm on the e-series on the same rate with also xmlrpc servoj commands and i noticed a lag resulting in a slightly stuttering path. i would try this playing around with the gain parameter if your waypoints don’t have a small distance.
i would try this playing around with the gain parameter if your waypoints don’t have a small distance.
Yes, I have only small waypoints. But I might have big accelerations on some joints.
Since I need to run at 500 Hz I set the servoj parameters as follow :
- time to 0.002 s
- lookeahead to 0.02s (its minimum)
- gain to 200.
Currently, my servoj command is in the urscript filled with the registers double values set by another PC with RTDE. Actually, I wonder if a deamon with xmlrpc might help me having better performances.
So with xmlrpc a deamon can directly send servoj command to the robot without using the URscript ?
I don’t think so. The purpose of using xmlrpc inside a daemon is to call external functions (Python or C++) from your urscript code which produces a small delay. If you don’t really need to use a daemon your solution should be fine, otherwise i would try to use the xmlrpc calls inside threads to pre-call e.g. your calculated waypoints from C++/python and use them in some kind of synchronized move/wait for next next calculated waypoint algorithm
Ok, now I have a better understanding of the purpose of xmlrpc.
Thanks for your all your explanations.
Is there any documentation that can help me find out more about xmlrpc ?
I just now this link to the FAQs : https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/xml-rpc-communication-16326/
I think the MyDaemon URCap example is helpful. The URScript manual has also a small section about using xmlrpc
I will have a look at both of them. Thanks for all your advices.