Articles Download Safety & Security Forum myUR Go to Main Site

Universal Robots A/S
Energivej 51
DK-5260 Odense S

T: +45 8993 8989
sales@universal-robots.com

 
  • Articles
  • Download
  • Safety & Security
  • Forum
  • myUR
  • Go to Main Site
  • Support
  • Articles
  • Setting up environment for use with MATLAB for UR development

Setting up environment for use with MATLAB for UR development

Install hardware support and configure simulated hardware connection for cobots from Universal Robots

Last modified on Feb 10, 2025

The purpose of this document is to highlight the MATLAB available connectivity options to connect with the UR Cobot in Simulation or Hardware.

This document guides how to set up a connection between MATLAB and a physical UR robot or URSim. This guide solely focuses on establishing a connection of a UR arm through MATLAB using any of the three available methods of connectivity RTDE, ROS or ROS2.

IMAGE

MATLAB

Connectivity

APIs

Universal Robots

RTDE

urRTDEClient

ROS 2

urROS2Node

ROS

urROSNode

 

PREREQUISITES / SOFTWARE INSTALLATION

Controlling and Connecting with UR Cobot

1. Installation MATLAB – And required Addons

Install MATLAB – from the MathWorks site. The support for 3 modes of connectivity is available from the below mentioned releases

Feature Support

MAtlab version

Required toolbox

RTDE Support for urRTDEClient

From R2024a

-          Robotics System Toolbox

ROS 2 Support for urROS2Node

From R2024a

-          Robotics System Toolbox

-          ROS Toolbox

ROS Support for urROSNode

From R2023a

 

Install the Support package – “Robotics System Toolbox Support Package for Universal Robots UR Series Manipulators” from the Get and Manage Add-Ons.

 

2. SEtUP

The high-level overview of the required steps to connect to the UR cobot can be seen below.

Depending on the required mode of communication, user can follow the MATLAB provided setup Wizard and complete the steps and verify if the test connection is successful by fetching the joint configuration from the UR cobot.

The setup wizard can be accessed in the following way,

  1. Select the mange Add-ons

 

2. Click the Gear icon on the support package

 

This wizard allows the user to connect using RTDE, ROS 2, or ROS. The instructions for the selected communication farmwork are available the setup screens.

The following support is available to connect to the UR cobot:

  1. RTDE Installation options 

Connection Option

Operating System with MATLAB® and the Support Package

UR Series Cobot or the Operating System with URSim Installed

Description

Connect to URSim

(see Set Up URSim Offline Simulator for RTDE)

Linux®

URSim on Linux

Direct connection to URSim running on Linux

Windows®

URSim on Linux

Direct connection to URSim running on Linux

Windows

URSim on Linux VM

Connection to URSim running on a Linux VM hosted on Windows

Connect to UR Series cobot (see Set Up UR Series Cobot for RTDE)

Linux

UR Series cobot

Connection to the UR Series cobot's Teach Pendant directly from MATLAB

Windows

UR Series cobot

Connection to the UR Series cobot's Teach Pendant directly from MATLAB

  1. ROS 2 / ROS - The following options are supported for the available support

Options

OS

Documentation

MATLAB

ROS | ROS 2

ROS 2

ROS

Connect and control cobot in URSim

Linux

Linux

Set Up URSim for ROS 2

Set Up URSim Offline Simulator - MATLAB & Simulink - MathWorks India

Windows

Linux

Windows

Linux Virtual Machine

Set Up URSim in Linux VM for ROS 2

Connect and control hardware (UR Series cobot)

Linux

Linux

Set Up UR Cobot for ROS 2

Hardware Setup for UR Series Cobots - MATLAB & Simulink - MathWorks India

Windows

Linux

 

Link to APIs -- Reference List - MATLAB & Simulink - MathWorks

3. EXAMPLE

The simple getting started example can be found in --

  1. RTDE -- https://mathworks.com/help/robotics/urseries/ug/getting-started-ur5e-rtde-example.html
  2. ROS 2 -- https://mathworks.com/help/robotics/urseries/ug/getting-started-ros2-example.html
  3. ROS -- https://mathworks.com/help/robotics/urseries/ug/getting-started-controlling-ur5e.html

 

 

logo

Product

  • UR3e Robot
  • UR5e Robot
  • UR10e Robot
  • UR16e Robot
  • UR20 Robot
  • UR+ Products

Company

  • About us
  • Contact us
  • Careers We're hiring
  • UR merchandise

Training / Resources

  • Academy
  • Technical Resources
  • Articles
  • FAQ

Insights

  • Blog
  • Case stories
  • Content library
  • News centre
  • Podcast
  • Webinars & Events

Get in touch

  • Ask an Expert
  • Schedule a no-cost assessment
  • Find a distributor
  • Customer support

Connect with us

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com
  • Copyright @ Universal Robots 2025
  • Cookie policy
  • Privacy policy
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com

Copyright © Universal Robots 2025

Cookie policy
Privacy policy