Installation

Complete installation guide for the AV2 software stack.

System Requirements

Operating System

  • Ubuntu 20.04 LTS (recommended) or Ubuntu 22.04 LTS

  • Other Linux distributions may work but are not officially supported

Hardware

Component

Minimum

Recommended

CPU

Intel i5 / AMD Ryzen 5

Intel i7 / AMD Ryzen 7

RAM

8 GB

16+ GB

GPU

NVIDIA GTX 1050

NVIDIA GTX 1060+

Storage

50 GB SSD

256+ GB NVMe SSD

USB Ports

3x USB 3.0

4x USB 3.0

Ethernet

1x Gigabit

1x Gigabit

Step 1: System Packages

Update your system and install required packages:

sudo apt update && sudo apt upgrade -y

# Core development tools
sudo apt install -y build-essential cmake git wget curl

# Python development
sudo apt install -y python3-dev python3-pip python3-venv

# OpenCV dependencies
sudo apt install -y libopencv-dev python3-opencv

# Serial communication
sudo apt install -y libserial-dev

# Open3D dependencies (for 3D visualization)
sudo apt install -y libgl1-mesa-dev libglu1-mesa-dev

Step 2: NVIDIA Drivers & CUDA

For GPU-accelerated perception (YOLOPv2):

# Add NVIDIA repository
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

# Install recommended driver
sudo ubuntu-drivers autoinstall

# Reboot
sudo reboot

After reboot, verify the driver:

nvidia-smi

Install CUDA Toolkit:

# Install CUDA 11.8 (adjust version as needed)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt update
sudo apt install -y cuda-toolkit-11-8

# Add to PATH (add to ~/.bashrc)
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

Step 3: Python Environment

Create and activate a virtual environment:

cd ~/utm-navigator
python3 -m venv venv
source venv/bin/activate

# Upgrade pip
pip install --upgrade pip setuptools wheel

Step 4: Python Dependencies

Install all Python packages:

pip install -r requirements.txt

Or install manually:

# Core scientific stack
pip install numpy scipy matplotlib

# Computer vision
pip install opencv-python opencv-contrib-python

# Deep learning (with CUDA support)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

# Navigation and mapping
pip install osmnx networkx pyproj shapely

# Visualization
pip install open3d

# Hardware interfaces
pip install pyserial velodyne-decoder pyrealsense2

# Configuration
pip install pyyaml

Step 5: Xsens SDK Installation

The Xsens MTi SDK requires manual installation:

  1. Download the MT Software Suite from Xsens

  2. Extract and run the installer:

tar -xzf MT_Software_Suite_linux-x64_2022.0.tar.gz
cd MT_Software_Suite_linux-x64_2022.0
sudo ./mtsdk_linux-x64_2022.0.run
  1. Install the Python bindings:

pip install xsensdeviceapi
  1. Add user to dialout group for serial access:

sudo usermod -a -G dialout $USER
# Log out and back in for changes to take effect

Step 6: Verify Installation

Run the verification script:

python scripts/verify_installation.py

Expected output:

Checking Python version... OK (3.10.12)
Checking NumPy... OK (1.24.3)
Checking OpenCV... OK (4.8.0)
Checking PyTorch... OK (2.0.1+cu118)
Checking CUDA availability... OK (CUDA 11.8)
Checking OSMnx... OK (1.5.0)
Checking Xsens SDK... OK
Checking Velodyne decoder... OK

All dependencies installed successfully!

Troubleshooting

CUDA not detected

Ensure NVIDIA drivers are installed:

nvidia-smi

If the command fails, reinstall drivers and reboot.

Permission denied on serial ports

Add your user to the dialout group:

sudo usermod -a -G dialout $USER

Log out and log back in.

OSMnx import error

OSMnx requires additional system libraries:

sudo apt install -y libspatialindex-dev
pip install rtree

Next Steps