Installing ROS# on a local Ubuntu machine and connect UR3Sim - tonydle/ur3_unity_sim GitHub Wiki

This guide will show you how to install the required ROS# package onto your ROS workspace, then connect and use UR3Sim on this ROS Network

Contents

  1. Installing ROS
  2. Installing ROS# (file_server)
  3. Using UR3Sim

1. Installing ROS

Note: If you are using a VM and just finished our Running a local Virtual Machine guide, you can skip this step. The custom VM image has ROS pre-installed already

If your Ubuntu machine does not have ROS, please follow these official intructions to either install ROS Kinetic (Ubuntu 16.04) or ROS Melodic (Ubuntu 18.04)

2. Installing ROS# (file_server)

On your Ubuntu machine

  1. Open a Terminal with Ctrl+Alt+T
  2. Clone the repository to your Home directory
git clone https://github.com/tonydle/ur3_unity_sim.git
  1. Create catkin_ws and src
mkdir -p catkin_ws/src
  1. Create a symbolic link of the file_server package from the repo to your catkin_ws
ln -s ~/ur3_unity_sim/ros/file_server/ ~/catkin_ws/src/
  1. Go into catkin_ws and catkin_make to compile
cd catkin_ws
catkin_make
  1. Open ~/.bashrc with a text editor. Here we will use gedit
gedit ~/.bashrc
  1. Add the following line to the end of that file. Then Save and Close.
source ~/catkin_ws/devel/setup.bash

3. Using UR3Sim

3.1 Getting the latest version of UR3Sim

  1. Make sure you grab the latest UR3Sim zip from our Releases page
    • Sometimes Google Chrome will say that the file is not "commonly downloaded and is potentially dangerous". Please ignore that and select to Keep the file, it is not dangerous (trust me)
    • The release was built for Windows 10 and should work on all Windows PC. You can also try to build it from source from the Unity editor.
  2. Unzip and open UR3Sim.exe
    • You can resize the window

ur3sim_menu

3.2 Launching the ROS Network and ROS#

On your Ubuntu machine

  1. Open a new Terminal with Ctrl+Alt+T
  2. Find the Ubuntu machine's IP Address in the local network by using hostname
hostname -I

vm_hostname

Note down this IP, as we will be using it later

  1. Launch the ROS Network and the ROS# (file_server) package
roslaunch file_server ros_sharp_communication.launch

vm_rossharp

3.3 Connect UR3Sim to the ROS Network

  1. With UR3Sim.exe opened, go to the OPTIONS menu
  2. Enter the Ubuntu machine's IP Address

vm_ur3sim_option

  1. Click BACK and then START to begin the simulation!

On the Ubuntu machine's terminal, you should now see that a new client has connected.

vm_rossharp_client

You can also open another Terminal with Ctrl+Alt+T, then use

rostopic list

to see the topics available.

vm_rossharp_topics

🥳 Welcome to UR3Sim! 🥳

ur3sim_running