Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 3.55 KB

File metadata and controls

91 lines (65 loc) · 3.55 KB

Unicorn Race Stack Installation

Before getting started, please note that the Unicorn Race Stack uses Cartographer and most of its stacks are written primarily in Python. Therefore, we strongly recommend using an Intel NUC for optimal performance. Additionally, if you are using a recent NUC model, please be aware that Ubuntu 20.04 is not supported. We recommend installing a compatible Ubuntu version supported by your NUC and performing the installation via Docker.

Prerequisites

A 1/10 scale F1TENTH vehicle is used as the hardware platform. If you do not have one prepared, please refer to the official F1TENTH instructions.

Additionally, the following extra devices were used to improve performance and monitor the system state.

To deploy or develop using Docker, make sure you have both Docker and Docker Compose installed. And make sure to have docker accessible without sudo, follow the official docker post-installation steps here.

  • Docker / Docker Compose

For your reference, the Unicorn Race Stack uses ROS Noetic.

Clone the Repo

Before cloning, make sure to create the appropriate directory.

mkdir ~/unicorn_ws && cd ~/unicorn_ws

mkdir -p cache/noetic/build cache/noetic/devel cache/noetic/logs

Recursive clone the main repository together with it's submodules!

git clone --recurse-submodules https://github.com/HMCL-UNIST/UNICORN.git && cd UNICORN

udev Rules Setup

To ensure that the USB-connected devices are recognized consistently and accessible without requiring manual reconfiguration, a set of custom udev rules must be installed.

For installation of custom udev rules, run the script with root privileges:

# for Blink1
sudo ./.devcontainer/.install_utils/udev_rules_blink1.sh

# for IMU
sudo ./.devcontainer/.install_utils/udev_rules_imu.sh

# for VESC
sudo ./.devcontainer/.install_utils/udev_rules_vesc.sh

Then check if the devices are correctly linked:

# for IMU
ls -l /dev/IMU

# for VESC
ls -l /dev/VESC

Build with docker

First, build the base docker image with docker compose:

docker compose build base_x86

Then export the needed environment variables and build the simulator container:

export UID=$(id -u)
export GID=$(id -g)
docker compose build nuc

Then Open the workspace from VS Code:

code ~/unicorn_ws/UNICORN

In the VS Code window, press Ctrl + Shift + P to open the command palette. From the banner that appears, select Dev Containers: Rebuild and Reopen in Container. This will allow VS Code to automatically connect to the container. By installing the Remote Development extension from the Extensions tab in VS Code, you will be able to easily reconnect to previously created containers in the future.

How to use GUI applications with the container

To have more information on how to use GUI applications with the container, please refer to the GUI applications documentation.