This repo is based on 2.120-Starter code. But you do not need that whole package, and that will not work because you will have to rebuild some folders and files after moving the unity project. Here is an instruction about how to move a unity project safely.
So intead of using 2.120-Starter code, you can follow the instructions below to build the project.
git clone git@github.com:Yuxiang-Ma/2.12-Hololens2.git
. You may also need some Python packages to run the scripts. To handle dependencies, it is recommended to create a new conda environment (download Miniconda here), activate it, and then install the requirments.txt file:
conda create -n 2.120 python=3.9
conda activate 2.120
pip install -r requirements.txt
Then you can build and deloy the project following the "Building and deploying" part of the instructions.
When making the build, it is recommended by unity to specify an output directory for the build. (It is said that you might mess up the project by putting other folders in the unity project, including the build). The build takes a while, please be patient.
One simple test you can run is by navigating to the Comms/Mock
folder and running the mock_server.py
script on a server computer, and then running the mock_hololens.py
script on a separate computer. Specifically, you may perform the following steps:
mock_hololens.py
:# Replace the following with the IP address of the machine running the server
server_ip = "xx.xx.xx.xx" # Define the server IP address (localhost in this case)
server_port = 21200 # Define the server port number
# Windows
> ipconfig
# macOS / Linux
% ifconfig
mock_server.py
code on the server computer:python mock_server.py
mock_hololens.py
on the client computer:python mock_client.py
Button number | Funtionality |
---|---|
1 | Change IP of UR5 |
2 | Mobile Robot Overide |
3 | Change IP of Mobile Robot |
4 | UR5 initialization and start/stop override |