Main Content

handBackControl

Get the control back from the External Control program node in the UR program tree

Since R2023a

Description

status=handBackControl(ur) executes the hand_back_control ROS service, which takes back the program control from the External Control program node of the UR program tree to execute the subsequent program nodes. status returns 1 if the service is executed correctly.

example

Examples

collapse all

Connect to a physical or simulated cobot, using either urROSNode or urROS2Node object (based on the option for connectivity – ROS or ROS 2, which you selected in the Hardware Setup screen).

  • Connect to a physical or simulated cobot at IP address 192.168.2.112 on the ROS network.

    ur = urROSNode('192.168.2.112');
  • Connect to a physical or simulated cobot on the ROS 2 network.

    ur = urROS2Node;

Run the handBackControl function command to get the control back from an External Control program node.

handBackControl(ur);

Input Arguments

collapse all

Connection to physical or simulated cobot from Universal Robots, specified as a urROSNode object or a urROS2Node object.

Output Arguments

collapse all

Status of hand_back_control ROS service, returned as 1 or 0 depending on whether the service is executed successfully or not.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2023a