5.2 Installation(Home)
This is a quick instruction guide on how to install the Robocup distribution on your home computer.
Make sure you are connected to the internet as this will require a once off ~300mb download
After Installation
5.2.1 Ubuntu 18.04
- Open a terminal
- Type the command and run it
wget lamp.ms.wits.ac.za/robocup/setup
- It may appear to hang, however, I found it was asking for my password. So input your password when/if prompted
- Once complete if you type ‘ls’ you should see a file called ‘setup’
- Type the command and run it
chmod +x setup
- Type the command and run it (This process will install quite a few things)
./setup
You will be prompted on whether or not you have a graphics card type “Y” or “N”. If you are unsure of if you have one you can run “nvidia-smi”, this will indicate if you have nvidia drivers installed. If it asks to install something then you don’t have nvidia drivers :)
Based upon which option you chose in Step 7 you will be told which command you require to run the singularity instance.
- IF no "N" in step 7 run ./robocup-mesa
- IF yes "Y" in step 7 run ./robocup-nvidia
A new terminal should have opened which is within the singularity robocup instance
- In this new terminal you can run the server using the following command
rcssserver3d
This will run the server like we have done in the labs
Type “ctrl-shift-t” while the terminal is active(selected) to open a new tab. Remember we need to run each of the server, agent and visualiser in a serperate tab
In the new tab run the following command to run the visualiser - which will open the roboviz window
/roboviz/roboviz.sh
Type “ctrl-shift-t” to open a third tab
In order to run the agent we must first extract the utaustinvilla3d-master.zip file which can be found in the same directory as you saw “setup”
In the original terminal you can type and run (This is the non singularity terminal)
unzip utaustinvilla3d-master.zip
Or navigate to that folder and right click unzip to utaustinvilla3d-master
- In your third singularity terminal tab cd into utaustinvilla3d-master
cd utaustinvilla3d-master
- type and run
cmake .
To perform the initialization
- type and run
make
- type and run, this will run the agent and you should see the individual players being added in the visualiser
./start.sh
5.2.2 Ubuntu 20.04
- Open a terminal
- Type the command and run it
wget lamp.ms.wits.ac.za/robocup/setup20
- It may appear to hang, however, I found it was asking for my password. So input your password when/if prompted
- Once complete if you type ‘ls’ you should see a file called ‘setup’
- Type the command and run it
chmod +x setup20
- Type the command and run it (This process will install quite a few things)
./setup20
You will be prompted on whether or not you have a graphics card type “Y” or “N”. If you are unsure of if you have one you can run “nvidia-smi”, this will indicate if you have nvidia drivers installed. If it asks to install something then you don’t have nvidia drivers :)
Based upon which option you chose in Step 7 you will be told which command you require to run the singularity instance.
- IF no "N" in step 7 run ./robocup-mesa
- IF yes "Y" in step 7 run ./robocup-nvidia
A new terminal should have opened which is within the singularity robocup instance
- In this new terminal you can run the server using the following command
rcssserver3d
This will run the server like we have done in the labs
Type “ctrl-shift-t” while the terminal is active(selected) to open a new tab. Remember we need to run each of the server, agent and visualiser in a serperate tab
In the new tab run the following command to run the visualiser - which will open the roboviz window
/roboviz/roboviz.sh
Type “ctrl-shift-t” to open a third tab
In order to run the agent we must first extract the utaustinvilla3d-master.zip file which can be found in the same directory as you saw “setup”
In the original terminal you can type and run (This is the non singularity terminal)
unzip utaustinvilla3d-master.zip
Or navigate to that folder and right click unzip to utaustinvilla3d-master
- In your third singularity terminal tab cd into utaustinvilla3d-master
cd utaustinvilla3d-master
- type and run
cmake .
To perform the initialization
- type and run
make
- type and run, this will run the agent and you should see the individual players being added in the visualiser
./start.sh
5.2.3 Windows 10 with WSL
If you are having issues refer to the common issues section at the bottom of this page or message in the help-and-errors
channel on discord.
To install on Windows 10, first install Ubuntu 20.04 in the Windows Subsystem for Linux, using the 6 step instructions outlined here: https://docs.microsoft.com/en-us/windows/wsl/install-win10 The following instructions are the ones included in the above link just incase the page is unavailable in the future
- 1A : Enable the Windows Subsystem for Linux You must first enable the “Windows Subsystem for Linux” optional feature before installing any Linux distributions on Windows. Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
We recommend now moving on to step 1B, updating to WSL 2, but if you wish to only install WSL 1, you can now restart your machine and move on to Step 1F : Install your Linux distribution of choice. To update to WSL 2, wait to restart your machine and move on to the next step.
1B : Check requirements for running WSL 2 To update to WSL 2, you must be running Windows 10.
- For x64 systems: Version 1903 or higher, with Build 18362 or higher.
- For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
- Builds lower than 18362 do not support WSL 2. Use the Windows Update Assistant to update your version of Windows.
To check your version and build number, select Windows logo key + R, type winver, select OK. (Or enter the ver command in Windows Command Prompt). Update to the latest Windows version in the Settings menu.
- 1C : Enable Virtual Machine feature Before installing WSL 2, you must enable the Virtual Machine Platform optional feature. Your machine will require virtualization capabilities to use this feature. Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your machine to complete the WSL install and update to WSL 2.
1D : Download the Linux kernel update package
- Download the latest package: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi NOTE If you’re using an ARM64 machine, please download the ARM64 package instead. If you’re not sure what kind of machine you have, open Command Prompt or PowerShell and enter: systeminfo | find “System Type”.
- Run the update package downloaded in the previous step. (Double-click to run - you will be prompted for elevated permissions, select ‘yes’ to approve this installation.)
Once the installation is complete, move on to the next step - setting WSL 2 as your default version when installing new Linux distributions. (Skip this step if you want your new Linux installs to be set to WSL 1).
1E : Set WSL 2 as your default version Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:
wsl --set-default-version 2
- 1F : Install your Linux distribution of choice Open the Microsoft Store and select your favorite Linux distribution.
The following link will open the Microsoft store page for 20.04 distribution: Ubuntu 20.04 LTS
- Next you need to install an X Server. You can install one from:
https://sourceforge.net/projects/vcxsrv/
Make sure to allow access to both your private and public networks so that you dont have any firewall issues. If you make a mistake here you will need to open the firewall settings and change them after installation.
When you’re done, there will be a program called XLaunch in your start menu. You can use this to launch your X Server. When you do, make sure that you select “Multiple windows” on the first screen and “Start no client” on the second screen. On the third screen you need to be a bit careful - you must make sure that “Native opengl” is unticked, and “Disable access control” in ticked. These are not the defaults so you will have to change them.
Once you’re done with that, run Ubuntu and you will get a shell, which you will use for robotics. The first time you run the Ubuntu shell it will ask to create a profile enter any user name or password you like. You will need to enter these each time you run the shell
Type the following command into the Ubuntu terminal
wget -O setupwin10 https://lamp.ms.wits.ac.za/robocup/setupwin10;chmod +x setupwin10; ./setupwin10
Once this process of downloading the required RoboCup packages is complete, the singularity terminal will open up.
To check if the Xserver is operating correctly type
glxgears
in the singularity terminal window. You should see some spinning gears. If nothing appears, or if the gears are not spinning, something has gone wrong with your X Server setup.In this new terminal you can run the server using the following command
rcssserver3d
This will run the server like we have done in the labs
Type “ctrl-shift-t” while the terminal is active(selected) to open a new tab. Remember we need to run each of the server, agent and visualiser in a serperate tab
In the new tab run the following command to run the visualiser - which will open the roboviz window
/roboviz/roboviz.sh
Type “ctrl-shift-t” to open a third tab
In order to run the agent we must first extract the utaustinvilla3d-master.zip file which can be found in the same directory as you saw “setup”
In the original terminal you can type and run (This is the non singularity terminal)
unzip utaustinvilla3d-master.zip
If an error indicating the unzip package is not installed feel free to install the package as depicted by the error and repeat the command. Also ensure you are on your root directory by using cd ~
- In your third singularity terminal tab cd into utaustinvilla3d-master
cd utaustinvilla3d-master
- type and run
cmake .
To perform the initialization
- type and run
make
- type and run, this will run the agent and you should see the individual players being added in the visualiser
./start.sh
5.2.4 Common Issues
- No more available loop devices
You need to convert from WSL 1 to 2, this may be due to a previously installed version of WSL or missing steps 1C - 1E
- Unable to init server: Could not connect: Connection refused when running
./robocup-mesa
You need to ensure that your firewall or antivirus is not blocking the vcxsrv from accessing your network (both public and private)
- Visualiser displaying a weird black window with a small field in the background
An existing rcccserver process hasn’t closed correctly - you need to use the terminal to view which processes are running and kill the processes. killall rcccserver
will just stop all of them. Alternatively find and kill it using top
to see what was running and then kill -9 <id>
to kill it.