ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Action completion from UR controller

asked 2018-03-14 02:47:27 -0600

prajval10 gravatar image

updated 2018-03-14 03:15:30 -0600

Does the UR controller (CB3/UR10) provide any feedback (such as move complete/acknowledgement ) given trajectory commands from ur_modern_driver through ROS or UR script commands directly such as movej?

I read from this link : https://github.com/ThomasTimm/ur_mode...

There's no way to detect whether "the script" has finished. That is a limitation of the infrastructure provided by UR, not of the driver btw

edit retag flag offensive close merge delete

Comments

May I suggest a title change? Your question is about feedback, but when talking about robots and controllers, most people will understand this as meaning position or velocity feedback. Your question is really more about control flow synchronisation and action completion.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 03:09:00 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-03-14 03:04:36 -0600

gvdhoorn gravatar image

updated 2018-03-14 03:06:41 -0600

Quoting myself in #q285090:

The ur_modern_driver exposes a FollowJointTrajectory action server. As the name implies, that server accepts goals containing a JointTrajectory.

Interacting with an action server is done by writing an action client. This interaction can be both synchronous (ie: blocking) and asynchronous (ie: non-blocking). The former only returns when a trajectory has completed, the latter returns immediately.

I'd suggest you review the wiki/actionlib documentation and do some of the tutorials. That should provide you with some insight.


Edit: note that ur_modern_driver does not directly use URScript when executing a trajectory. The limitations mentioned by Thomas only apply when sending script snippets to the controller over the /urscript topic.


Edit2: see also the test_move.py Python script that implements a very rudimentary action client to control the robot through the driver.

edit flag offensive delete link more

Comments

Finally: please realise that using Actions to interact with robot drivers is not specific to ur_modern_driver at all. It's a fundamental piece of infrastructure in ROS. Getting good understanding of Actions is paramount if you want to create a serious application with ROS.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 03:07:45 -0600 )edit

I understand regarding the ROS part. In case, I'd like to publish script commands over /urscript topic, the UR controller provides no feedback regarding action completion? Am I correct?

prajval10 gravatar image prajval10  ( 2018-03-14 03:16:52 -0600 )edit
1

Yes. That is exactly as Thomas explained it in the issue you linked to. A work-around that has been suggested is to use controller digital IOs as flags to signal completion of script snippets sent to /urscript and then monitor those from ROS.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 03:25:55 -0600 )edit

Perfect thanks! Also, the UR controller will crash if I try to send trajectory commands through the action server and simultaneously send script commands through /urscript topic, correct?

prajval10 gravatar image prajval10  ( 2018-03-14 03:37:40 -0600 )edit

I don't recall it "crashing", but it is definitely not supported no.

Is this something you have experienced, or concluded from something you've read somewhere?

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 03:40:07 -0600 )edit

@gvdhoorn, It doesn't crash but if I run the test_move.py and publish movej commands to the /urscript continuously and simultaneously, the script commands seem to take priority. Ofcourse, I tried this in UR-Sim

prajval10 gravatar image prajval10  ( 2018-03-14 03:54:29 -0600 )edit

Sending movej statements to /urscript seems strange to me. Why do you do that? If you're not going to use the trajectory action server, why use the driver in the first place?

the script commands seem to take priority

they don't take priority per se, but the ctrlr terminates the driver.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-14 03:56:17 -0600 )edit

No this was just a random test. I will use the driver, I was curious if I could also access other UR script functions while using the driver

prajval10 gravatar image prajval10  ( 2018-03-14 03:59:48 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-03-14 02:47:27 -0600

Seen: 681 times

Last updated: Mar 14 '18