Skip to content

Tutorial: Setting up and running the UR5 Robotic Arm

Yichen Jiang edited this page Oct 1, 2018 · 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

  1. 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

  1. Install UR packages
    sudo apt-get install ros-kinetic-universal-robot and sudo apt-get install ros-kinetic-ur-driver

  2. Install ur_modern_driver

  • Clone ur_modern_driver into your src folder in ROS workspace
  • Go to the folder ur_modern_driver/include/ur_modern_driver/ur/ and find the factory.h script. In this script, around line 95 and 113, you'll see two conditionals about minor_versions. They currently say minor_version_ < 3. Change the 3's to 2's. Save the file.
  • Go back to the catkin_ws folder and catkin_make to install it

Connecting to the Arm

  1. Open port 50001 for communication with robot. In a terminal:
sudo ufw disable
sudo ufw enable
sudo ufw allow 50001/tcp
  1. 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
  1. Connection to UR5 through direct ethernet connection

Running the Arm

  1. Launch connection
    roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=10.42.0.175 Check the arm's control panel to verify the robot IP

  2. Test command
    rosrun ur_modern_driver test_move.py
    PLEASE MAKE SURE THE ARM IS CLEAR BEFORE MOVING


To enable debug message output to the terminal window:
http://wiki.ros.org/rosconsole#Configuration

If you need help, come find Kevin Zhang [email protected]