From 19cee04f3af66f0be1aa45995e6a01772c670ded Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 5 Jan 2023 17:13:21 +0100 Subject: [PATCH] ubuntu.sh: always install "Gazebo" next to "Gazebo classic" on 22.04 --- Tools/setup/ubuntu.sh | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index 3c4da00ab3..209c719ad5 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -14,7 +14,6 @@ set -e INSTALL_NUTTX="true" INSTALL_SIM="true" INSTALL_ARCH=`uname -m` -INSTALL_SIM_IGNITION="false" # Parse arguments for arg in "$@" @@ -26,11 +25,6 @@ do if [[ $arg == "--no-sim-tools" ]]; then INSTALL_SIM="false" fi - - if [[ $arg == "--sim-ignition" ]]; then - INSTALL_SIM_IGNITION="true" - fi - done # detect if running in docker @@ -223,7 +217,7 @@ if [[ $INSTALL_SIM == "true" ]]; then # Set Java 11 as default sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version") - # Gazebo + # Install Gazebo classic if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then gazebo_version=9 gazebo_packages="gazebo$gazebo_version libgazebo$gazebo_version-dev" @@ -260,16 +254,17 @@ if [[ $INSTALL_SIM == "true" ]]; then # fix VMWare 3D graphics acceleration for gazebo echo "export SVGA_VGPU10=0" >> ~/.profile fi -fi -if [[ $INSTALL_SIM_IGNITION == "true" ]]; then - 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 - sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ - ignition-fortress \ - ; + # Install Gazebo + if [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then + 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 + sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ + ignition-fortress \ + ; + fi fi if [[ $INSTALL_NUTTX == "true" ]]; then