Dual-Boot Configuration and Autoware.universe Deployment on Ubuntu 20.04
UEFI Verification and Disk Preparation
Verify the system firmware interface by launching System Information in Windows. Confirm that the BIOS Mode reads UEFI. Legacy BIOS requires a different partitioning strategy. Disable BitLocker encryption to prevent data locks during partition resizing. Navigate to Device Encryption settings and toggle the feature off. Wait for the decryption process to complete before proceeding. Open Disk Management, locate the target drive, and shrink the volume to allocate unallocated space for the Linux installation. A minimum of 200 GB is recommended for development workloads.
Bootable Media Creation with Ventoy
Download the Ubuntu 20.04 LTS desktop ISO from an official mirror. Obtain the Ventoy Windows package, extract it, and launch the GUI. Insert a USB drive, select GPT partition style under configuration options, and install Ventoy to the device. Copy the Ubuntu ISO directly to the newly formatted Ventoy drive.
Firmware Configuration
Reboot and access the UEFI setup utility. Disable Secure Boot to allow third-party kernel modules. Locate the SATA operation mode and switch from Intel RST/RAID to AHCI. Adjust the boot priority to place the USB device at the top of the EFI boot order. Save changes and exit.
Ubuntu 20.04 Installation
Boot from the USB drive and select the Ubuntu ISO from the Ventoy menu. Choose normal boot mode. During the installer setup, select the manual partitioning option. Identify the unallocated space created earlier, format it as ext4, and assign the mount point to /. Locate the existing EFI System Partition (typically labeled Windows Boot Manager) and set it as the boot loader installation target. Proceed with the installation, configure the timezone, and create a user account. Remove the USB drive upon completion and reboot into the new environment.
ROS2 Galactic and Development Toolchain
Update the package index and install the core build dependencies:
sudo apt update && sudo apt install -y \
build-essential cmake git wget \
python3-colcon-common-extensions \
python3-flake8 python3-pip \
python3-pytest-cov python3-rosdep \
python3-setuptools python3-vcstool
Install Python testing and linting utilities:
python3 -m pip install -U \
flake8-blind-except flake8-builtins \
flake8-class-newline flake8-comprehensions \
flake8-deprecated flake8-docstrings \
flake8-import-order flake8-quotes \
pytest-repeat pytest-rerunfailures \
pytest setuptools
Configure the ROS dependency resolver with a reliable mirror:
sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/20-default.list \
https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
rosdep update --include-eol-distros
echo 'export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml' >> ~/.bashrc
sudo apt install -y python3-testresources
Deploy ROS2 Galactic using the official repository keys and apt packages, then source the environment.
Network Proxy and Autoware Environment Setup
Configure Git to route traffic through a local proxy if direct access to external repositories is restricted:
git config --global http.proxy http://127.0.0.1:8889
git config --global https.proxy http://127.0.0.1:8889
Create a workspace directory and clone the Autoware foundation repository targeting the Galactic branch:
mkdir -p ~/autoware_ws && cd ~/autoware_ws
git clone https://github.com/autowarefoundation/autoware.git -b galactic
cd autoware
./setup-dev-env.sh
Apply the RMW implementation configuration:
source amd64.env
RMW_PKG=$(echo "${rmw_implementation}" | sed 's/_/-/g')
sudo apt install -y ros-${ROS_DISTRO}-${RMW_PKG}
echo "export RMW_IMPLEMENTATION=${rmw_implementation}" >> ~/.bashrc
Install the PACMod interface package:
sudo apt install -y apt-transport-https
echo "deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/autonomoustuff-public.list
sudo apt update && sudo apt install -y ros-${ROS_DISTRO}-pacmod3
GeographicLib Data and Linting Tools
Bypass slow package manager downloads by manually retrieving the EGM2008 geoid dataset from the official SourceForge repository. Extract the archive and transfer the data files to the system directory:
sudo cp -r ./geoids/* /usr/share/GeographicLib/geoids/
Install code formatting and pre-commit hooks:
CLANG_FMT_VER=14.0.6
pip3 install pre-commit clang-format==${CLANG_FMT_VER}
sudo add-apt-repository -y ppa:longsleep/golang-backports
sudo apt install -y golang
CUDA, cuDNN, and TensorRT Configuration
Download the CUDA 11.6 runfile installer matching the system architecture. Execute the installer, ensuring the driver component remains selected if the system lacks a compatible NVIDIA driver. After installation, append the library paths to the shell configuration:
echo 'export PATH=/usr/local/cuda-11.6/bin${PATH:+:${PATH}}' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bashrc
source ~/.bashrc
nvcc --version
Install cuDNN and TensorRT libraries while locking their versions to prevent unintended upgrades:
source amd64.env
sudo apt install -y libcudnn8=${cudnn_version} libcudnn8-dev=${cudnn_version}
sudo apt-mark hold libcudnn8 libcudnn8-dev
sudo apt install -y libnvinfer8=${tensorrt_version} libnvonnxparsers8=${tensorrt_version} \
libnvparsers8=${tensorrt_version} libnvinfer-plugin8=${tensorrt_version} \
libnvinfer-dev=${tensorrt_version} libnvonnxparsers-dev=${tensorrt_version} \
libnvparsers-dev=${tensorrt_version} libnvinfer-plugin-dev=${tensorrt_version}
sudo apt-mark hold libnvinfer8 libnvonnxparsers8 libnvparsers8 libnvinfer-plugin8 \
libnvinfer-dev libnvonnxparsers-dev libnvparsers-dev libnvinfer-plugin-dev
Source Import and Dependency Resolution
Modify the autoware.repos file to include external planner modules if required. Import all repositories into the src directory using VCS:
mkdir -p src
vcs import src < autoware.repos
Resolve ROS dependencies. If rosdep skips packages or fails, reset the setuptools version to resolve Python packaging conflicts:
pip3 install --user --upgrade setuptools==58.3.0
source /opt/ros/galactic/setup.bash
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}
Manually install any missing ROS packages reported during the dependency check by converting underscores to hyphens in the package names.
Workspace Compilation and Troubleshooting
Initiate the build process with optimized CMake flags:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
If system resources are exhausted during parallel compilation, switch to a sequential executor or limit worker threads:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --executor sequential
Network timeouts during the trtexec_vendor package build can be resolved by routing the Git clone operation through a reverse proxy. Locate the CMakeLists.txt file within the trtexec_vendor directory and modify the repository URL:
# Original
GIT_REPOSITORY https://github.com/NVIDIA/TensorRT
# Modified
GIT_REPOSITORY https://ghproxy.com/https://github.com/NVIDIA/TensorRT
Clear previous build artifacts before retrying:
rm -rf build/ log/ install/
git config --global --unset http.proxy
git config --global --unset https.proxy
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
The workspace compiles successfully once all external dependencies are resolved and network routing is stabilized.