# Ubuntu

### Installing Requirements

The Haptic Jacket Controller software requires Node.js and Python 3. Download them if not present in the system.

* Node.js (<https://nodejs.org/en/>)
* Python 3 (<https://www.python.org/download/releases/3.0/>)

### Downloading Software and Running

Download Ubuntu Binary from here: <https://drive.google.com/file/d/1hws2LXd8ylOgelSHd_Z-VdTeyMu9TPNR/view?usp=sharing>

Place the downloaded tar file on the Desktop.

Open terminal. Unzip the compressed file with the following commands.

```bash
cd Desktop
tar -xzvf Haptic-Jacket-Controller-linux-x64.tar.gz
cd Haptic-Jacket-Controller-linux-x64
```

Run the application using the following command

```
./Haptic-Jacket-Controller
```

{% hint style="info" %}
The Ubuntu binary was built on Ubuntu 18.04.5 LTS (Bionic). Might be incompatible with earlier versions.
{% endhint %}

Once everything runs well, the screen should look like this. The application is ready to be used.

![Haptic Jacket Controller running on  Ubuntu 18.04.5 LTS (Bionic) ](/files/-M_vEo1Ffd2396ySp2UQ)

For information on how to use the Simulator, please refer to the [**User Guide**](/haptic-jacket/using-the-application/untitled.md)**.**

### Configuring IP and Ports of Modules

Before using the Application, the configuration can be done by manually editing **config.csv** file in the extracted **Haptic-Jacket-Controller-linux-x64 folder.**

![config.csv in the files extracted](/files/-M_vFYz_NsRP237yAnwx)

The format of config.csv is number, IP, Port as follows. Edit this file before starting the application.

```
ID,IP,PORT
1,226.0.5.246,7777
2,225.0.5.245,7777
3,224.0.5.244,7777
4,223.0.5.243,7777
5,222.0.5.242,7777
```

### Accessing Python API on Ubuntu

The haptic jacket simulator can be controlled by a python API. The API-related files are in the **API** folder. To test the API, run the Haptic Jacket Simulator, then run the following commands on a separate terminal.

```
cd API
python3 api_test.py
```

![Haptic Jacket Controller, programatically controlled via python API](/files/-MfM-Rq5JGeiWF4NXajt)

{% hint style="warning" %}
Before running the API, make sure that the modules have been placed on the jacket using Change Positions.
{% endhint %}

Make changes to the file `api_test.py` to see different outputs in the simulator.

Refer to the [**API Documentation**](/haptic-jacket/api-documentation/untitled.md) for detailed usage of API.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pi31415.gitbook.io/haptic-jacket/installation-guide/ubuntu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
