From 561d44a04a0dab42d4e99686376930a04b1632b9 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 29 Jun 2020 21:52:37 +0200 Subject: [PATCH 1/5] setup: don't require exact matplotlib version Because this older version fails to install on Ubuntu 20.04 and makes the entire setup script fail. --- Tools/setup/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/setup/requirements.txt b/Tools/setup/requirements.txt index baf2d94fbd9a..f6a3794fd46f 100644 --- a/Tools/setup/requirements.txt +++ b/Tools/setup/requirements.txt @@ -4,7 +4,7 @@ cerberus coverage empy>=3.3 jinja2>=2.8 -matplotlib==3.0.* +matplotlib>=3.0.* numpy>=1.13 packaging pandas>=0.21 From 1d0b60e43354fe37a3a4ddb50f5d2e50bfa08e63 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 29 Jun 2020 21:56:12 +0200 Subject: [PATCH 2/5] ubuntu.sh: don't upgrade pip outside of system package manager This can lead to inconsistency with the installed package. E.g. also if the package is remove the upgraded pip stays but the symbolic links are gone. --- Tools/setup/ubuntu.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index 56c44e5bdb8c..9caef165326a 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -107,7 +107,6 @@ fi # Python3 dependencies echo echo "Installing PX4 Python3 dependencies" -python3 -m pip install --upgrade pip python3 -m pip install --user -r ${DIR}/requirements.txt # NuttX toolchain (arm-none-eabi-gcc) From 3b36473715fbef88aba46fae3c841c167d2f39a1 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 29 Jun 2020 21:59:17 +0200 Subject: [PATCH 3/5] ubuntu.sh: source .profile before checking for ARM GCC to avoid downloading and installing ARM GCC again if the script is reran immediately after e.g. because it failed the first time. --- Tools/setup/ubuntu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index 9caef165326a..3d9eab75a517 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -139,6 +139,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then # arm-none-eabi-gcc NUTTX_GCC_VERSION="7-2017-q4-major" + source $HOME/.profile # load changed path for the case the script is reran before relogin if [ $(which arm-none-eabi-gcc) ]; then GCC_VER_STR=$(arm-none-eabi-gcc --version) GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}") From 9696e3cea547fcc0a846b7db24f3ea143c90b7f7 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 29 Jun 2020 22:00:17 +0200 Subject: [PATCH 4/5] ubuntu.sh: style, 20.04 comment and message wording --- Tools/setup/ubuntu.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index 3d9eab75a517..d1c1587a778b 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -## Bash script to setup PX4 development environment on Ubuntu LTS (18.04, 16.04). +## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04, 16.04). ## Can also be used in docker. ## ## Installs: @@ -156,8 +156,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then # add arm-none-eabi-gcc to user's PATH exportline="export PATH=/opt/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}/bin:\$PATH" - if grep -Fxq "$exportline" $HOME/.profile; - then + if grep -Fxq "$exportline" $HOME/.profile; then echo "${NUTTX_GCC_VERSION} path already set."; else echo $exportline >> $HOME/.profile; @@ -210,5 +209,5 @@ fi if [[ $INSTALL_NUTTX == "true" ]]; then echo - echo "Reboot or logout, login computer before attempting to build NuttX targets" + echo "Relogin or reboot computer before attempting to build NuttX targets" fi From f60c8b409566030ce5affd8877a085e3b9eb195d Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 29 Jun 2020 22:18:08 +0200 Subject: [PATCH 5/5] ubuntu.sh: add fix for gazebo's OpenGL problem in VMs That makes gazebo crash in VMWare 3D graphics accelration. --- Tools/setup/ubuntu.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/setup/ubuntu.sh b/Tools/setup/ubuntu.sh index d1c1587a778b..a4bd951212d4 100755 --- a/Tools/setup/ubuntu.sh +++ b/Tools/setup/ubuntu.sh @@ -205,6 +205,10 @@ if [[ $INSTALL_SIM == "true" ]]; then protobuf-compiler \ ; + if sudo dmidecode -t system | grep -q "Manufacturer: VMware, Inc." ; then + # fix VMWare 3D graphics acceleration for gazebo + echo "export SVGA_VGPU10=0" >> ~/.profile + fi fi if [[ $INSTALL_NUTTX == "true" ]]; then