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.
This guide explains how to setup the devices to get started with the Mixed Reality robot control.
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.
-
Turn on the Raspberry Pi and login with user
pi
and passwordMrtk2021
. -
Install the MQTT broker Mosquitto:
$ sudo apt-get install -y mosquitto
-
Install Python3 and
pip3
:$ sudo apt-get install -y python3 pip3
-
Install the required Python packages for the control:
$ pip3 install ftrobopy paho-mqtt
-
Restart the Raspberry Pi with
sudo reboot
to start Mosquitto in order to accept commands. -
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. -
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. -
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.
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.
- 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:
-
Turn on the headset and connect it to the PC with USB.
-
Enable the developer mode on the HoloLens. Instructions for this can be found here.
-
Connect the HoloLens to the robot's Wifi
ft-txt_5528
. -
Open the solution file
mr-robot-control.sln
from the AR build in Visual Studio. -
Select the run configuration Master, the platform ARM64 and the deployment target Device:
-
Start the simulation on the HoloLens using the menu Debug 🡒 Start without Debugging or press Ctrl+F5.
For HP Reverb G2:
-
Connect the headset to the PC over USB and plug in the power cable.
-
Connect the PC to the robot's Wifi
ft-txt_5528
. -
Open the solution file
mr-robot-control.sln
from the VR build in Visual Studio. -
Select the run configuration Master, the platform x86 and the deployment target Local Computer:
-
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.
- Choosing Unity Version and XR Plugin
- Creating an MRTK project in Unity for HoloLens 2
- Using the Mixed Reality OpenXR Plugin