This repository is a modificatiion of Unity project made be Doris Ashenbenner and Jonas Rieder from TU Delft as a part of MirrorLabs. You can find the original project here.
- ROS machine with ROS Noetic or Melodic.
- Unity side of things should be done on Windows machine
- Unity Hub
- Enable Developer Mode on Hololens and Windows Machine
- Clone this repository.
- Open Unity Hub.
- If this is your first time using Unity Hub, license should be activated:
- Go to settings (gear in the corner)
- Go to manage license tab.
- Log into Unity account or create one, when asked.
- Press activate new license button.
- Choose personal and choose the answer, which suits you after that.
- Personal license will be acctivated.
- If this is your first time using Unity Hub, license should be activated:
- Press ADD button and choose the MirrorLabs_HL2.
- Install the unity version, which you will be asked.
- During the installation make sure to check Visual Studio 2019, if you don't have it installed
- And make sure to check Universal Windows Platform (UWP) Support and Windows build support. If you miss this step, you can add them later in the installs tab if you press 3 dots on the Unity version and choose Add Modules option
- After installation open the project. Skip the prompt about new unity version.
- In the project panel navigate to Assets/MirrorLabs/Scenes and double click on ML_UniversalRobotics_ur5_modified scene. This will open the scene in unity.
- In the Hierarchy window unfold RosConnectors game object
- Click on one of two object and in Ros Connector (Script) change Ros Bridge Server Url and Ros Bridge Server_IP with the IP of your ROS machine. Port for Url should remain the same.
- Do the same with the remaining object.
- Go to File -> Build Settings.
- Make sure, that UWP is chosen (if not, choose it and press switch platform)
- Verify that only the currrent scene is chosen in the Scenes in Build window.
- Set target device to Hololens and Architecture to ARM64.
- Press build and choose or create any folder where you want to save the built project.
- After building go to the specified folder and open the solution file.
- Go to Project -> Properties and to Debugging tab.
- Fill in Machine Name with the ip address of the Hololens 2
- Under the menu bar change debug to release, ARM to ARM64 and set to remote machine and press start debugging.
- After deploying to Hololens, app will launch automatically, but you will be able to open it yourself from the app menu on the hololens
- Make sure moveit and moveit_visual_tools are installed.
- Install rosbridge_suite.
- Clone Universal Robot repository into src folder of your catkin workspace.
- Depending on your controller box and software, you might also need the following repository.
- If ROS_Driver is used, make sure that externa control is installed.
- Clone the following package into src folder of your catkin workspace.
- Build entire catkin workspace
- Source your workspace
- Launch the robot with moveit
- Launch rosbridge with command
roslaunch rosbridge_server rosbridge_websoocket.launch
- Start the communication node with
rosrun hl_ur5_ik ur_ik_request
- Make sure to be in the same network as ROS machine.
- Start the ML_M1013 app
- If the setup is done correctly, Hololens will connect to the ROS machine and you will be able to set the TCP goal in the form of a sphere, while previewing the robot. To send the goal, release the sphere.