# Quickstart Guide

## Installing the Virtual Machine

{% hint style="info" %}
The available VM has been tested both on a *Windows 11 Intel PC* and a *MacOS 13.4 Intel Mac*. For *Silicon M1/M2 Macs*, the VirtualBox is only available as a developers preview and therefore considered experimental.
{% endhint %}

1. [Download](https://www.virtualbox.org/wiki/Downloads) and install VirtualBox and the extension Pack.
2. To improve the&#x20;
3. [Download](https://drive.switch.ch/index.php/s/F73fA5XnbRLLoAQ) and import the `.ova` VM in VirtualBox.
4. In theory, the *network settings* should be configured correctly. To check them, open the settings and make sure the network adapters are configured as follows:

<div><figure><img src="https://1981574695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmNbOWbT7W8uswCfgHan%2Fuploads%2FC1EXLlDipXLgFauZdoiV%2Fvm1.png?alt=media&#x26;token=351c280a-5a5d-46bd-b79a-e151c3b49de4" alt=""><figcaption><p>Adapter for WiFi</p></figcaption></figure> <figure><img src="https://1981574695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmNbOWbT7W8uswCfgHan%2Fuploads%2FkADTx1bowPEnexkBxMSF%2Fvm2.png?alt=media&#x26;token=206a2a02-3f96-4b5f-8ee7-75871ae503ce" alt=""><figcaption><p>Adapter for Unitree hotspot</p></figcaption></figure> <figure><img src="https://1981574695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmNbOWbT7W8uswCfgHan%2Fuploads%2F1amYpBCawr7U9QND0hkf%2Fvm3.png?alt=media&#x26;token=c56f5b74-c8da-4618-a1e1-3452e5c8a084" alt=""><figcaption><p>Adapter for Ouster LiDAR</p></figcaption></figure></div>

4. Additionally, you can configure the system settings to utilize all cores and RAM in the *system settings*.
5. To make use of the shared folder, update the *shared folders settings* to a existing folder.

<figure><img src="https://1981574695-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmNbOWbT7W8uswCfgHan%2Fuploads%2Fp1ij5bOYDwXFzFRMGuui%2Fvm4.png?alt=media&#x26;token=b66d865f-877a-426e-9a43-c35e75a73a2b" alt="" width="375"><figcaption></figcaption></figure>

6. Start the VM and log in with the password `RoboDog3`.

## Creating the ROS Folder Structure

1. If you're using the VM from above, the `rbd_packages` folder is already available in the `~/git/` folder and symbolically linked to the catkin workspace `~/ROSWorkspaces/BA/src/`.
2. To execute the ROS commands, change to the catkin workspace with `cd ~/ROSWorkspaces/BA`.

### Starting from Scratch

1. First, clone the GitHub repo with `git clone` [`https://github.com/juripfammatter/rbd_package`](https://github.com/juripfammatter/rbd_packages).
2. [Create a workspace](https://industrial-training-master.readthedocs.io/en/melodic/_source/session1/Create-Catkin-Workspace.html) folder (assuming you've installed ROS Melodic):

   <pre data-line-numbers><code>source /opt/ros/melodic/setup.bash
   cd
   mkdir ROSWorkspaces/BA/src
   cd ~/ROSWorkspaces/BA
   catkin init
   catkin build
   source devel/setup.bash
   </code></pre>
3. Link the rbd\_packages folder symbolically to the new catkin workspace:\
   `ln -s ~/git/rbd_packages/rbd_ros_local ~/ROSWorkspaces/BA/src`.
4. Build the packages with `catkin build`.
5. `source devel/setup.bash`.

## Mounting Hardware

1. Mount the camera mount to the ZED2 Stereo camera.
2. Mount the camera with the camera mount to the robot.
3. Insert two M3 screws diagonally into the LiDAR mount.
4. Connect the power cable to the 19 V output and the LiDAR's USB-cable to the robot.&#x20;
5. Mount the LiDAR mount onto the robot.
6. Connect the ZED2 camera via its USB-cable.

## Starting the Robot

1. Check the battery status by pressing the power button located on the battery on the left-hand side once.
2. Start the robot by pressing the power button once and then holding it until the LEDs begin to move.
3. After a few seconds connect your local machine to the Unitree's WiFi hotspot.
4. Unplug the USB-cable of the LiDAR for one second, then plug it back in.
5. Check the connection to the robot with `ping unitree@192.168.123.12`.
6. Start the whole system by running `./rbd_startup.sh` in your home directory.
7. Now the GUI, camera image and Rviz should open a window on your local machine.
