# Updating from release 1

This page includes all of the steps necessary to update to the second software release.&#x20;

## Updates in the virtual machine

#### Pull changes in the ros\_adapter

The ros\_adapter node now also publishes position, orientation and velocity data on the /nav/pose and /nav/twist messages. To pull the changes to the node, open a terminal window in your virtual machine and enter the following.&#x20;

```
cd ~/catkin_ws/src/ros_adapter/
git reset --hard
git pull
```

The IP configuration has been moved to a config file since the previous update. First, open the network settings to find the IPv4 IP address used by your VM. Second, open the file catkin\_ws/src/ros\_adapter/config/server.yaml. Change the IP address to match the IP used by your VM.&#x20;

#### Clone the ros\_client node

The new ros\_client node is published to the /force\_control topic and expects Generalized force messages which are applied to the vessel in Gemini. Open a terminal window in your virtual machine, and enter the following to clone the node into your catkin workspace.

```
cd ~/catkin_ws/src/
git clone https://github.com/Njord-The-Autonomous-Ship-Challenge/ros_clients.git
```

The config file in /catkin\_ws/src/ros\_clients/config must now be configured with the IP address of the **Windows** operating system (not the virtual machine). This can be found by typing 'ipconfig' in a Windows terminal. The IPv4 Address will typically begin with 192.168.

Before running the nodes again, remember to build using catkin\_make;

```
cd ~/catkin_ws/
catkin_make
```

## Updates in Gemini-Unity

NOTE: The 'git reset --hard' command will permanently remove any local changes made in the Gemini directory. It is necessary as some of the core code has been restructured. If you have any important local changes, making a backup is recommended before proceeding. Any system specific configurations, such as for some [non-English Windows operating systems](broken://pages/-MY6GDYLmp-niDpCXL-9#windows-operating-system-language), must be reapplied.

In a windows terminal, enter the following:

```
cd Gemini
git reset --hard
git pull
```

#### Reconfigure sensor streaming IP address

Navigate to \Gemini\Gemini-Unity\Assets\Gemini\Scripts\EMRSensors\Core\Sensor.cs and change the IP on line 18 to the IPv4 address of your virtual machine.

#### Import new Unity scene

Download this[ Unity package](https://studntnu-my.sharepoint.com/:u:/g/personal/robist_ntnu_no/ER1y5LB_sUhIvDSrFSvpshYBj8tqekyIKhcDuz0mWdQkwg?e=IUVtSY) which contains a slightly modified preconfigured scene. Boot up the Unity editor and import the package ('Assets -> Import package').

If the 'NjordVessel' object shows a 'Missing Prefab' error when opening the new scene, delete the old vessel from the 'Hierarchy' tab on the left hand side, and drag in the new model found in the NjordVessel folder in the bottom menu. \
**Note:** Ensure that the vessel object (in the Hierarchy tab) is named 'NjordVessel', not 'NjordVessel(1)'. The force controller is configured to correspond with the asset's name.

#### Configure the force controller IP address

In the new Unity scene, 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/digital-competition-2023/installation-guide/updating-from-release-1.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.
