Skip to content

Commit

Permalink
build(ROS distribution)!: transition to ROS 2 Humble (#2692)
Browse files Browse the repository at this point in the history
* remove Go PPA

Signed-off-by: Kenji Miyake <[email protected]>

docs(ansible/pre_commit): remove adding golang repository for humble (#2837)

fix(docs): remove adding golang repository for humble

Signed-off-by: M. Fatih Cırıt <[email protected]>

Signed-off-by: M. Fatih Cırıt <[email protected]>

* rename galactic to humble

Signed-off-by: Kenji Miyake <[email protected]>

* feat: add ament_cmake fork (autowarefoundation#370)

Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>

* revert(autoware.repos): revert "feat: add ament_cmake fork (autowarefoundation#370)" (#3054)

This reverts commit 0d06dd3ce10ce4e4857822173954a48cb2e91b63.

* update hash of grid_map

Signed-off-by: Kenji Miyake <[email protected]>

* chore: remove grid_map from repos (#2864)

* use Ubuntu 22.04 and CUDA 11.8

Signed-off-by: Kenji Miyake <[email protected]>

* build(ansible/ros2_dev_tools): change ros2_dev_tools to follow humble documentation (#3007)

Signed-off-by: Shin-kyoto <[email protected]>

Signed-off-by: Shin-kyoto <[email protected]>

build(ansible/ros2_dev_tools):  follow updated humble documentation (#3020)

Signed-off-by: Shin-kyoto <[email protected]>

Signed-off-by: Shin-kyoto <[email protected]>

* docs(ansible/cuda): update manual installation steps

Signed-off-by: Kenji Miyake <[email protected]>

* tmp: use ubuntu:22.04 for cuda_base_image

Signed-off-by: Kenji Miyake <[email protected]>

* tmp: add liburcu6 repository for CUDA 20.04 repository

Signed-off-by: Kenji Miyake <[email protected]>

* feat(ansible/playbooks): update Ubuntu version

Signed-off-by: Kenji Miyake <[email protected]>

Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: Kenji Miyake <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: Shin-kyoto <[email protected]>
Co-authored-by: M. Fatih Cırıt <[email protected]>
Co-authored-by: Daisuke Nishimatsu <[email protected]>
Co-authored-by: Shintaro Tomie <[email protected]>
  • Loading branch information
4 people authored Dec 1, 2022
1 parent b5b46f0 commit 9e35fd1
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 82 deletions.
6 changes: 3 additions & 3 deletions amd64.env
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions ansible/playbooks/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions ansible/playbooks/universe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 15 additions & 7 deletions ansible/roles/cuda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions ansible/roles/pre_commit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
6 changes: 0 additions & 6 deletions ansible/roles/pre_commit/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/rmw_implementation/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/ros2/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand Down
39 changes: 14 additions & 25 deletions ansible/roles/ros2_dev_tools/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
38 changes: 11 additions & 27 deletions ansible/roles/ros2_dev_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions autoware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e35fd1

Please sign in to comment.