Script command by action API
Enhancement Proposal
Implement an action server API to launch and track arbitrary URScript execution.
Use case
- track script execution status
- return an error on a script command illegal (if there there is a checker available)
- cancel URScript execution
Notes
This could be implemented using dirver API already exists (dashboard interface + script command topic).
What do you think about it? Does it make sense for anyone but me?
This would be nice (in fact I'm implementing this for another robot brand right now).
However, afaik it's impossible to track execution status for a particular program with the current interfaces we have. It's possible to see some program is executing, but that would also say "executing" when you're using the UI (as all UI actions are essentially URScriptlets).
Does the dashboard server allow introspection to the level required for this?
Does the dashboard server allow introspection to the level required for this?
Not that I know. As you said, tracking script code isn't available in any of the interfaces.
Ok, to track what program is actually running and handle action interrupted by another source of command there should be a feedback. There are script TCP/IP communication functions (socket_open, socket_send_byte, socket_close), solution could have a protocol on top of it like it mentioned in #40. Is it a right approach?
It is an approach that helps you in some situations. It gets problematic if your script code doesn't run correctly so you never reach that part. Or if your script code is syntactically wrong.
From a driver's perspective we try to keep things as close to the robot's actual interfaces, as possible. However, adding this as a separate wrapper node might be a valid option.
If you are willing to give it a shot, feel free to open up a PR then we can discuss about it in detail...
This would be nice (in fact I'm implementing this for another robot brand right now).
@gavanderhoorn, could you share it, please? It will be handy for me to estimate how much time it will take.
No, I'm afraid I can't.