Universal_Robots_ROS_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS_Driver copied to clipboard

Script command by action API

Open khssnv opened this issue 5 years ago • 6 comments

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?

khssnv avatar Feb 25 '20 17:02 khssnv

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?

gavanderhoorn avatar Feb 25 '20 18:02 gavanderhoorn

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.

fmauch avatar Feb 26 '20 07:02 fmauch

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?

khssnv avatar Feb 26 '20 09:02 khssnv

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...

fmauch avatar Feb 26 '20 10:02 fmauch

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.

khssnv avatar Mar 23 '20 17:03 khssnv

No, I'm afraid I can't.

gavanderhoorn avatar Mar 23 '20 17:03 gavanderhoorn