Main Content

Control ROS-Enabled End-Effector Using MATLAB

The urROSNode object and associated functions help you to connect to and control a simulated cobot from Universal Robots using ROS interface. However, most robot manipulators are fitted with end-effectors made by different third-party companies, which help the robot complete its intended task. The end-effectors can be active or passive sensor systems, different types of grippers, or material dispensing systems. You can use MATLAB® along with ROS Toolbox to control such end-effectors if they have ROS interface drivers.

This image shows a system where you connect MATLAB via the ROS interface to a robot manipulator with an end-effector mounted on it.

In the e-Series cobots from Universal Robots, you do not need to physically connect the end-effector to the robot when using ROS. For more information, see Setting up the tool communication on an e-Series robot.

Once you establish the hardware connection, use the ROS drivers from Universal Robots along with the urROSNode object and associated functions to control the manipulator. In addition, you can leverage the ROS drivers from the manufacturer of the end-effector to interact with the end-effector.

This image shows a typical ROS node structure of the combined system.

To control ROS-enabled end-effector using MATLAB and the urROSNode object, complete these steps:

  1. Establish the hardware connection and initiate the nodes for the Universal Robots manipulator (ur_hardware_interface) and end-effector (end_effector_interface).

  2. Connect the ROS drivers to the manipulator and end-effector, then create a urROSNode object. This action starts a ROS node (matlab_urROSNode_XXXXX).

  3. After creating the object, use the associated functions of the urROSNode object to connect with the manipulator.

  4. Use the rosinit (ROS Toolbox) function to connect to the ROS master on the Linux host connected to the manipulator and end-effector. This action initiates the matlab_global_node_XXXXX node, allowing access to ROS topics, services, and actions for the end-effector from MATLAB.