diff --git a/amd64.env b/amd64.env index dad15c2106..1366bd83c9 100644 --- a/amd64.env +++ b/amd64.env @@ -1,7 +1,7 @@ -rosdistro=galactic +rosdistro=humble rmw_implementation=rmw_cyclonedds_cpp -base_image=ubuntu:20.04 -cuda_base_image=nvidia/cuda:11.6.2-devel-ubuntu20.04 +base_image=ubuntu:22.04 +cuda_base_image=ubuntu:22.04 cuda_version=11.6 cudnn_version=8.4.1.50-1+cuda11.6 tensorrt_version=8.4.2-1+cuda11.6 diff --git a/ansible/playbooks/core.yaml b/ansible/playbooks/core.yaml index d9851f0fce..4f63b33bf9 100644 --- a/ansible/playbooks/core.yaml +++ b/ansible/playbooks/core.yaml @@ -3,8 +3,8 @@ pre_tasks: - name: Verify OS ansible.builtin.fail: - msg: Only Ubuntu 20.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/. - when: ansible_distribution_version != '20.04' + msg: Only Ubuntu 22.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/. + when: ansible_distribution_version != '22.04' - name: Print args ansible.builtin.debug: diff --git a/ansible/playbooks/universe.yaml b/ansible/playbooks/universe.yaml index 778b1d5889..67f84b8e39 100644 --- a/ansible/playbooks/universe.yaml +++ b/ansible/playbooks/universe.yaml @@ -9,8 +9,8 @@ pre_tasks: - name: Verify OS ansible.builtin.fail: - msg: Only Ubuntu 20.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/. - when: ansible_distribution_version != '20.04' + msg: Only Ubuntu 22.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/. + when: ansible_distribution_version != '22.04' - name: Print args ansible.builtin.debug: diff --git a/ansible/roles/cuda/README.md b/ansible/roles/cuda/README.md index 815ce0eec6..858031d578 100644 --- a/ansible/roles/cuda/README.md +++ b/ansible/roles/cuda/README.md @@ -19,15 +19,23 @@ For Universe, the `cuda_version` version can also be found in: ```bash wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/main/amd64.env && source /tmp/amd64.env -# Modified from: -# https://developer.nvidia.com/cuda-11-4-4-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network -wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin -sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 -sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub -sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" +# Modified from: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network + +# A temporary workaround for Ubuntu 22.04 with the ubuntu2004 repository +if [[ "$(uname -m)" == "x86_64" ]]; then + liburcu6_url=http://archive.ubuntu.com/ubuntu +else + liburcu6_url=http://ports.ubuntu.com/ubuntu-ports +fi +sudo echo "deb $liburcu6_url focal main restricted" > /etc/apt/sources.list.d/focal.list + +# TODO: Use 22.04 in https://github.com/autowarefoundation/autoware/pull/3084. Currently, 20.04 is intentionally used. +os=ubuntu2004 +wget https://developer.download.nvidia.com/compute/cuda/repos/$os/$(uname -m)/cuda-keyring_1.0-1_all.deb +sudo dpkg -i cuda-keyring_1.0-1_all.deb sudo apt-get update cuda_version_dashed=$(eval sed -e "s/[.]/-/g" <<< "${cuda_version}") -sudo apt install cuda-${cuda_version_dashed} --no-install-recommends +sudo apt-get -y install cuda-${cuda_version_dashed} ``` Perform the post installation actions: diff --git a/ansible/roles/cuda/tasks/main.yaml b/ansible/roles/cuda/tasks/main.yaml index fd427d430a..8060d455c9 100644 --- a/ansible/roles/cuda/tasks/main.yaml +++ b/ansible/roles/cuda/tasks/main.yaml @@ -8,6 +8,22 @@ register: cuda_architecture changed_when: false +- name: (tmp for Ubuntu 22.04) Add liburcu6 repository into sources.list for amd64 + become: true + ansible.builtin.apt_repository: + repo: deb http://archive.ubuntu.com/ubuntu focal main restricted + filename: focal + state: present + when: cuda_architecture.stdout == "x86_64" + +- name: (tmp for Ubuntu 22.04) Add liburcu6 repository into sources.list for arm64 + become: true + ansible.builtin.apt_repository: + repo: deb http://ports.ubuntu.com/ubuntu-ports focal main restricted + filename: focal + state: present + when: cuda_architecture.stdout == "aarch64" + - name: Remove old /etc/apt/sources.list.d/cuda.list become: true ansible.builtin.file: diff --git a/ansible/roles/pre_commit/README.md b/ansible/roles/pre_commit/README.md index 97a9b2f21c..46d040f903 100644 --- a/ansible/roles/pre_commit/README.md +++ b/ansible/roles/pre_commit/README.md @@ -17,7 +17,5 @@ The `clang_format_version` variable can also be found in: clang_format_version=14.0.6 pip3 install pre-commit clang-format==${clang_format_version} -# Install Golang (Add Go PPA for shfmt) -sudo add-apt-repository ppa:longsleep/golang-backports sudo apt install golang ``` diff --git a/ansible/roles/pre_commit/tasks/main.yaml b/ansible/roles/pre_commit/tasks/main.yaml index cb6f5305f5..6a69af8db7 100644 --- a/ansible/roles/pre_commit/tasks/main.yaml +++ b/ansible/roles/pre_commit/tasks/main.yaml @@ -10,12 +10,6 @@ version: "{{ clang_format_version }}" executable: pip3 -# TODO: Remove after we move to Ubuntu 22.04 -- name: Add Go PPA for shfmt - become: true - ansible.builtin.apt_repository: - repo: ppa:longsleep/golang-backports # cspell:disable-line - - name: Install Go become: true ansible.builtin.apt: diff --git a/ansible/roles/rmw_implementation/README.md b/ansible/roles/rmw_implementation/README.md index dfc37c2227..41af1aee5a 100644 --- a/ansible/roles/rmw_implementation/README.md +++ b/ansible/roles/rmw_implementation/README.md @@ -1,6 +1,6 @@ # rmw_implementation -This role sets up ROS 2 RMW implementation following [this page](https://docs.ros.org/en/galactic/How-To-Guides/Working-with-multiple-RMW-implementations.html). +This role sets up ROS 2 RMW implementation following [this page](https://docs.ros.org/en/humble/How-To-Guides/Working-with-multiple-RMW-implementations.html). ## Inputs @@ -17,7 +17,7 @@ For Universe, the `rosdistro` and `rmw_implementation` variable can also be foun ```bash wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/main/amd64.env && source /tmp/amd64.env -# For details: https://docs.ros.org/en/galactic/How-To-Guides/Working-with-multiple-RMW-implementations.html +# For details: https://docs.ros.org/en/humble/How-To-Guides/Working-with-multiple-RMW-implementations.html sudo apt update rmw_implementation_dashed=$(eval sed -e "s/_/-/g" <<< "${rmw_implementation}") sudo apt install ros-${rosdistro}-${rmw_implementation_dashed} diff --git a/ansible/roles/ros2/README.md b/ansible/roles/ros2/README.md index 90fd57d5cd..0fd0ce6560 100644 --- a/ansible/roles/ros2/README.md +++ b/ansible/roles/ros2/README.md @@ -1,6 +1,6 @@ # ros2 -This role installs [ROS 2](http://www.ros2.org/) following [this page](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html). +This role installs [ROS 2](http://www.ros2.org/) following [this page](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html). Additional steps may be needed depending on the `rosdistro` you choose. @@ -32,7 +32,7 @@ For Universe, the `rosdistro` variable can also be found in: ```bash wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/main/amd64.env && source /tmp/amd64.env -# Taken from: https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html +# Taken from: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html # You will need to add the ROS 2 apt repository to your system. First, make sure that the Ubuntu Universe repository is enabled by checking the output of this command. apt-cache policy | grep universe diff --git a/ansible/roles/ros2_dev_tools/README.md b/ansible/roles/ros2_dev_tools/README.md index 1ee3e37909..6a10a8b531 100644 --- a/ansible/roles/ros2_dev_tools/README.md +++ b/ansible/roles/ros2_dev_tools/README.md @@ -1,6 +1,6 @@ # ros2_dev_tools -This role installs ROS 2 development tools following [this page](https://docs.ros.org/en/galactic/Installation/Ubuntu-Development-Setup.html). +This role installs ROS 2 development tools following [this page](https://docs.ros.org/en/humble/Installation/Ubuntu-Development-Setup.html). ## Inputs @@ -9,34 +9,23 @@ None. ## Manual Installation ```bash -# Taken from https://docs.ros.org/en/galactic/Installation/Ubuntu-Development-Setup.html +# Taken from https://docs.ros.org/en/humble/Installation/Ubuntu-Development-Setup.html sudo apt update && sudo apt install -y \ - build-essential \ - cmake \ - git \ - python3-colcon-common-extensions \ - python3-flake8 \ + python3-flake8-docstrings \ python3-pip \ python3-pytest-cov \ - python3-rosdep \ - python3-setuptools \ - python3-vcstool \ - wget + ros-dev-tools -# Install some pip packages needed for testing -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 +sudo apt install -y \ + python3-flake8-blind-except \ + python3-flake8-builtins \ + python3-flake8-class-newline \ + python3-flake8-comprehensions \ + python3-flake8-deprecated \ + python3-flake8-import-order \ + python3-flake8-quotes \ + python3-pytest-repeat \ + python3-pytest-rerunfailures # Initialize rosdep sudo rosdep init diff --git a/ansible/roles/ros2_dev_tools/tasks/main.yaml b/ansible/roles/ros2_dev_tools/tasks/main.yaml index 8c02fe3b55..e67381179d 100644 --- a/ansible/roles/ros2_dev_tools/tasks/main.yaml +++ b/ansible/roles/ros2_dev_tools/tasks/main.yaml @@ -2,39 +2,23 @@ become: true ansible.builtin.apt: name: - - build-essential - - cmake - - git - - python3-colcon-common-extensions - python3-colcon-mixin - - python3-flake8 + - python3-flake8-docstrings - python3-pip - python3-pytest-cov - - python3-rosdep - - python3-setuptools - - python3-vcstool - - wget + - ros-dev-tools + - python3-flake8-blind-except + - python3-flake8-builtins + - python3-flake8-class-newline + - python3-flake8-comprehensions + - python3-flake8-deprecated + - python3-flake8-import-order + - python3-flake8-quotes + - python3-pytest-repeat + - python3-pytest-rerunfailures state: latest update_cache: true -- name: Install pip packages - ansible.builtin.pip: - name: - - 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 - state: latest - executable: pip3 - - name: Run 'sudo rosdep init' become: true ansible.builtin.command: diff --git a/autoware.repos b/autoware.repos index 35df0052c0..8a721b6eb1 100644 --- a/autoware.repos +++ b/autoware.repos @@ -33,10 +33,6 @@ repositories: type: git url: https://github.com/tier4/tier4_autoware_msgs.git version: tier4/universe - universe/external/grid_map: - type: git - url: https://github.com/ANYbotics/grid_map.git - version: ba2f9cb6e62f7ee9c5bac7401391a211e442e459 universe/external/morai_msgs: type: git url: https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs.git