# Gemini-Unity

NOTE: The virtual machine is now configured. The following steps should be done natively in Windows, not in the VM.

Install Git for Windows command prompt, if you do not already have it installed. Download the installer from [git-scm.com](https://git-scm.com/download/win) and follow the installer instructions.

Clone the Gemini repository by running the following in a Windows terminal.

```
git clone https://github.com/Njord-The-Autonomous-Ship-Challenge/Gemini.git
```

### Configuring network settings

Open Gemini\Gemini-Unity\Assets\Gemini\Scripts\EMRSensors\Core\Sensor.cs in a file editor. Change the IP address on line 24 to match the IP your VM is using.

### Install gRPC dependencies

In the Gemini folder, right click on the 'setup.ps1' file and select 'Run with powershell'.

## Unity Hub

For the time being, Gemini depends on the Unity editor. Download Unity Hub from [unity3d.com](https://unity3d.com/get-unity/download).

Unity Hub requires an active license, which again requires a Unity ID. After creating an account, 'Activate New License' followed by 'Unity Personal' should select the free license. The free license is sufficient for this application.

In Unity Hub, on the 'Installs' tab, select 'Add' and choose version 2019.4.xxf1, where the x's indicate the latest stable version.&#x20;

Select the 'Projects' tab. Then, select 'Add', and find the 'Gemini-Unity' folder which is inside the cloned 'Gemini' folder. Once added, launch the project.

## Unity Packages

Download the Njord assets package from this [link](https://drive.google.com/file/d/1JqCTwaGMad6Qe6yRmDeESY1O4OjyQUxK/view). After launching the project from Unity Hub, import the package by clicking 'Assets -> Import package'. This step can take a while.

#### Configure the force controller IP address

First, launch Unity and open the 'Njord' scene found in the 'Models' folder. Select the 'NjordVessel' object in the left-hand menu. In the inspector on the right-hand side, one of the of components are called 'Force Control Manager'. Open the dropdown menu and change the Host IP address to your Windows IPv4 address (the same as you specified in the ros\_clients config file).


---

# 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://njord.gitbook.io/njord/installation-guide/unity.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.
