The TSS is the core of the SUITS competition. It handles the various rooms, simulations, and just about everything else when the competition is running. It hosts a RESTful server with endpoints for adding teams, starting simulations, and much more. This repo also contains a web socket server. This is what HMDs will communicate with to receive telemetry data.
Keep in mind this is not the final version of the TSS.
This repo is made available to competing teams to allow them to test their HMDs.
To set it up and use it, read the quickstart below.
- NodeJS (LTS): at the time of writing this is 18.14.1
- Postman : Used to test RESTful enpoints.
$ git clone https://github.com/SUITS-Techteam/SUITS_Test_TSS.git
-
Navigate into the root of the repository
-
Open a window of whatever terminal you'll be using ()
-
Install dependencies by running
npm i
-
Set up the database by running the following:
node sqlite-example-database/setup.js
-
Start the REST server by running:
node index.js
-
In another terminal, start the simulation through an http GET request:
curl http://localhost:8080/api/simulationcontrol/sim/1/start
-
Start the websocket server by running the following:
node sockets/server.js
-
Power up your VISION Kit
- If you haven't already, be sure to change the host URL in your VISION Kit (see VISION Kit Setup below).
- If everything is connected correctly, you will begin generating data from your VISION Kit, and it will be sent to the server.
Once you have your test environment set up and your server host established you will need to go into your VK and change the SUITS_TSSHOST environment variable to your server host IP.
-
Connect a monitor and keyboard to your VK.
-
Once the system is running and you have a prompt, you must connect the VK to the wifi network you'll run the test server on. Start by entering the following command:
sudo raspi-config
Navigate to
Network Options
with the arrow keys and press enterSelect
Wi-Fi
and follow the steps to add your ssid and passwordSelect finish to close raspi-config
-
Next you need to update the SUITS_TSSHOST file on the vision kit. Enter the following commands:
cd TSS_Client nano .env
Then add your server host IP address to the right side of
SUITS_TSSHOST=
.Press Ctrl + o to save then Ctrl + x to exit
-
Now restart your VK by running:
sudo reboot
If your server is running and your SUITS_TSSHOST address is correct your VK should automatically start sending GPS data to the server!