forked from Archive/PX4-Autopilot
setup/ubuntu.sh: Only install Gazebo Garden for Ubuntu 22.04 (#21173)
* Tools/setup/ubuntu.sh: Only install Gazebo Garden on Ubuntu 22.04 Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it> * Apply suggestions from code review --------- Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it> Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
This commit is contained in:
parent
184c7fe79d
commit
458c351585
|
@ -219,29 +219,32 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||||
# Set Java 11 as default
|
# Set Java 11 as default
|
||||||
sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version")
|
sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version")
|
||||||
|
|
||||||
# Add Gazebo binary repository
|
# Gazebo / Gazebo classic installation
|
||||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
|
||||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
|
||||||
# Update list, since new gazebo-stable.list has been added
|
|
||||||
sudo apt-get update -y --quiet
|
|
||||||
|
|
||||||
# Install Gazebo
|
|
||||||
if [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
if [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
echo "Gazebo (Garden) will be installed"
|
||||||
ignition-fortress \
|
echo "Earlier versions will be removed"
|
||||||
;
|
# Add Gazebo binary repository
|
||||||
fi
|
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 classic
|
# Install Gazebo
|
||||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
gazebo_packages="gz-garden"
|
||||||
gazebo_version=9
|
|
||||||
gazebo_packages="gazebo$gazebo_version libgazebo$gazebo_version-dev"
|
|
||||||
elif [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
|
||||||
gazebo_packages="gazebo libgazebo-dev"
|
|
||||||
else
|
else
|
||||||
# default and Ubuntu 20.04
|
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||||
gazebo_version=11
|
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||||
gazebo_packages="gazebo$gazebo_version libgazebo$gazebo_version-dev"
|
# Update list, since new gazebo-stable.list has been added
|
||||||
|
sudo apt-get update -y --quiet
|
||||||
|
|
||||||
|
# Install Gazebo classic
|
||||||
|
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||||
|
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
|
||||||
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 \
|
||||||
|
|
Loading…
Reference in New Issue