UniversalRobots / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series
BSD 3-Clause "New" or "Revised" License
399 stars 209 forks source link

Could we stop the External Control on the UR robot at runtime? #972

Closed nqduy35 closed 5 months ago

nqduy35 commented 5 months ago

Affected ROS2 Driver version(s)

All

Used ROS distribution.

Humble

Which combination of platform is the ROS driver running on.

Ubuntu Linux with standard kernel

How is the UR ROS2 Driver installed.

Build both the ROS driver and UR Client Library from source

Which robot platform is the driver connected to.

UR E-series robot

Robot SW / URSim version(s)

5.14

How is the ROS driver used.

Through the robot teach pendant using External Control URCap

Issue details

Using the URCap External Control and ROS 2 ur_ros_driver, I wonder if I can stop the External Control running on my UR robot ( for example, in this figure, the External Control module is "Control by myhostname" 2024-04-18-154702_446x253_scrot

) at runtime without quitting the UR main program or quitting the ur_ros_driver. Do you have any idea to:

The big picture explains why I need this: I'm using OnRobot Eyes, which calculates and produces the object picking very well. This feature includes move actions, so it cannot work in another thread parallel with External Control. Thus, I have two approaches to combining it with my ROS2 program: First, I create another thread to calculate variables of the OnRobot object picking when necessary and temporarily pause the External Control in the main thread (Robot Program) to proceed the move using the variables; Second, I can transfer the variables calculated from the OnRobot Eyes and send it to my ROS2 program. The above question relates to the first approach.

Relevant log output

No response

Accept Public visibility

fmauch commented 5 months ago

ros2 service call /io_and_status_controller/hand_back_control std_srvs/srv/Trigger should do the trick

nqduy35 commented 5 months ago

Nice. Thank you very much @fmauch