0
$\begingroup$

Rosanswers logo

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_modern_driver/issues/162

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


Originally posted by prajval10 on ROS Answers with karma: 92 on 2018-03-14

Post score: 1


Original comments

Comment by gvdhoorn on 2018-03-14:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-03-14

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-03-14:
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.

Comment by prajval10 on 2018-03-14:
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?

Comment by gvdhoorn on 2018-03-14:
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.

Comment by prajval10 on 2018-03-14:
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?

Comment by gvdhoorn on 2018-03-14:
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?

Comment by prajval10 on 2018-03-14:
@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

Comment by gvdhoorn on 2018-03-14:
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.

Comment by prajval10 on 2018-03-14:
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

Comment by gvdhoorn on 2018-03-14:
well you can, but not while executing a trajectory.

Comment by gvdhoorn on 2018-03-14:
You could try and see whether you can send a secondary program. Look that up in the UR scripting manual. Secondary programs might not interfere with the driver. You probably cannot control motion that way, but setting IOs could/should work.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.