From f45b5a97932388aed725320d65b359c87fd612eb Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Tue, 29 Jun 2021 22:12:10 -0400 Subject: [PATCH 1/9] Made changes for Ubuntu20 --- gen_install.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index c900231d..c4a43915 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -10,17 +10,34 @@ sudo apt-get -qq update -y if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==16));then ROS_VERSION="kinetic" - else - if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then +fi +if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then ROS_VERSION="melodic" fi +if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==20)); then + ROS_VERSION="noetic" fi echo "installing for ros version: ${ROS_VERSION}" sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full source /opt/ros/${ROS_VERSION}/setup.bash ## install rosmon, it would be weird for this to be in one of the packages: #sudo apt-get install ros-${ROS_VERSION}-rosmon +if(($ROS_VERSION="kinetic"||$ROS_VERSION="melodic")); then + sudo apt-get -qq install -y python-rosdep + sudo apt-get -qq install -y python-pip + pip install 'mutagen==1.43.0' --user -q + echo "INSTALLING ROSDEP DEPENDENCIES" + sudo apt-get -qq install python-rosdep -y + +fi +if(($ROS_VERSION="noetic")); then + sudo apt-get -qq install -y python3-rosdep + sudo apt-get -qq install -y python3-pip + pip install 'mutagen' --user -q + echo "INSTALLING ROSDEP DEPENDENCIES" + sudo apt-get -qq install python3-rosdep -y +fi sudo apt-get -qq install -y python-rosdep [ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q rosdep update -q @@ -31,12 +48,9 @@ echo "INSTALLING DEPENDENCIES NOT FOUND IN ROSDEP" #pip install pyqtgraph --user #I think I have replaced this by adding a symlink: #python flo_face/teensy/src/serial_coms/computer/python/serial-coms/setup.py install --user -# Mutagen has dropped python 2 support. Last supported version was 1.43.0: -sudo apt-get -qq install -y python-pip -pip install 'mutagen==1.43.0' --user -q +# Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved up into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. + -echo "INSTALLING ROSDEP DEPENDENCIES" -sudo apt-get -qq install python-rosdep -y cd ~/catkin_ws rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki" cd - From e0bb5222b5830d1b1e58c2604605f3e11424f4a8 Mon Sep 17 00:00:00 2001 From: Michael Sobrepera Date: Wed, 30 Jun 2021 00:47:53 -0400 Subject: [PATCH 2/9] tried to add ubuntu-20 build testing --- .github/workflows/ros.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ros.yml b/.github/workflows/ros.yml index 87fb8a2a..b3719be1 100644 --- a/.github/workflows/ros.yml +++ b/.github/workflows/ros.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04] + os: [ubuntu-18.04, ubuntu-20.04] steps: - name: Create Catkin Workspace @@ -51,7 +51,6 @@ jobs: run: | cd "$HOME/catkin_ws/src/LilFloSystem" bash gen_install.sh - - uses: actions/cache@v1 with: path: ~/.cache/pip @@ -60,7 +59,7 @@ jobs: ${{ runner.os }}-pip- - name: Pylint - if: ${{ success() || failure() }} + if: ${{ (success() || failure()) && matrix.os == 'ubuntu-18.04' }} run: | python -m pip install --upgrade pip echo "/home/runner/.local/bin" >> $GITHUB_PATH @@ -70,7 +69,7 @@ jobs: git ls-files | grep 'py$' | xargs pylint --unsafe-load-any-extension=y --disable=fixme - name: Catkin Lint - if: ${{ success() || failure() }} + if: ${{ (success() || failure()) && matrix.os == 'ubuntu-18.04' }} run: | sudo add-apt-repository ppa:roehling/ros sudo apt-get update -y From 06c1e47285a3da6127a7cb7c6363e100efb01c15 Mon Sep 17 00:00:00 2001 From: Michael Sobrepera Date: Wed, 30 Jun 2021 00:56:52 -0400 Subject: [PATCH 3/9] do not fail jobs when other parts of os matrix fail --- .github/workflows/ros.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ros.yml b/.github/workflows/ros.yml index b3719be1..e1d534b2 100644 --- a/.github/workflows/ros.yml +++ b/.github/workflows/ros.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] + fail-fast: false steps: - name: Create Catkin Workspace From 6c7dc7d678319820516d927c263978caf42f24a3 Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Wed, 30 Jun 2021 10:28:37 -0400 Subject: [PATCH 4/9] made changes requested in review, minor changes --- gen_install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index c4a43915..857bb974 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -22,9 +22,10 @@ sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full source /opt/ros/${ROS_VERSION}/setup.bash ## install rosmon, it would be weird for this to be in one of the packages: #sudo apt-get install ros-${ROS_VERSION}-rosmon -if(($ROS_VERSION="kinetic"||$ROS_VERSION="melodic")); then +if[[$ROS_VERSION="kinetic"||$ROS_VERSION="melodic"]]; then sudo apt-get -qq install -y python-rosdep sudo apt-get -qq install -y python-pip + #Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. pip install 'mutagen==1.43.0' --user -q echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python-rosdep -y @@ -38,18 +39,15 @@ if(($ROS_VERSION="noetic")); then echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python3-rosdep -y fi -sudo apt-get -qq install -y python-rosdep [ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q rosdep update -q sudo apt-get -qq install -y python-rosinstall python-rosinstall-generator python-wstool build-essential ## Install packages we need: echo "INSTALLING DEPENDENCIES NOT FOUND IN ROSDEP" -#pip install pyqtgraph --user +#pip install pyqtgraph --useri #I think I have replaced this by adding a symlink: #python flo_face/teensy/src/serial_coms/computer/python/serial-coms/setup.py install --user -# Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved up into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. - cd ~/catkin_ws rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki" From c3b54f77a2c55a6c1900877c1fa7f3eb960373dc Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Wed, 30 Jun 2021 12:27:07 -0400 Subject: [PATCH 5/9] made changes requested in review, minor changes --- gen_install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index 857bb974..5c7fd6e1 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -29,8 +29,6 @@ if[[$ROS_VERSION="kinetic"||$ROS_VERSION="melodic"]]; then pip install 'mutagen==1.43.0' --user -q echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python-rosdep -y - - fi if(($ROS_VERSION="noetic")); then sudo apt-get -qq install -y python3-rosdep From c8c6b9d842aeeb237330d3c038ba787393cb2b44 Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Wed, 30 Jun 2021 13:33:23 -0400 Subject: [PATCH 6/9] message --- gen_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index 5c7fd6e1..2b4e1099 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -22,7 +22,7 @@ sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full source /opt/ros/${ROS_VERSION}/setup.bash ## install rosmon, it would be weird for this to be in one of the packages: #sudo apt-get install ros-${ROS_VERSION}-rosmon -if[[$ROS_VERSION="kinetic"||$ROS_VERSION="melodic"]]; then +if[[$ROS_VERSION=="kinetic"||$ROS_VERSION=="melodic"]]; then sudo apt-get -qq install -y python-rosdep sudo apt-get -qq install -y python-pip #Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. @@ -30,7 +30,7 @@ if[[$ROS_VERSION="kinetic"||$ROS_VERSION="melodic"]]; then echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python-rosdep -y fi -if(($ROS_VERSION="noetic")); then +if[[$ROS_VERSION=="noetic"]]; then sudo apt-get -qq install -y python3-rosdep sudo apt-get -qq install -y python3-pip pip install 'mutagen' --user -q From c9a7399569beea728234d116c15d94c95c5ca644 Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Wed, 30 Jun 2021 13:56:16 -0400 Subject: [PATCH 7/9] changes, moved then commands to next line --- gen_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index 2b4e1099..99a38f8b 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -22,7 +22,8 @@ sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full source /opt/ros/${ROS_VERSION}/setup.bash ## install rosmon, it would be weird for this to be in one of the packages: #sudo apt-get install ros-${ROS_VERSION}-rosmon -if[[$ROS_VERSION=="kinetic"||$ROS_VERSION=="melodic"]]; then +if[[$ROS_VERSION=="kinetic"||$ROS_VERSION=="melodic"]] +then sudo apt-get -qq install -y python-rosdep sudo apt-get -qq install -y python-pip #Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. @@ -30,7 +31,8 @@ if[[$ROS_VERSION=="kinetic"||$ROS_VERSION=="melodic"]]; then echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python-rosdep -y fi -if[[$ROS_VERSION=="noetic"]]; then +if[[$ROS_VERSION=="noetic"]] +then sudo apt-get -qq install -y python3-rosdep sudo apt-get -qq install -y python3-pip pip install 'mutagen' --user -q From 52dcfbe3253f52586f99afbde09fac9f39f91106 Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Tue, 6 Jul 2021 15:18:18 -0400 Subject: [PATCH 8/9] added if statement to get version for ubuntu 20 --- realsense_install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/realsense_install.sh b/realsense_install.sh index f07eb11b..e01c01a6 100755 --- a/realsense_install.sh +++ b/realsense_install.sh @@ -8,11 +8,14 @@ sudo apt-get -qq install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev at if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==16));then ROS_VERSION="kinetic" OS_VERSION="xenial" - else - if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then +fi +if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then ROS_VERSION="melodic" OS_VERSION="bionic" fi +if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==20));then + ROS_VERSION="noetic" + OS_VERSION="focal" fi sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE From 216557d771e95cd82313fc53b95e635b11edf627 Mon Sep 17 00:00:00 2001 From: AjayAnand-repo Date: Tue, 6 Jul 2021 15:21:05 -0400 Subject: [PATCH 9/9] added a seperate skip statement for ubuntu 20 conditional --- gen_install.sh | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/gen_install.sh b/gen_install.sh index 99a38f8b..762b356f 100755 --- a/gen_install.sh +++ b/gen_install.sh @@ -9,39 +9,56 @@ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31 sudo apt-get -qq update -y if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==16));then - ROS_VERSION="kinetic" + readonly ROS_VERSION_TARGET="kinetic" fi if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==18)); then - ROS_VERSION="melodic" + readonly ROS_VERSION_TARGET="melodic" fi if(($(cat /etc/os-release | grep VERSION_ID|grep -o '".*"' | sed 's/"//g' | cut -c1-2 )==20)); then - ROS_VERSION="noetic" + readonly ROS_VERSION_TARGET="noetic" fi -echo "installing for ros version: ${ROS_VERSION}" -sudo apt-get install -qq -y ros-${ROS_VERSION}-desktop-full -source /opt/ros/${ROS_VERSION}/setup.bash +echo "installing for ros version1: ${ROS_VERSION_TARGET}" +#to get the variable into global scope +export $ROS_VERSION_TARGET +echo "installing for ros version2: ${ROS_VERSION_TARGET}" +sudo apt-get install -qq -y ros-${ROS_VERSION_TARGET}-desktop-full +echo "installing for ros version3: ${ROS_VERSION_TARGET}" +source /opt/ros/${ROS_VERSION_TARGET}/setup.bash +echo "installing for ros version4: ${ROS_VERSION_TARGET}" ## install rosmon, it would be weird for this to be in one of the packages: -#sudo apt-get install ros-${ROS_VERSION}-rosmon -if[[$ROS_VERSION=="kinetic"||$ROS_VERSION=="melodic"]] +#sudo apt-get install ros-${ROS_VERSION_TARGET}-rosmon +echo "ros version:${ROS_VERSION_TARGET}" +if [[ "$ROS_VERSION_TARGET" == "kinetic" || "$ROS_VERSION_TARGET" == "melodic" ]] then + echo "In ROS Version kinetic or melodic" sudo apt-get -qq install -y python-rosdep sudo apt-get -qq install -y python-pip #Mutagen has dropped python 2 support. Last supported version was 1.43.0: mutagen moved into if statement to account for ubuntu 20, also python3 supports latest version of mutagen. pip install 'mutagen==1.43.0' --user -q echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python-rosdep -y + [ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q + rosdep update -q + sudo apt-get -qq install -y python-rosinstall python-rosinstall-generator python-wstool build-essential +cd ~/catkin_ws +rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki webrtc_ros" +cd - fi -if[[$ROS_VERSION=="noetic"]] +if [[ "$ROS_VERSION_TARGET" == "noetic" ]] then + echo "In ROS Version noetic" sudo apt-get -qq install -y python3-rosdep sudo apt-get -qq install -y python3-pip pip install 'mutagen' --user -q echo "INSTALLING ROSDEP DEPENDENCIES" sudo apt-get -qq install python3-rosdep -y + [ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q + rosdep update -q + sudo apt-get -qq install -y python3-rosinstall python3-rosinstall-generator python3-wstool build-essential +cd ~/catkin_ws +rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki webrtc_ros" +cd - fi -[ ! -d "/etc/ros/rosdep/sources.list.d" ] && sudo rosdep init -q -rosdep update -q -sudo apt-get -qq install -y python-rosinstall python-rosinstall-generator python-wstool build-essential ## Install packages we need: echo "INSTALLING DEPENDENCIES NOT FOUND IN ROSDEP" @@ -49,9 +66,9 @@ echo "INSTALLING DEPENDENCIES NOT FOUND IN ROSDEP" #I think I have replaced this by adding a symlink: #python flo_face/teensy/src/serial_coms/computer/python/serial-coms/setup.py install --user -cd ~/catkin_ws -rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki" -cd - +#cd ~/catkin_ws +#rosdep install --from-paths src --ignore-src -q -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv kobuki webrtc_ros" +#cd - echo "checking vars" echo "github_actions: $GITHUB_ACTIONS"