UR5 Learning Nuggets

This repository is ROS 2 workspace that contains packages required for the completion of the following learning nuggets:

  • Nugget 1: setup instructions for UR5, MoveIt GUI with UR5 changing a few poses on both fake driver and real robot
  • Nugget 2: setup instructions for gripper, open and close the gripper using a simple coding example
  • Nugget 3: using a simple coding example to move the robot using MoveIt

Prerequisites

Clone this workspace and build

git clone https://github.com/patsyuk03/ur_ros2_tutorial.git
cd ur_ros2_tutorial
colcon build
source install/setup.bash

Nugget 1

1. Setup network connection


Network Connection

2. Launch UR5 controller and moveit config


For work with fake hardware:

ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5 robot_ip:=xxx.xxx.x.xxx use_fake_hardware:=true initial_joint_controller:=joint_trajectory_controller launch_rviz:=false
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5 use_fake_hardware:=true launch_rviz:=true


For work with real robot:

ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5 robot_ip:=xxx.xxx.x.xxx use_fake_hardware:=false launch_rviz:=false
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5 use_fake_hardware:=false launch_rviz:=true

3. If working with real robot start external_control program at teach pendant

4. Plan and execute


Fake hardware:
Fake hardware

Nugget 2

1. Setup network connection

Same as in Nugget 1

2. Launch gripper driver

ros2 launch robotiq_hande_ros2_driver gripper_bringup.launch.py robot_ip:=xxx.xxx.x.xxx

3. Run the test

ros2 run robotiq_hande_ros2_driver test 

Nugget 3

1. Launch PnP demo


For work with fake hardware:

ros2 launch ur5_example ur5.launch.py 
ros2 launch ur5_example pnp_node.launch.py 


For work with real robot:

ros2 launch ur5_example ur5.launch.py robot_ip:=xxx.xxx.x.xxx use_fake_hardware:=false

Start external_control program at teach pendant

ros2 launch ur5_example pnp_node.launch.py 

Video

Fake UR5 Demo
Real UR5 Demo
Gripper Test