Skip to content

Tutorial: Setting up and running the UR5 Robotic Arm

Minh-Khang Vu edited this page Nov 21, 2019 · 20 revisions

Prerequisites

This tutorials allows you to set up your environment to use the UR5 arm. It assumes that you have the following things already completed:

  • Using Ubuntu 16.04
  • ROS kinetic installed, catkin_ws set up and in use

Assuming you have the above ready to go, follow these steps:

Permissions

Step 0 Before anything else, if this is your time doing this, or if your computer has a new paritition of Ubuntu: Check if you're in the correct groups:
sudo usermod -a -G dialout,tty $USER

If you completed step 0, then MAKE SURE TO LOG OUT and LOG BACK IN (one time thing), then continue the below steps:

Dependencies + Build

Step 1 Install UR packages

sudo apt-get install ros-kinetic-universal-robot 
sudo apt-get install ros-kinetic-ur-driver

Step 2 Install olinrobotics/ur_modern_driver and olinrobotics/universal_robot

  • Clone ur_modern_driver and universal_robot into your src folder in ROS workspace
  • Go back to the catkin_ws folder and catkin_make to install both packages

Connecting to the Arm

Step 3 Open reverse port 50001 for communication with robot. In a terminal:

sudo ufw disable
sudo ufw enable
sudo ufw allow 50001/tcp
sudo ufw allow 50002/tcp       # Open another port 50002 if you want to control two robot arms

Step 4 Setup a custom wired network for the UR5 robot communication. This is located in the Wifi menu, go to Edit Connections, add the below information under IPv4 Settings

  • Edit Connections
  • Add
  • Ethernet
  • Name the connection something you'll remember
  • In IPv4, select Method > Shared with other computers
  • Save

Step 5 Connection to UR5 through direct ethernet connection

Running the Arm

Step 6 Launch connection

roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]

IP_OF_THE_ROBOT Check the arm's control panel to verify the robot IP.

REVERSE_PORT reverse port is the port you open in Step 3: either 50001 or 50002

Currently, the IPs are: 10.42.1.175 and 10.42.0.54

Step 7 Test command

PLEASE STOP! There is no test command. You should not run any random python script to move a UR5 arm without using the MoveIt! interface. It's extremely dangerous to run a script without knowing what the arm would do. Please refer to MoveIt! for Xamyab to learn how to control the UR5 arm with MoveIt!, which provides us a nice planning and visualization interface in Rviz.

UR5 Firmware Update

If you need to update UR5 firmware to work with the newest ROS packages, please follow the steps below:

Step 1 To check the current firmware version of the robot, click on the About button in the home screen.

Step 2 Next, go to this website and download the newer version of the firmware: https://www.universal-robots.com/download/?option=16460#section16459

Step 3 Then, copy the downloaded file to a USB stick and insert the USB stick to the control panel. Click on Setup Robot > Update Robot and choose the file. Next, click Update and wait until it reboots.

Step 4 After the reboot, please make sure to go to the Initialization Screen and click Start to update joint firmware.

Video: https://www.youtube.com/watch?v=-z_0hAgY948

Notes:

  • Robot UR5 series: CB-Series/CB3 (Polyscope)
  • Installing new hardware components may require updating of software.
  • Backward compatibility is not supported.
  • Software updates must be done in sequence i.e. 3.2.1, 3.2.2, 3.3.0, 3.3.1, etc.