View on GitHub

mixed-reality-robot-control

Mixed Reality Robot Control for the Microsoft HoloLens 2 and HP Reverb G2 using the MRTK for Unity

Mixed Reality Robot Control

Latest Release

This project implements a robot control for a Fischertechnik TXT robot by using a Mixed Reality simulation on the Microsoft HoloLens 2 and the HP Reverb G2. The AR/VR simulation for these headsets is implemented with the Mixed Reality Toolkit (MRTK) for Unity by Microsoft.

Installation

This guide explains how to setup the devices to get started with the Mixed Reality robot control.

Setting up the Raspberry Pi

The following instructions explain how to setup the Raspberry Pi for the robot control. If the Raspberry Pi is used that was already setup for this project, only steps 7 and 8 are necessary.

  1. Turn on the Raspberry Pi and login with user pi and password Mrtk2021.
  2. Install the MQTT broker Mosquitto:

    $ sudo apt-get install -y mosquitto
    
  3. Install Python3 and pip3:

    $ sudo apt-get install -y python3 pip3
    
  4. Install the required Python packages for the control:

    $ pip3 install ftrobopy paho-mqtt
    
  5. Restart the Raspberry Pi with sudo reboot to start Mosquitto in order to accept commands.
  6. Clone the repository and change into the HighBayStorageRack directory:

    $ git clone https://github.com/mortenterhart/mixed-reality-robot-control
    $ cd mixed-reality-robot-control/HighBayStorageRack
    

    This directory contains the Python script hbsr.py that receives the commands and redirects them to the robot.

  7. Connect the Raspberry Pi to the robot’s Wifi ft-txt_5528. Instructions for this can be found here. The password is displayed at the robot.

  8. Run hbsr.py to start the robot control:

    $ python3 hbsr.py
    

Now the Raspberry Pi is ready to accept commands from the headsets and redirect them to the robot.

Setting up the Headsets

The following instructions explain how to transfer the AR and VR simulation of the control from the PC to the Microsoft HoloLens 2 and the HP Reverb G2. To execute the control, install Visual Studio 2019 with the workloads Development with C++ and Development for Universal Windows Platform (UWP). More information on the required software can be found here.

  1. Download the Unity builds for AR and VR from https://github.com/mortenterhart/mixed-reality-robot-control/releases/latest and extract the ZIP files to your disk.

For Microsoft HoloLens 2:

  1. Turn on the headset and connect it to the PC with USB.
  2. Enable the developer mode on the HoloLens. Instructions for this can be found here.
  3. Connect the HoloLens to the robot’s Wifi ft-txt_5528.
  4. Open the solution file mr-robot-control.sln from the AR build in Visual Studio.
  5. Select the run configuration Master, the platform ARM64 and the deployment target Device:

    Run Configuration for Microsoft HoloLens 2

  6. Start the simulation on the HoloLens using the menu Debug 🡒 Start without Debugging or press Ctrl+F5.

For HP Reverb G2:

  1. Connect the headset to the PC over USB and plug in the power cable.
  2. Connect the PC to the robot’s Wifi ft-txt_5528.
  3. Open the solution file mr-robot-control.sln from the VR build in Visual Studio.
  4. Select the run configuration Master, the platform x86 and the deployment target Local Computer:

    Run Configuration for HP Reverb G2

  5. Start the simulation on the HP Reverb G2 using the menu Debug 🡒 Start without Debugging or press Ctrl+F5.

The robot control is now executed on the headsets and can submit commands to the robot over the Raspberry Pi. An important requirement for this is that all devices are properly connected to the robot’s Wifi.

Helpful Resources

Installation

Getting Started

Development

Deployment

Examples