forked from Archive/PX4-Autopilot
setup ubuntu.sh; fix legacy gazebo for ubuntu22.04
This commit is contained in:
parent
d821404e4f
commit
91e97eded9
|
@ -14,7 +14,7 @@ set -e
|
|||
INSTALL_NUTTX="true"
|
||||
INSTALL_SIM="true"
|
||||
INSTALL_ARCH=`uname -m`
|
||||
INSTALL_SIM_JAMMY="false"
|
||||
INSTALL_SIM_IGNITION="false"
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
|
@ -27,8 +27,8 @@ do
|
|||
INSTALL_SIM="false"
|
||||
fi
|
||||
|
||||
if [[ $arg == "--sim_jammy" ]]; then
|
||||
INSTALL_SIM_JAMMY="true"
|
||||
if [[ $arg == "--sim-ignition" ]]; then
|
||||
INSTALL_SIM_IGNITION="true"
|
||||
fi
|
||||
|
||||
done
|
||||
|
@ -71,9 +71,7 @@ elif [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
|||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
echo "Ubuntu 20.04"
|
||||
elif [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||
echo "Ubuntu 22.04, simulation build off by default."
|
||||
echo "Use --sim_jammy to enable simulation build."
|
||||
INSTALL_SIM="false"
|
||||
echo "Ubuntu 22.04"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -230,7 +228,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
|||
gazebo_version=9
|
||||
gazebo_packages="gazebo$gazebo_version libgazebo$gazebo_version-dev"
|
||||
elif [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||
gazebo_packages="ignition-fortress"
|
||||
gazebo_packages="gazebo libgazebo-dev"
|
||||
else
|
||||
# default and Ubuntu 20.04
|
||||
gazebo_version=11
|
||||
|
@ -264,7 +262,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ $INSTALL_SIM_JAMMY == "true" ]]; then
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue