setup: drop Ubuntu 18.04/20.04 support from ubuntu.sh

Remove Gazebo Classic installation branches for Ubuntu 18.04 and 20.04.
The script now only supports Ubuntu 22.04 and 24.04 with Gazebo Harmonic.

Supported Ubuntu LTS versions going forward:
- Ubuntu 24.04 (primary, used in CI and release builds)
- Ubuntu 22.04 (secondary, still supported)

When Ubuntu 26.04 LTS releases we will bump to 26.04/24.04.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-02-11 17:59:17 -08:00
parent 61da2505fe
commit 56c4a2a76b
+12 -31
View File
@@ -6,9 +6,9 @@ set -e
## Can also be used in docker. ## Can also be used in docker.
## ##
## Installs: ## Installs:
## - Common dependencies and tools for nuttx, jMAVSim, Gazebo ## - Common dependencies and tools for nuttx, Gazebo
## - NuttX toolchain (omit with arg: --no-nuttx) ## - NuttX toolchain (omit with arg: --no-nuttx)
## - jMAVSim and Gazebo9 simulator (omit with arg: --no-sim-tools) ## - Gazebo Harmonic simulator (omit with arg: --no-sim-tools)
## ##
INSTALL_NUTTX="true" INSTALL_NUTTX="true"
@@ -207,37 +207,18 @@ if [[ $INSTALL_SIM == "true" ]]; then
bc \ bc \
; ;
# Gazebo / Gazebo classic installation # Gazebo Harmonic installation (Ubuntu 22.04+)
if [[ "${UBUNTU_RELEASE}" == "18.04" || "${UBUNTU_RELEASE}" == "20.04" ]]; then echo "[ubuntu.sh] Gazebo (Harmonic) will be installed"
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' # Add Gazebo binary repository
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
# Update list, since new gazebo-stable.list has been added echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update -y --quiet sudo apt-get update -y --quiet
# Install Gazebo classic # Install Gazebo
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then gazebo_packages="gz-harmonic libunwind-dev"
gazebo_classic_version=9
gazebo_packages="gazebo$gazebo_classic_version libgazebo$gazebo_classic_version-dev"
else
# default and Ubuntu 20.04
gazebo_classic_version=11
gazebo_packages="gazebo$gazebo_classic_version libgazebo$gazebo_classic_version-dev"
fi
else
# Expects Ubuntu 22.04 > by default
echo "[ubuntu.sh] Gazebo (Harmonic) will be installed"
echo "[ubuntu.sh] Earlier versions will be removed"
# Add Gazebo binary repository
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update -y --quiet
# Install Gazebo if [[ "${UBUNTU_RELEASE}" == "24.04" ]]; then
gazebo_packages="gz-harmonic libunwind-dev" gazebo_packages="$gazebo_packages cppzmq-dev"
if [[ "${UBUNTU_RELEASE}" == "24.04" ]]; then
gazebo_packages="$gazebo_packages cppzmq-dev"
fi
fi fi
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \